Changeset 338d54a7 in mainline for uspace/drv/hid


Ignore:
Timestamp:
2018-03-10T22:55:07Z (8 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
850fd32
Parents:
5ef16903
Message:

Gratuitous nested block makes ccheck sad.

Location:
uspace/drv/hid
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/hid/atkbd/atkbd.c

    r5ef16903 r338d54a7  
    302302        const sysarg_t method = IPC_GET_IMETHOD(*icall);
    303303        at_kbd_t *kbd = ddf_dev_data_get(ddf_fun_get_dev(fun));
     304        async_sess_t *sess;
    304305
    305306        switch (method) {
    306         case KBDEV_SET_IND: {
     307        case KBDEV_SET_IND:
    307308                async_answer_0(icallid, ENOTSUP);
    308309                break;
    309         }
    310310        /*
    311311         * This might be ugly but async_callback_receive_start makes no
    312312         * difference for incorrect call and malloc failure.
    313313         */
    314         case IPC_M_CONNECT_TO_ME: {
    315                 async_sess_t *sess =
    316                     async_callback_receive_start(EXCHANGE_SERIALIZE, icall);
     314        case IPC_M_CONNECT_TO_ME:
     315                sess = async_callback_receive_start(EXCHANGE_SERIALIZE, icall);
    317316
    318317                /* Probably ENOMEM error, try again. */
     
    334333
    335334                break;
    336         }
    337335        default:
    338336                ddf_msg(LVL_ERROR, "Unknown method: %d.", (int)method);
  • uspace/drv/hid/ps2mouse/ps2mouse.c

    r5ef16903 r338d54a7  
    408408        const sysarg_t method = IPC_GET_IMETHOD(*icall);
    409409        ps2_mouse_t *mouse = ddf_dev_data_get(ddf_fun_get_dev(fun));
     410        async_sess_t *sess;
    410411
    411412        switch (method) {
    412413        /* This might be ugly but async_callback_receive_start makes no
    413414         * difference for incorrect call and malloc failure. */
    414         case IPC_M_CONNECT_TO_ME: {
    415                 async_sess_t *sess =
    416                     async_callback_receive_start(EXCHANGE_SERIALIZE, icall);
     415        case IPC_M_CONNECT_TO_ME:
     416                sess = async_callback_receive_start(EXCHANGE_SERIALIZE, icall);
    417417                /* Probably ENOMEM error, try again. */
    418418                if (sess == NULL) {
     
    431431                }
    432432                break;
    433         }
    434433        default:
    435434                ddf_msg(LVL_ERROR, "Unknown method: %d.", (int)method);
  • uspace/drv/hid/usbhid/kbd/kbddev.c

    r5ef16903 r338d54a7  
    165165        const sysarg_t method = IPC_GET_IMETHOD(*icall);
    166166        usb_kbd_t *kbd_dev = ddf_fun_data_get(fun);
     167        async_sess_t *sess;
    167168
    168169        switch (method) {
     
    174175        /* This might be ugly but async_callback_receive_start makes no
    175176         * difference for incorrect call and malloc failure. */
    176         case IPC_M_CONNECT_TO_ME: {
    177                 async_sess_t *sess =
    178                     async_callback_receive_start(EXCHANGE_SERIALIZE, icall);
     177        case IPC_M_CONNECT_TO_ME:
     178                sess = async_callback_receive_start(EXCHANGE_SERIALIZE, icall);
    179179                /* Probably ENOMEM error, try again. */
    180180                if (sess == NULL) {
     
    194194                }
    195195                break;
    196         }
    197196        default:
    198197                        usb_log_error("%s: Unknown method: %d.",
  • uspace/drv/hid/xtkbd/xtkbd.c

    r5ef16903 r338d54a7  
    338338        const sysarg_t method = IPC_GET_IMETHOD(*icall);
    339339        xt_kbd_t *kbd = ddf_dev_data_get(ddf_fun_get_dev(fun));
     340        unsigned mods;
     341        async_sess_t *sess;
    340342
    341343        switch (method) {
    342         case KBDEV_SET_IND: {
     344        case KBDEV_SET_IND:
    343345                /*
    344346                 * XT keyboards do not support setting mods,
    345347                 * assume AT keyboard with Scan Code Set 1.
    346348                 */
    347                 const unsigned mods = IPC_GET_ARG1(*icall);
     349                mods = IPC_GET_ARG1(*icall);
    348350                const uint8_t status = 0 |
    349351                    ((mods & KM_CAPS_LOCK) ? LI_CAPS : 0) |
     
    362364                async_answer_0(icallid, rc);
    363365                break;
    364         }
    365366        /*
    366367         * This might be ugly but async_callback_receive_start makes no
    367368         * difference for incorrect call and malloc failure.
    368369         */
    369         case IPC_M_CONNECT_TO_ME: {
    370                 async_sess_t *sess =
    371                     async_callback_receive_start(EXCHANGE_SERIALIZE, icall);
     370        case IPC_M_CONNECT_TO_ME:
     371                sess = async_callback_receive_start(EXCHANGE_SERIALIZE, icall);
    372372
    373373                /* Probably ENOMEM error, try again. */
     
    389389
    390390                break;
    391         }
    392391        default:
    393392                ddf_msg(LVL_ERROR, "Unknown method: %d.", (int)method);
Note: See TracChangeset for help on using the changeset viewer.