staging: nvec: Remove unnecessary cast on void pointer
Subsystems (3)
PATCH 1/1 staging: nvec: Remove unnecessary cast on void pointer
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
)
--- drivers/staging/nvec/nvec_kbd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/nvec/nvec_kbd.c +1 -1
@@ -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 ;
Signature · 1 line
2.7.4
Please ignore this patch.
I have send this again as a part of patch series.
Quoted 43 lines · SIMRAN SINGHAL
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 <[email protected]>---
drivers/staging/nvec/nvec_kbd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/staging/nvec/nvec_kbd.c +1
-1@@ -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 ;Signature · 1 line
2.7.4
Quoted 19 lines · simran singhal
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
)
Quoted 4 lines
Signed-off-by simran singhal <[email protected]>--- drivers/staging/nvec/nvec_kbd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel