diff options
author | Maciej Trela <maciej.trela@intel.com> | 2012-01-04 04:33:05 -0500 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2012-01-16 02:44:15 -0500 |
commit | 27234ab44f97d85bab062a9d18aaff99addd267d (patch) | |
tree | a54a7da9aa4bb6ddf2da02163cd9de5975240156 /drivers/scsi | |
parent | be168a3b89b43b8bb4ef71066e91439d400e20a6 (diff) |
[SCSI] isci: remove unused 'isci_tmf->device' field
As the field was never set, isci_print_tmf() using 'isci_tmf->device'
sometimes causes a kernel crash if the dev_dbg() statement is enabled.
Remove the unused field both from isci_tmf struct definition and from
isci_print_tmf()
Signed-off-by: Maciej Trela <maciej.trela@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/isci/task.c | 2 | ||||
-rw-r--r-- | drivers/scsi/isci/task.h | 7 |
2 files changed, 4 insertions, 5 deletions
diff --git a/drivers/scsi/isci/task.c b/drivers/scsi/isci/task.c index 66ad3dc89498..f5a3f7d2bdab 100644 --- a/drivers/scsi/isci/task.c +++ b/drivers/scsi/isci/task.c | |||
@@ -496,7 +496,7 @@ static int isci_task_execute_tmf(struct isci_host *ihost, | |||
496 | } | 496 | } |
497 | } | 497 | } |
498 | 498 | ||
499 | isci_print_tmf(tmf); | 499 | isci_print_tmf(ihost, tmf); |
500 | 500 | ||
501 | if (tmf->status == SCI_SUCCESS) | 501 | if (tmf->status == SCI_SUCCESS) |
502 | ret = TMF_RESP_FUNC_COMPLETE; | 502 | ret = TMF_RESP_FUNC_COMPLETE; |
diff --git a/drivers/scsi/isci/task.h b/drivers/scsi/isci/task.h index bc78c0a41d5c..1b27b3797c6c 100644 --- a/drivers/scsi/isci/task.h +++ b/drivers/scsi/isci/task.h | |||
@@ -106,7 +106,6 @@ struct isci_tmf { | |||
106 | } resp; | 106 | } resp; |
107 | unsigned char lun[8]; | 107 | unsigned char lun[8]; |
108 | u16 io_tag; | 108 | u16 io_tag; |
109 | struct isci_remote_device *device; | ||
110 | enum isci_tmf_function_codes tmf_code; | 109 | enum isci_tmf_function_codes tmf_code; |
111 | int status; | 110 | int status; |
112 | 111 | ||
@@ -120,10 +119,10 @@ struct isci_tmf { | |||
120 | 119 | ||
121 | }; | 120 | }; |
122 | 121 | ||
123 | static inline void isci_print_tmf(struct isci_tmf *tmf) | 122 | static inline void isci_print_tmf(struct isci_host *ihost, struct isci_tmf *tmf) |
124 | { | 123 | { |
125 | if (SAS_PROTOCOL_SATA == tmf->proto) | 124 | if (SAS_PROTOCOL_SATA == tmf->proto) |
126 | dev_dbg(&tmf->device->isci_port->isci_host->pdev->dev, | 125 | dev_dbg(&ihost->pdev->dev, |
127 | "%s: status = %x\n" | 126 | "%s: status = %x\n" |
128 | "tmf->resp.d2h_fis.status = %x\n" | 127 | "tmf->resp.d2h_fis.status = %x\n" |
129 | "tmf->resp.d2h_fis.error = %x\n", | 128 | "tmf->resp.d2h_fis.error = %x\n", |
@@ -132,7 +131,7 @@ static inline void isci_print_tmf(struct isci_tmf *tmf) | |||
132 | tmf->resp.d2h_fis.status, | 131 | tmf->resp.d2h_fis.status, |
133 | tmf->resp.d2h_fis.error); | 132 | tmf->resp.d2h_fis.error); |
134 | else | 133 | else |
135 | dev_dbg(&tmf->device->isci_port->isci_host->pdev->dev, | 134 | dev_dbg(&ihost->pdev->dev, |
136 | "%s: status = %x\n" | 135 | "%s: status = %x\n" |
137 | "tmf->resp.resp_iu.data_present = %x\n" | 136 | "tmf->resp.resp_iu.data_present = %x\n" |
138 | "tmf->resp.resp_iu.status = %x\n" | 137 | "tmf->resp.resp_iu.status = %x\n" |