Changeset a35b458 in mainline for uspace/drv/bus/usb


Ignore:
Timestamp:
2018-03-02T20:10:49Z (8 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/fix-logger-deadlock, topic/msim-upgrade, topic/simplify-dev-export
Children:
f1380b7
Parents:
3061bc1
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-02-28 17:38:31)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-03-02 20:10:49)
Message:

style: Remove trailing whitespace on _all_ lines, including empty ones, for particular file types.

Command used: tools/srepl '\s\+$' '' -- *.c *.h *.py *.sh *.s *.S *.ag

Currently, whitespace on empty lines is very inconsistent.
There are two basic choices: Either remove the whitespace, or keep empty lines
indented to the level of surrounding code. The former is AFAICT more common,
and also much easier to do automatically.

Alternatively, we could write script for automatic indentation, and use that
instead. However, if such a script exists, it's possible to use the indented
style locally, by having the editor apply relevant conversions on load/save,
without affecting remote repository. IMO, it makes more sense to adopt
the simpler rule.

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

Legend:

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

    r3061bc1 ra35b458  
    5151        /** EHCI endpoint descriptor, backed by dma_buffer */
    5252        qh_t *qh;
    53        
     53
    5454        dma_buffer_t dma_buffer;
    5555
  • uspace/drv/bus/usb/ohci/hc.h

    r3061bc1 ra35b458  
    6464        /** Memory mapped I/O registers area */
    6565        ohci_regs_t *registers;
    66        
     66
    6767        /** Host controller communication area structure */
    6868        hcca_t *hcca;
  • uspace/drv/bus/usb/ohci/ohci_rh.c

    r3061bc1 ra35b458  
    409409        TEST_SIZE_INIT(0, port, hub);
    410410        const unsigned feature = uint16_usb2host(setup_packet->value);
    411        
     411
    412412        switch (feature) {
    413413        case USB_HUB_FEATURE_PORT_POWER:   /*8*/
    414414                {
    415415                        const uint32_t rhda = OHCI_RD(hub->registers->rh_desc_a);
    416                        
     416
    417417                        /* No power switching */
    418418                        if (rhda & RHDA_NPS_FLAG)
    419419                                return EOK;
    420                        
     420
    421421                        /* Ganged power switching, one port powers all */
    422422                        if (!(rhda & RHDA_PSM_FLAG)) {
  • uspace/drv/bus/usb/usbhub/port.c

    r3061bc1 ra35b458  
    8787                return;
    8888        }
    89        
     89
    9090        const errno_t err = usbhc_device_remove(exch, port->port_number);
    9191        if (err)
  • uspace/drv/bus/usb/usbmid/explore.c

    r3061bc1 ra35b458  
    164164                return rc;
    165165        }
    166        
     166
    167167        /* Create driver soft-state. */
    168168        usb_mid_t *usb_mid = usb_device_data_alloc(dev, sizeof(usb_mid_t));
  • uspace/drv/bus/usb/vhc/conndev.c

    r3061bc1 ra35b458  
    5757{
    5858        async_exch_t *exch = async_exchange_begin(sess);
    59        
     59
    6060        aid_t opening_request = async_send_0(exch, IPC_M_USBVIRT_GET_NAME, NULL);
    6161        if (opening_request == 0) {
     
    6363                return;
    6464        }
    65        
     65
    6666        ipc_call_t data_request_call;
    6767        aid_t data_request = async_data_read(exch, plugged_device_name,
    6868             PLUGGED_DEVICE_NAME_MAXLEN, &data_request_call);
    69        
     69
    7070        async_exchange_end(exch);
    71        
     71
    7272        if (data_request == 0) {
    7373                async_forget(opening_request);
    7474                return;
    7575        }
    76        
     76
    7777        errno_t data_request_rc;
    7878        errno_t opening_request_rc;
    7979        async_wait_for(data_request, &data_request_rc);
    8080        async_wait_for(opening_request, &opening_request_rc);
    81        
     81
    8282        if ((data_request_rc != EOK) || (opening_request_rc != EOK))
    8383                return;
    84        
     84
    8585        size_t len = IPC_GET_ARG2(data_request_call);
    8686        plugged_device_name[len] = 0;
     
    9797{
    9898        vhc_data_t *vhc = ddf_fun_data_get(fun);
    99        
     99
    100100        async_sess_t *callback =
    101101            async_callback_receive_start(EXCHANGE_SERIALIZE, icall);
    102        
     102
    103103        if (callback) {
    104104                errno_t rc = vhc_virtdev_plug(vhc, callback, &plugged_device_handle);
     
    108108                        return;
    109109                }
    110                
     110
    111111                async_answer_0(icallid, EOK);
    112                
     112
    113113                receive_device_name(callback);
    114                
     114
    115115                usb_log_info("New virtual device `%s' (id: %" PRIxn ").",
    116116                    plugged_device_name, plugged_device_handle);
  • uspace/drv/bus/usb/vhc/hub/virthubops.c

    r3061bc1 ra35b458  
    7373                return ESTALL;
    7474        }
    75        
     75
    7676        hub_t *hub = dev->device_data;
    7777
     
    9494                *actual_size = 0;
    9595        }
    96        
     96
    9797        hub->signal_changes = false;
    9898
  • uspace/drv/bus/usb/vhc/transfer.c

    r3061bc1 ra35b458  
    228228
    229229        fibril_mutex_unlock(&vhc->guard);
    230        
     230
    231231        if (targets > 1)
    232232                usb_log_warning("Transfer would be accepted by more devices!");
  • uspace/drv/bus/usb/xhci/debug.c

    r3061bc1 ra35b458  
    301301        static const char speed_exp [] = " KMG";
    302302        static const char *psi_types [] = { "", " rsvd", " RX", " TX" };
    303        
     303
    304304        usb_log_debug("Speed %u%s: %5u %cb/s, %s",
    305305            XHCI_REG_RD(psi, XHCI_PSI_PSIV),
  • uspace/drv/bus/usb/xhci/rh.c

    r3061bc1 ra35b458  
    273273                if (status != 0)
    274274                        usb_log_debug("RH port %u change not handled: 0x%x", port_id, status);
    275                
     275
    276276                /* Make sure that PSCEG is 0 before exiting the loop. */
    277277                status = XHCI_REG_RD_FIELD(&port->regs->portsc, 32);
Note: See TracChangeset for help on using the changeset viewer.