提交 fd536998 编写于 作者: A Arnd Bergmann 提交者: Martin K. Petersen

scsi: acornscsi: fix build error

A cleanup patch introduced a fatal typo from inbalanced curly braces:

drivers/scsi/arm/acornscsi.c: In function 'acornscsi_host_reset':
drivers/scsi/arm/acornscsi.c:2773:1: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]
drivers/scsi/arm/acornscsi.c:2795:12: error: invalid storage class for function 'acornscsi_show_info'
 static int acornscsi_show_info(struct seq_file *m, struct Scsi_Host *instance)

The same patch incorrectly changed the argument type of the reset
handler, as shown by this warning:

drivers/scsi/arm/acornscsi.c:2888:27: error: initialization of 'int (*)(struct scsi_cmnd *)' from incompatible pointer type 'int (*)(struct Scsi_Host *)' [-Werror=incompatible-pointer-types]
  .eh_host_reset_handler = acornscsi_host_reset,

This removes one the extraneous opening brace and reverts the
argument type change.

[mkp: fixed checkpatch complaint]

Fixes: 74fa80ee ("scsi: acornscsi: move bus reset to host reset")
Signed-off-by: NArnd Bergmann <arnd@arndb.de>
Reviewed-by: NJohannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
上级 b468b6a4
...@@ -2725,9 +2725,9 @@ int acornscsi_abort(struct scsi_cmnd *SCpnt) ...@@ -2725,9 +2725,9 @@ int acornscsi_abort(struct scsi_cmnd *SCpnt)
* Params : SCpnt - command causing reset * Params : SCpnt - command causing reset
* Returns : one of SCSI_RESET_ macros * Returns : one of SCSI_RESET_ macros
*/ */
int acornscsi_host_reset(struct Scsi_Host *shpnt) int acornscsi_host_reset(struct scsi_cmnd *SCpnt)
{ {
AS_Host *host = (AS_Host *)shpnt->hostdata; AS_Host *host = (AS_Host *)SCpnt->device->host->hostdata;
struct scsi_cmnd *SCptr; struct scsi_cmnd *SCptr;
host->stats.resets += 1; host->stats.resets += 1;
...@@ -2741,7 +2741,7 @@ int acornscsi_host_reset(struct Scsi_Host *shpnt) ...@@ -2741,7 +2741,7 @@ int acornscsi_host_reset(struct Scsi_Host *shpnt)
printk(KERN_WARNING "acornscsi_reset: "); printk(KERN_WARNING "acornscsi_reset: ");
print_sbic_status(asr, ssr, host->scsi.phase); print_sbic_status(asr, ssr, host->scsi.phase);
for (devidx = 0; devidx < 9; devidx ++) { for (devidx = 0; devidx < 9; devidx++)
acornscsi_dumplog(host, devidx); acornscsi_dumplog(host, devidx);
} }
#endif #endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册