Skip to content

Commit fd53699

Browse files
arndbmartinkpetersen
authored andcommitted
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: 74fa80e ("scsi: acornscsi: move bus reset to host reset") Signed-off-by: Arnd Bergmann <[email protected]> Reviewed-by: Johannes Thumshirn <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent b468b6a commit fd53699

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/scsi/arm/acornscsi.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2725,9 +2725,9 @@ int acornscsi_abort(struct scsi_cmnd *SCpnt)
27252725
* Params : SCpnt - command causing reset
27262726
* Returns : one of SCSI_RESET_ macros
27272727
*/
2728-
int acornscsi_host_reset(struct Scsi_Host *shpnt)
2728+
int acornscsi_host_reset(struct scsi_cmnd *SCpnt)
27292729
{
2730-
AS_Host *host = (AS_Host *)shpnt->hostdata;
2730+
AS_Host *host = (AS_Host *)SCpnt->device->host->hostdata;
27312731
struct scsi_cmnd *SCptr;
27322732

27332733
host->stats.resets += 1;
@@ -2741,7 +2741,7 @@ int acornscsi_host_reset(struct Scsi_Host *shpnt)
27412741

27422742
printk(KERN_WARNING "acornscsi_reset: ");
27432743
print_sbic_status(asr, ssr, host->scsi.phase);
2744-
for (devidx = 0; devidx < 9; devidx ++) {
2744+
for (devidx = 0; devidx < 9; devidx++)
27452745
acornscsi_dumplog(host, devidx);
27462746
}
27472747
#endif

0 commit comments

Comments
 (0)