summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShraddha Barke <shraddha.6596@gmail.com>2015-10-15 00:58:23 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-10-16 22:51:48 -0700
commit7f44582ea77229331c52cdd1374488523796a86f (patch)
treed2489f3e51c006af759b9a3bc2f0681ae7673075
parentdd146d2194eeae078a9a8e5562c8eefa475fa220 (diff)
downloadlinux-7f44582ea77229331c52cdd1374488523796a86f.tar.bz2
Staging: unisys: Remove unnecessary cast on void pointer
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>
-rw-r--r--drivers/staging/unisys/visorbus/visorchipset.c2
-rw-r--r--drivers/staging/unisys/visorhba/visorhba_main.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/drivers/staging/unisys/visorbus/visorchipset.c b/drivers/staging/unisys/visorbus/visorchipset.c
index 94419c36d2af..07594f43853d 100644
--- a/drivers/staging/unisys/visorbus/visorchipset.c
+++ b/drivers/staging/unisys/visorbus/visorchipset.c
@@ -696,7 +696,7 @@ struct visor_busdev {
static int match_visorbus_dev_by_id(struct device *dev, void *data)
{
struct visor_device *vdev = to_visor_device(dev);
- struct visor_busdev *id = (struct visor_busdev *)data;
+ struct visor_busdev *id = data;
u32 bus_no = id->bus_no;
u32 dev_no = id->dev_no;
diff --git a/drivers/staging/unisys/visorhba/visorhba_main.c b/drivers/staging/unisys/visorhba/visorhba_main.c
index 41a7bca97fc0..c119f20dfd44 100644
--- a/drivers/staging/unisys/visorhba/visorhba_main.c
+++ b/drivers/staging/unisys/visorhba/visorhba_main.c
@@ -695,20 +695,20 @@ static void visorhba_serverdown_complete(struct visorhba_devdata *devdata)
pendingdel = &devdata->pending[i];
switch (pendingdel->cmdtype) {
case CMD_SCSI_TYPE:
- scsicmd = (struct scsi_cmnd *)pendingdel->sent;
+ scsicmd = pendingdel->sent;
scsicmd->result = DID_RESET << 16;
if (scsicmd->scsi_done)
scsicmd->scsi_done(scsicmd);
break;
case CMD_SCSITASKMGMT_TYPE:
- cmdrsp = (struct uiscmdrsp *)pendingdel->sent;
+ cmdrsp = pendingdel->sent;
cmdrsp->scsitaskmgmt.notifyresult_handle
= TASK_MGMT_FAILED;
wake_up_all((wait_queue_head_t *)
cmdrsp->scsitaskmgmt.notify_handle);
break;
case CMD_VDISKMGMT_TYPE:
- cmdrsp = (struct uiscmdrsp *)pendingdel->sent;
+ cmdrsp = pendingdel->sent;
cmdrsp->vdiskmgmt.notifyresult_handle
= VDISK_MGMT_FAILED;
wake_up_all((wait_queue_head_t *)