]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
Staging: unisys: Remove useless cast on void pointer
authorShraddha Barke <shraddha.6596@gmail.com>
Mon, 10 Aug 2015 08:00:35 +0000 (13:30 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 15 Aug 2015 01:44:45 +0000 (18:44 -0700)
void pointers do not need to be cast to other pointer types.

The semantic patch used to find this:

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

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/unisys/visorbus/visorbus_main.c

index cc4a0292c287b6f813155fdf2fa8b19deb84e76d..ac39febdac55eaa2ddfe3065a5e9d172125fb0b2 100644 (file)
@@ -716,7 +716,7 @@ unregister_driver_attributes(struct visor_driver *drv)
 static void
 dev_periodic_work(void *xdev)
 {
-       struct visor_device *dev = (struct visor_device *)xdev;
+       struct visor_device *dev = xdev;
        struct visor_driver *drv = to_visor_driver(dev->device.driver);
 
        down(&dev->visordriver_callback_lock);