Browse Source

staging: nvec: nvec.c: Drop void pointer cast

Void pointers need not be cast to other pointer types.
Semantic patch used:

@r@
expression x;
void *e;
type T;
identifier f;
@@

(
  *((T *)e)
|
  ((T *)x) [...]
|
  ((T *)x)->f
|
- (T *)
  e
)

Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Janani Ravichandran 9 years ago
parent
commit
60d0ed1c42
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/staging/nvec/nvec.c

+ 1 - 1
drivers/staging/nvec/nvec.c

@@ -141,7 +141,7 @@ static int nvec_status_notifier(struct notifier_block *nb,
 {
 {
 	struct nvec_chip *nvec = container_of(nb, struct nvec_chip,
 	struct nvec_chip *nvec = container_of(nb, struct nvec_chip,
 						nvec_status_notifier);
 						nvec_status_notifier);
-	unsigned char *msg = (unsigned char *)data;
+	unsigned char *msg = data;
 
 
 	if (event_type != NVEC_CNTL)
 	if (event_type != NVEC_CNTL)
 		return NOTIFY_DONE;
 		return NOTIFY_DONE;