]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
staging: nvec: Remove unnecessary cast on void pointer
authorsimran singhal <singhalsimran0@gmail.com>
Sat, 4 Mar 2017 15:30:49 +0000 (21:00 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Mar 2017 16:38:55 +0000 (17:38 +0100)
The following Coccinelle script was used to detect this:

@r@
expression x;
void* e;
type T;
identifier f;
@@
(
  *((T *)e)
|
  ((T *)x)[...]
|
  ((T*)x)->f
|
- (T*)
  e
)

Signed-off-by: simran singhal <singhalsimran0@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/nvec/nvec_kbd.c

index e881e6b26a4c7af93209d7241660f43d165eb645..a01f486621eb60c22c7f4cbccb929743b6204a69 100644 (file)
@@ -58,7 +58,7 @@ static int nvec_keys_notifier(struct notifier_block *nb,
                              unsigned long event_type, void *data)
 {
        int code, state;
-       unsigned char *msg = (unsigned char *)data;
+       unsigned char *msg = data;
 
        if (event_type == NVEC_KB_EVT) {
                int _size = (msg[0] & (3 << 5)) >> 5;