Ignore:
Timestamp:
2018-01-23T12:41:22Z (7 years ago)
Author:
Ondřej Hlavatý <aearsis@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
e7e1fd3
Parents:
e546142
Message:

xhci: cstyle

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/xhci/hw_struct/common.h

    re546142 r8033f89  
    5959typedef volatile uint64_t xhci_qword_t __attribute__((aligned(8)));
    6060
    61 #define XHCI_DWORD_EXTRACT(field, hi, lo) (BIT_RANGE_EXTRACT(uint32_t, hi, lo, xhci2host(32, field)))
    62 #define XHCI_QWORD_EXTRACT(field, hi, lo) (BIT_RANGE_EXTRACT(uint64_t, hi, lo, xhci2host(64, field)))
     61#define XHCI_DWORD_EXTRACT(field, hi, lo) \
     62        (BIT_RANGE_EXTRACT(uint32_t, hi, lo, xhci2host(32, field)))
     63#define XHCI_QWORD_EXTRACT(field, hi, lo) \
     64        (BIT_RANGE_EXTRACT(uint64_t, hi, lo, xhci2host(64, field)))
    6365
    6466/**
     
    6769 * Not thread-safe, proper synchronization over this dword must be assured.
    6870 */
    69 static inline void xhci_dword_set_bits(xhci_dword_t *storage, uint32_t value, unsigned hi, unsigned lo)
     71static inline void xhci_dword_set_bits(xhci_dword_t *storage, uint32_t value,
     72        unsigned hi, unsigned lo)
    7073{
    7174        const uint32_t mask = host2xhci(32, BIT_RANGE(uint32_t, hi, lo));
     
    8285}
    8386
    84 static inline void xhci_qword_set_bits(xhci_qword_t *storage, uint64_t value, unsigned hi, unsigned lo)
     87static inline void xhci_qword_set_bits(xhci_qword_t *storage, uint64_t value,
     88        unsigned hi, unsigned lo)
    8589{
    8690        const uint64_t mask = host2xhci(64, BIT_RANGE(uint64_t, hi, lo));
     
    8993}
    9094
    91 static inline int xhci_reg_wait(xhci_dword_t *reg, uint32_t mask, uint32_t expected)
     95static inline int xhci_reg_wait(xhci_dword_t *reg, uint32_t mask,
     96        uint32_t expected)
    9297{
    9398        mask = host2xhci(32, mask);
Note: See TracChangeset for help on using the changeset viewer.