Changeset a35b458 in mainline for uspace/srv/hid/input/ctl/kbdev.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
  • TabularUnified uspace/srv/hid/input/ctl/kbdev.c

    r3061bc1 ra35b458  
    6666        /** Link to generic keyboard device */
    6767        kbd_dev_t *kbd_dev;
    68        
     68
    6969        /** Session with kbdev device */
    7070        async_sess_t *sess;
     
    7676        if (kbdev == NULL)
    7777                return NULL;
    78        
     78
    7979        kbdev->kbd_dev = kdev;
    8080
     
    8686        if (kbdev->sess != NULL)
    8787                async_hangup(kbdev->sess);
    88        
     88
    8989        free(kbdev);
    9090}
     
    9999                return ENOENT;
    100100        }
    101        
     101
    102102        kbdev_t *kbdev = kbdev_new(kdev);
    103103        if (kbdev == NULL) {
     
    107107                return ENOMEM;
    108108        }
    109        
     109
    110110        kbdev->sess = sess;
    111        
     111
    112112        async_exch_t *exch = async_exchange_begin(sess);
    113113        if (exch == NULL) {
     
    117117                return ENOENT;
    118118        }
    119        
     119
    120120        port_id_t port;
    121121        errno_t rc = async_create_callback_port(exch, INTERFACE_KBD_CB, 0, 0,
    122122            kbdev_callback_conn, kbdev, &port);
    123        
     123
    124124        if (rc != EOK) {
    125125                printf("%s: Failed creating callback connection from '%s'.\n",
     
    129129                return rc;
    130130        }
    131        
     131
    132132        async_exchange_end(exch);
    133        
     133
    134134        kdev->ctl_private = (void *) kbdev;
    135135        return 0;
     
    142142        if (!exch)
    143143                return;
    144        
     144
    145145        async_msg_1(exch, KBDEV_SET_IND, mods);
    146146        async_exchange_end(exch);
Note: See TracChangeset for help on using the changeset viewer.