]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: rts5208: rtsx.c: Drop unneeded void pointer cast
authorJanani Ravichandran <janani.rvchndrn@gmail.com>
Thu, 25 Feb 2016 19:37:56 +0000 (14:37 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 12 Mar 2016 06:09:09 +0000 (22:09 -0800)
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>
drivers/staging/rts5208/rtsx.c

index d23f8534472271c35502f16fed22ab2f6a86cf83..62204b5bcdf402898625c20e1cc5a58fa6852c84 100644 (file)
@@ -713,7 +713,7 @@ static void release_everything(struct rtsx_dev *dev)
 /* Thread to carry out delayed SCSI-device scanning */
 static int rtsx_scan_thread(void *__dev)
 {
-       struct rtsx_dev *dev = (struct rtsx_dev *)__dev;
+       struct rtsx_dev *dev = __dev;
        struct rtsx_chip *chip = dev->chip;
 
        /* Wait for the timeout to expire or for a disconnect */