Changeset 1433ecda in mainline for uspace/drv/bus/usb


Ignore:
Timestamp:
2018-04-04T15:42:37Z (8 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
2c4e1cc
Parents:
47b2d7e3
Message:

Fix cstyle: make ccheck-fix and commit only files where all the changes are good.

Location:
uspace/drv/bus/usb
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/ehci/ehci_bus.c

    r47b2d7e3 r1433ecda  
    145145        endpoint_set_offline_locked(ep);
    146146        list_remove(&ehci_ep->pending_link);
    147         usb_transfer_batch_t * const batch = ep->active_batch;
     147        usb_transfer_batch_t *const batch = ep->active_batch;
    148148        endpoint_deactivate_locked(ep);
    149149        fibril_mutex_unlock(&hc->guard);
  • uspace/drv/bus/usb/ehci/endpoint_list.c

    r47b2d7e3 r1433ecda  
    6666        fibril_mutex_initialize(&instance->guard);
    6767
    68         usb_log_debug2("EPL(%p-%s): Transfer list setup with ED: %p(%"PRIxn").",
     68        usb_log_debug2("EPL(%p-%s): Transfer list setup with ED: %p(%" PRIxn ").",
    6969            instance, name, instance->list_head,
    7070            addr_to_phys(instance->list_head));
     
    133133            instance, instance->name, ep, first, first->qh);
    134134        if (last_qh == instance->list_head) {
    135                 usb_log_debug2("EPL(%p-%s): head EP(%p-%"PRIxn"): %x:%x.",
     135                usb_log_debug2("EPL(%p-%s): head EP(%p-%" PRIxn "): %x:%x.",
    136136                    instance, instance->name, last_qh,
    137137                    addr_to_phys(instance->list_head),
  • uspace/drv/bus/usb/ehci/hw_struct/transfer_descriptor.h

    r47b2d7e3 r1433ecda  
    7777        volatile uint32_t extended_bp[5];
    7878
    79 } __attribute__((packed,aligned(32))) td_t;
     79} __attribute__((packed, aligned(32))) td_t;
    8080
    8181static_assert(sizeof(td_t) % 32 == 0);
  • uspace/drv/bus/usb/ohci/endpoint_list.c

    r47b2d7e3 r1433ecda  
    128128            list_first(&instance->endpoint_list), ohci_endpoint_t, eplist_link);
    129129        usb_log_debug("HCD EP(%p) added to list %s, first is %p(%p).",
    130                 ep, instance->name, first, first->ed);
     130            ep, instance->name, first, first->ed);
    131131        if (last_ed == instance->list_head) {
    132132                usb_log_debug2("%s head ED(%p-0x%0" PRIx32 "): %x:%x:%x:%x.",
  • uspace/drv/bus/usb/ohci/hw_struct/hcca.h

    r47b2d7e3 r1433ecda  
    6969 * @return Usable HCCA memory structure.
    7070 */
    71 static inline hcca_t * hcca_get(void)
     71static inline hcca_t *hcca_get(void)
    7272{
    7373        hcca_t *hcca = memalign(sizeof(hcca_t), sizeof(hcca_t));
  • uspace/drv/bus/usb/ohci/ohci_bus.h

    r47b2d7e3 r1433ecda  
    8484 * @return Pointer to assigned hcd endpoint structure
    8585 */
    86 static inline ohci_endpoint_t * ohci_endpoint_get(const endpoint_t *ep)
     86static inline ohci_endpoint_t *ohci_endpoint_get(const endpoint_t *ep)
    8787{
    8888        assert(ep);
  • uspace/drv/bus/usb/usbmid/usbmid.h

    r47b2d7e3 r1433ecda  
    6969extern errno_t usbmid_interface_destroy(usbmid_interface_t *mid_iface);
    7070
    71 static inline usbmid_interface_t * usbmid_interface_from_link(link_t *item)
     71static inline usbmid_interface_t *usbmid_interface_from_link(link_t *item)
    7272{
    7373        return list_get_instance(item, usbmid_interface_t, link);
  • uspace/drv/bus/usb/vhc/conndev.c

    r47b2d7e3 r1433ecda  
    6666        ipc_call_t data_request_call;
    6767        aid_t data_request = async_data_read(exch, plugged_device_name,
    68              PLUGGED_DEVICE_NAME_MAXLEN, &data_request_call);
     68            PLUGGED_DEVICE_NAME_MAXLEN, &data_request_call);
    6969
    7070        async_exchange_end(exch);
  • uspace/drv/bus/usb/vhc/hub/virthub.h

    r47b2d7e3 r1433ecda  
    7070        uint8_t max_current;
    7171        /** Whether device at given port is removable. */
    72         uint8_t removable_device[BITS2BYTES(HUB_PORT_COUNT+1)];
     72        uint8_t removable_device[BITS2BYTES(HUB_PORT_COUNT + 1)];
    7373        /** Port power control.
    7474         * This is USB1.0 compatibility field, all bits must be 1.
    7575         */
    76         uint8_t port_power[BITS2BYTES(HUB_PORT_COUNT+1)];
    77 } __attribute__ ((packed)) hub_descriptor_t;
     76        uint8_t port_power[BITS2BYTES(HUB_PORT_COUNT + 1)];
     77} __attribute__((packed)) hub_descriptor_t;
    7878
    7979extern usbvirt_device_ops_t hub_ops;
  • uspace/drv/bus/usb/vhc/main.c

    r47b2d7e3 r1433ecda  
    8080        if (ret != EOK) {
    8181                usb_log_error("Failed to init HCD structures: %s.",
    82                    str_error(ret));
     82                    str_error(ret));
    8383                return ret;
    8484        }
     
    111111        if (ret != EOK) {
    112112                usb_log_error("Failed to init VHC root hub: %s",
    113                         str_error(ret));
     113                    str_error(ret));
    114114                // TODO do something here...
    115115        }
     
    127127};
    128128
    129 int main(int argc, char * argv[])
     129int main(int argc, char *argv[])
    130130{
    131131        log_init(NAME);
  • uspace/drv/bus/usb/xhci/device.c

    r47b2d7e3 r1433ecda  
    159159        if (dev->base.speed == USB_SPEED_HIGH) {
    160160                dev->tt_think_time = 8 +
    161                         8  * !!(hub_desc.characteristics & HUB_CHAR_TT_THINK_8) +
    162                         16 * !!(hub_desc.characteristics & HUB_CHAR_TT_THINK_16);
     161                    8  * !!(hub_desc.characteristics & HUB_CHAR_TT_THINK_8) +
     162                    16 * !!(hub_desc.characteristics & HUB_CHAR_TT_THINK_16);
    163163        }
    164164
     
    222222        if ((err = hc_get_device_desc(dev, &desc))) {
    223223                usb_log_error("Device(%d): failed to get device "
    224                    "descriptor: %s", dev->address, str_error(err));
     224                    "descriptor: %s", dev->address, str_error(err));
    225225                goto err_address;
    226226        }
  • uspace/drv/bus/usb/xhci/hw_struct/common.h

    r47b2d7e3 r1433ecda  
    7070 */
    7171static inline void xhci_dword_set_bits(xhci_dword_t *storage, uint32_t value,
    72         unsigned hi, unsigned lo)
     72    unsigned hi, unsigned lo)
    7373{
    7474        const uint32_t mask = host2xhci(32, BIT_RANGE(uint32_t, hi, lo));
     
    8686
    8787static inline void xhci_qword_set_bits(xhci_qword_t *storage, uint64_t value,
    88         unsigned hi, unsigned lo)
     88    unsigned hi, unsigned lo)
    8989{
    9090        const uint64_t mask = host2xhci(64, BIT_RANGE(uint64_t, hi, lo));
     
    9494
    9595static inline int xhci_reg_wait(xhci_dword_t *reg, uint32_t mask,
    96         uint32_t expected)
     96    uint32_t expected)
    9797{
    9898        mask = host2xhci(32, mask);
  • uspace/drv/bus/usb/xhci/scratchpad.c

    r47b2d7e3 r1433ecda  
    7777        for (unsigned i = 0; i < num_bufs; ++i) {
    7878                array[i] = host2xhci(64, dma_buffer_phys(&hc->scratchpad_array,
    79                             base + i * PAGE_SIZE));
     79                    base + i * PAGE_SIZE));
    8080        }
    8181
  • uspace/drv/bus/usb/xhci/transfers.h

    r47b2d7e3 r1433ecda  
    5353} xhci_transfer_t;
    5454
    55 extern usb_transfer_batch_t* xhci_transfer_create(endpoint_t *);
     55extern usb_transfer_batch_t *xhci_transfer_create(endpoint_t *);
    5656extern errno_t xhci_transfer_schedule(usb_transfer_batch_t *);
    5757
Note: See TracChangeset for help on using the changeset viewer.