]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
scsi: ncr5380: Avoid a compiler warning
authorFinn Thain <fthain@telegraphics.com.au>
Sat, 27 Aug 2016 02:30:00 +0000 (12:30 +1000)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 31 Aug 2016 04:25:18 +0000 (00:25 -0400)
With commit 3a0f64bfa907 ("mac_scsi: Fix pseudo DMA implementation")
some versions of gcc now warn:

In file included from drivers/scsi/mac_scsi.c:335:
drivers/scsi/NCR5380.h:295: warning: `NCR5380_poll_politely' declared inline after being called
drivers/scsi/NCR5380.h:295: warning: previous declaration of `NCR5380_poll_politely' was here

Avoid this by defining NCR5380_poll_politely() in NCR5380.h.

[mkp: checkpatch warnings]

Suggested-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Tested-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/NCR5380.c
drivers/scsi/NCR5380.h

index 43908bbb3b23649fe383841f0a9d599c7cd8b0ae..b58c6a38fc32c6ab8fac3f96d00cafb2f257bc20 100644 (file)
@@ -230,13 +230,6 @@ static int NCR5380_poll_politely2(struct Scsi_Host *instance,
        return -ETIMEDOUT;
 }
 
-static inline int NCR5380_poll_politely(struct Scsi_Host *instance,
-                                        int reg, int bit, int val, int wait)
-{
-       return NCR5380_poll_politely2(instance, reg, bit, val,
-                                               reg, bit, val, wait);
-}
-
 #if NDEBUG
 static struct {
        unsigned char mask;
index c60728785d892a2d07f53f155811b89ce3e623ad..2ed61b5d40e604245d8509032dddd6d0005ce317 100644 (file)
@@ -292,8 +292,14 @@ static void NCR5380_reselect(struct Scsi_Host *instance);
 static struct scsi_cmnd *NCR5380_select(struct Scsi_Host *, struct scsi_cmnd *);
 static int NCR5380_transfer_dma(struct Scsi_Host *instance, unsigned char *phase, int *count, unsigned char **data);
 static int NCR5380_transfer_pio(struct Scsi_Host *instance, unsigned char *phase, int *count, unsigned char **data);
-static int NCR5380_poll_politely(struct Scsi_Host *, int, int, int, int);
 static int NCR5380_poll_politely2(struct Scsi_Host *, int, int, int, int, int, int, int);
 
+static inline int NCR5380_poll_politely(struct Scsi_Host *instance,
+                                       int reg, int bit, int val, int wait)
+{
+       return NCR5380_poll_politely2(instance, reg, bit, val,
+                                               reg, bit, val, wait);
+}
+
 #endif                         /* __KERNEL__ */
 #endif                         /* NCR5380_H */