aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Cameron <stephenmcameron@gmail.com>2015-01-23 17:44:30 -0500
committerJames Bottomley <JBottomley@Parallels.com>2015-02-02 12:57:43 -0500
commit7fa3030c655b7479940487b01a20f7332cf68c00 (patch)
tree47dad4ee150623eeb1dbfa312a212f6b1400ab64
parente345893bd4a8b0a9383a9ce9ff06034da103ad14 (diff)
hpsa: do not use a void pointer for scsi_cmd field of struct CommandList
There's no reason for it to be a void *, it should be a struct scsi_cmnd * Reviewed-by: Scott Teel <scott.teel@pmcs.com> Signed-off-by: Don Brace <don.brace@pmcs.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
-rw-r--r--drivers/scsi/hpsa.c6
-rw-r--r--drivers/scsi/hpsa_cmd.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index a02ea7f43d67..8f2569c7663c 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -1764,7 +1764,7 @@ static void complete_scsi_command(struct CommandList *cp)
1764 unsigned long sense_data_size; 1764 unsigned long sense_data_size;
1765 1765
1766 ei = cp->err_info; 1766 ei = cp->err_info;
1767 cmd = (struct scsi_cmnd *) cp->scsi_cmd; 1767 cmd = cp->scsi_cmd;
1768 h = cp->h; 1768 h = cp->h;
1769 dev = cmd->device->hostdata; 1769 dev = cmd->device->hostdata;
1770 1770
@@ -4466,7 +4466,7 @@ static int hpsa_send_reset_as_abort_ioaccel2(struct ctlr_info *h,
4466 unsigned char *psa = &phys_scsi3addr[0]; 4466 unsigned char *psa = &phys_scsi3addr[0];
4467 4467
4468 /* Get a pointer to the hpsa logical device. */ 4468 /* Get a pointer to the hpsa logical device. */
4469 scmd = (struct scsi_cmnd *) abort->scsi_cmd; 4469 scmd = abort->scsi_cmd;
4470 dev = (struct hpsa_scsi_dev_t *)(scmd->device->hostdata); 4470 dev = (struct hpsa_scsi_dev_t *)(scmd->device->hostdata);
4471 if (dev == NULL) { 4471 if (dev == NULL) {
4472 dev_warn(&h->pdev->dev, 4472 dev_warn(&h->pdev->dev,
@@ -4604,7 +4604,7 @@ static int hpsa_eh_abort_handler(struct scsi_cmnd *sc)
4604 } 4604 }
4605 hpsa_get_tag(h, abort, &taglower, &tagupper); 4605 hpsa_get_tag(h, abort, &taglower, &tagupper);
4606 ml += sprintf(msg+ml, "Tag:0x%08x:%08x ", tagupper, taglower); 4606 ml += sprintf(msg+ml, "Tag:0x%08x:%08x ", tagupper, taglower);
4607 as = (struct scsi_cmnd *) abort->scsi_cmd; 4607 as = abort->scsi_cmd;
4608 if (as != NULL) 4608 if (as != NULL)
4609 ml += sprintf(msg+ml, "Command:0x%x SN:0x%lx ", 4609 ml += sprintf(msg+ml, "Command:0x%x SN:0x%lx ",
4610 as->cmnd[0], as->serial_number); 4610 as->cmnd[0], as->serial_number);
diff --git a/drivers/scsi/hpsa_cmd.h b/drivers/scsi/hpsa_cmd.h
index 071b64c82406..3a621c74b76f 100644
--- a/drivers/scsi/hpsa_cmd.h
+++ b/drivers/scsi/hpsa_cmd.h
@@ -408,7 +408,7 @@ struct CommandList {
408 int cmd_type; 408 int cmd_type;
409 long cmdindex; 409 long cmdindex;
410 struct completion *waiting; 410 struct completion *waiting;
411 void *scsi_cmd; 411 struct scsi_cmnd *scsi_cmd;
412 struct work_struct work; 412 struct work_struct work;
413 413
414 /* 414 /*