Changeset a35b458 in mainline for uspace/drv/bus/usb/vhc/conndev.c


Ignore:
Timestamp:
2018-03-02T20:10:49Z (7 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, 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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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);
Note: See TracChangeset for help on using the changeset viewer.