All of lore.kernel.org
 help / color / mirror / Atom feed
From: Finn Thain <fthain@telegraphics.com.au>
To: "James E.J. Bottomley" <jejb@linux.vnet.ibm.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	<linux-scsi@vger.kernel.org>, <linux-m68k@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>,
	Michael Schmitz <schmitzmic@gmail.com>
Subject: [PATCH 2/3] scsi/ncr5380: Avoid a compiler warning
Date: Sat, 27 Aug 2016 12:30:00 +1000	[thread overview]
Message-ID: <20160827022959.211730285@telegraphics.com.au> (raw)
In-Reply-To: 20160827022958.983743612@telegraphics.com.au

[-- Attachment #1: ncr5380-warning-declared-inline-after-called --]
[-- Type: text/plain, Size: 2439 bytes --]

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.

Suggested-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>

---
 drivers/scsi/NCR5380.c |    7 -------
 drivers/scsi/NCR5380.h |    8 +++++++-
 2 files changed, 7 insertions(+), 8 deletions(-)

Index: linux/drivers/scsi/NCR5380.c
===================================================================
--- linux.orig/drivers/scsi/NCR5380.c	2016-08-27 12:29:57.000000000 +1000
+++ linux/drivers/scsi/NCR5380.c	2016-08-27 12:29:57.000000000 +1000
@@ -230,13 +230,6 @@ static int NCR5380_poll_politely2(struct
 	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: linux/drivers/scsi/NCR5380.h
===================================================================
--- linux.orig/drivers/scsi/NCR5380.h	2016-08-27 12:29:57.000000000 +1000
+++ linux/drivers/scsi/NCR5380.h	2016-08-27 12:29:57.000000000 +1000
@@ -292,8 +292,14 @@ static void NCR5380_reselect(struct Scsi
 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 */

WARNING: multiple messages have this Message-ID (diff)
From: Finn Thain <fthain@telegraphics.com.au>
To: "James E.J. Bottomley" <jejb@linux.vnet.ibm.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	linux-scsi@vger.kernel.org, linux-m68k@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Michael Schmitz <schmitzmic@gmail.com>
Subject: [PATCH 2/3] scsi/ncr5380: Avoid a compiler warning
Date: Sat, 27 Aug 2016 12:30:00 +1000	[thread overview]
Message-ID: <20160827022959.211730285@telegraphics.com.au> (raw)
In-Reply-To: 20160827022958.983743612@telegraphics.com.au

[-- Attachment #1: ncr5380-warning-declared-inline-after-called --]
[-- Type: text/plain, Size: 2439 bytes --]

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.

Suggested-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>

---
 drivers/scsi/NCR5380.c |    7 -------
 drivers/scsi/NCR5380.h |    8 +++++++-
 2 files changed, 7 insertions(+), 8 deletions(-)

Index: linux/drivers/scsi/NCR5380.c
===================================================================
--- linux.orig/drivers/scsi/NCR5380.c	2016-08-27 12:29:57.000000000 +1000
+++ linux/drivers/scsi/NCR5380.c	2016-08-27 12:29:57.000000000 +1000
@@ -230,13 +230,6 @@ static int NCR5380_poll_politely2(struct
 	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: linux/drivers/scsi/NCR5380.h
===================================================================
--- linux.orig/drivers/scsi/NCR5380.h	2016-08-27 12:29:57.000000000 +1000
+++ linux/drivers/scsi/NCR5380.h	2016-08-27 12:29:57.000000000 +1000
@@ -292,8 +292,14 @@ static void NCR5380_reselect(struct Scsi
 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 */

  parent reply	other threads:[~2016-08-27  2:42 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-27  2:29 [PATCH 0/3] Small fixes and cleanup Finn Thain
2016-08-27  2:29 ` Finn Thain
2016-08-27  2:29 ` [PATCH 1/3] documentation/scsi: Remove nodisconnect parameter Finn Thain
2016-08-27  2:29   ` Finn Thain
2016-08-28  8:07   ` Geert Uytterhoeven
2016-09-06 12:41   ` Jonathan Corbet
2016-09-06 12:41     ` Jonathan Corbet
2016-08-27  2:30 ` Finn Thain [this message]
2016-08-27  2:30   ` [PATCH 2/3] scsi/ncr5380: Avoid a compiler warning Finn Thain
2016-08-28  8:08   ` Geert Uytterhoeven
2016-08-27  2:30 ` [PATCH 3/3] scsi/ncr5380: Improve interrupt latency during PIO tranfers Finn Thain
2016-08-27  2:30   ` Finn Thain
2016-08-28  8:08   ` Geert Uytterhoeven
2016-08-29  4:06     ` Finn Thain
2016-08-31  4:44   ` [PATCH v2 " Finn Thain
2016-08-31  4:44     ` Finn Thain
2016-08-31 14:07     ` Laurence Oberman
2016-09-09 11:28     ` Martin K. Petersen
2016-09-09 11:28       ` Martin K. Petersen
2016-09-09 12:00       ` Geert Uytterhoeven
2016-09-14 18:12     ` Martin K. Petersen
2016-09-14 18:12       ` Martin K. Petersen
2016-08-31  4:26 ` [PATCH 0/3] Small fixes and cleanup Martin K. Petersen
2016-08-31  4:26   ` Martin K. Petersen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160827022959.211730285@telegraphics.com.au \
    --to=fthain@telegraphics.com.au \
    --cc=geert@linux-m68k.org \
    --cc=jejb@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-m68k@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=schmitzmic@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.