linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] scsi: acornscsi: fix build error
@ 2017-09-11 20:00 Arnd Bergmann
  2017-09-12  7:05 ` Johannes Thumshirn
  2017-09-15  1:03 ` Martin K. Petersen
  0 siblings, 2 replies; 3+ messages in thread
From: Arnd Bergmann @ 2017-09-11 20:00 UTC (permalink / raw)
  To: linux-arm-kernel

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.

Fixes: 74fa80ee3fae ("scsi: acornscsi: move bus reset to host reset")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/scsi/arm/acornscsi.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/scsi/arm/acornscsi.c b/drivers/scsi/arm/acornscsi.c
index 690816f3c6af..8d54283a99b2 100644
--- a/drivers/scsi/arm/acornscsi.c
+++ b/drivers/scsi/arm/acornscsi.c
@@ -2725,9 +2725,9 @@ int acornscsi_abort(struct scsi_cmnd *SCpnt)
  * Params   : SCpnt  - command causing reset
  * 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;
     
     host->stats.resets += 1;
@@ -2741,7 +2741,7 @@ int acornscsi_host_reset(struct Scsi_Host *shpnt)
 
 	printk(KERN_WARNING "acornscsi_reset: ");
 	print_sbic_status(asr, ssr, host->scsi.phase);
-	for (devidx = 0; devidx < 9; devidx ++) {
+	for (devidx = 0; devidx < 9; devidx ++)
 	    acornscsi_dumplog(host, devidx);
     }
 #endif
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH] scsi: acornscsi: fix build error
  2017-09-11 20:00 [PATCH] scsi: acornscsi: fix build error Arnd Bergmann
@ 2017-09-12  7:05 ` Johannes Thumshirn
  2017-09-15  1:03 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Johannes Thumshirn @ 2017-09-12  7:05 UTC (permalink / raw)
  To: linux-arm-kernel

Looks good,
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
-- 
Johannes Thumshirn                                          Storage
jthumshirn at suse.de                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 N?rnberg
GF: Felix Imend?rffer, Jane Smithard, Graham Norton
HRB 21284 (AG N?rnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] scsi: acornscsi: fix build error
  2017-09-11 20:00 [PATCH] scsi: acornscsi: fix build error Arnd Bergmann
  2017-09-12  7:05 ` Johannes Thumshirn
@ 2017-09-15  1:03 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2017-09-15  1:03 UTC (permalink / raw)
  To: linux-arm-kernel


Arnd,

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

Applied to 4.14/scsi-fixes. Thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-09-15  1:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-11 20:00 [PATCH] scsi: acornscsi: fix build error Arnd Bergmann
2017-09-12  7:05 ` Johannes Thumshirn
2017-09-15  1:03 ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).