Commit 7f44582e authored by Shraddha Barke's avatar Shraddha Barke Committed by Greg Kroah-Hartman

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: default avatarShraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent dd146d21
...@@ -696,7 +696,7 @@ struct visor_busdev { ...@@ -696,7 +696,7 @@ struct visor_busdev {
static int match_visorbus_dev_by_id(struct device *dev, void *data) static int match_visorbus_dev_by_id(struct device *dev, void *data)
{ {
struct visor_device *vdev = to_visor_device(dev); 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 bus_no = id->bus_no;
u32 dev_no = id->dev_no; u32 dev_no = id->dev_no;
......
...@@ -695,20 +695,20 @@ static void visorhba_serverdown_complete(struct visorhba_devdata *devdata) ...@@ -695,20 +695,20 @@ static void visorhba_serverdown_complete(struct visorhba_devdata *devdata)
pendingdel = &devdata->pending[i]; pendingdel = &devdata->pending[i];
switch (pendingdel->cmdtype) { switch (pendingdel->cmdtype) {
case CMD_SCSI_TYPE: case CMD_SCSI_TYPE:
scsicmd = (struct scsi_cmnd *)pendingdel->sent; scsicmd = pendingdel->sent;
scsicmd->result = DID_RESET << 16; scsicmd->result = DID_RESET << 16;
if (scsicmd->scsi_done) if (scsicmd->scsi_done)
scsicmd->scsi_done(scsicmd); scsicmd->scsi_done(scsicmd);
break; break;
case CMD_SCSITASKMGMT_TYPE: case CMD_SCSITASKMGMT_TYPE:
cmdrsp = (struct uiscmdrsp *)pendingdel->sent; cmdrsp = pendingdel->sent;
cmdrsp->scsitaskmgmt.notifyresult_handle cmdrsp->scsitaskmgmt.notifyresult_handle
= TASK_MGMT_FAILED; = TASK_MGMT_FAILED;
wake_up_all((wait_queue_head_t *) wake_up_all((wait_queue_head_t *)
cmdrsp->scsitaskmgmt.notify_handle); cmdrsp->scsitaskmgmt.notify_handle);
break; break;
case CMD_VDISKMGMT_TYPE: case CMD_VDISKMGMT_TYPE:
cmdrsp = (struct uiscmdrsp *)pendingdel->sent; cmdrsp = pendingdel->sent;
cmdrsp->vdiskmgmt.notifyresult_handle cmdrsp->vdiskmgmt.notifyresult_handle
= VDISK_MGMT_FAILED; = VDISK_MGMT_FAILED;
wake_up_all((wait_queue_head_t *) wake_up_all((wait_queue_head_t *)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment