All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/8] [Set 3 v2] Rid W=1 warnings in SCSI
@ 2021-03-17  9:11 Lee Jones
  2021-03-17  9:11 ` [PATCH 1/8] scsi: BusLogic: Supply __printf(x, y) formatting for blogic_msg() Lee Jones
                   ` (8 more replies)
  0 siblings, 9 replies; 12+ messages in thread
From: Lee Jones @ 2021-03-17  9:11 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Artur Paszkiewicz, c by, GOTO Masanori, gotom,
	James E.J. Bottomley, Khalid Aziz, Leonard N. Zubkoff,
	linux-scsi, Martin K. Petersen, Richard Hirst, YOKOTA Hiroshi

This set contains functional changes.

This set is part of a larger effort attempting to clean-up W=1
kernel builds, which are currently overwhelmingly riddled with
niggly little warnings.

Lee Jones (8):
  scsi: BusLogic: Supply __printf(x, y) formatting for blogic_msg()
  scsi: nsp32: Supply __printf(x, y) formatting for nsp32_message()
  scsi: nsp32: Remove or exclude unused variables
  scsi: FlashPoint: Remove unused variable 'TID' from
    'FlashPoint_AbortCCB()'
  scsi: sim710: Remove unused variable 'err' from sim710_init()
  scsi: isci: remote_device: Make local function
    isci_remote_device_wait_for_resume_from_abort() static
  scsi: isci: port: Make local function 'port_state_name()' static
  scsi: nsp32: Correct expected types in debug print formatting

 drivers/scsi/BusLogic.c           |  2 +-
 drivers/scsi/FlashPoint.c         |  4 ----
 drivers/scsi/isci/port.c          |  2 +-
 drivers/scsi/isci/remote_device.c |  2 +-
 drivers/scsi/nsp32.c              | 31 +++++++++----------------------
 drivers/scsi/sim710.c             | 14 ++++++--------
 6 files changed, 18 insertions(+), 37 deletions(-)

Cc: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Cc: c by <James.Bottomley@SteelEye.com>
Cc: GOTO Masanori <gotom@debian.or.jp>
Cc: gotom@debian.org
Cc: "James E.J. Bottomley" <jejb@linux.ibm.com>
Cc: Khalid Aziz <khalid@gonehiking.org>
Cc: "Leonard N. Zubkoff" <lnz@dandelion.com>
Cc: linux-scsi@vger.kernel.org
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: Richard Hirst <richard@sleepie.demon.co.uk>
Cc: YOKOTA Hiroshi <yokota@netlab.is.tsukuba.ac.jp>
-- 
2.27.0


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

* [PATCH 1/8] scsi: BusLogic: Supply __printf(x, y) formatting for blogic_msg()
  2021-03-17  9:11 [PATCH 0/8] [Set 3 v2] Rid W=1 warnings in SCSI Lee Jones
@ 2021-03-17  9:11 ` Lee Jones
  2021-03-17 17:01   ` Khalid Aziz
  2021-03-17  9:11 ` [PATCH 2/8] scsi: nsp32: Supply __printf(x, y) formatting for nsp32_message() Lee Jones
                   ` (7 subsequent siblings)
  8 siblings, 1 reply; 12+ messages in thread
From: Lee Jones @ 2021-03-17  9:11 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Khalid Aziz, James E.J. Bottomley,
	Martin K. Petersen, Leonard N. Zubkoff, linux-scsi

Fixes the following W=1 kernel build warning(s):

 In file included from drivers/scsi/BusLogic.c:51:
 drivers/scsi/BusLogic.c: In function ‘blogic_msg’:
 drivers/scsi/BusLogic.c:3591:2: warning: function ‘blogic_msg’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format]

Cc: Khalid Aziz <khalid@gonehiking.org>
Cc: "James E.J. Bottomley" <jejb@linux.ibm.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: "Leonard N. Zubkoff" <lnz@dandelion.com>
Cc: linux-scsi@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/scsi/BusLogic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/BusLogic.c b/drivers/scsi/BusLogic.c
index ccb061ab0a0ad..0ac3f713fc212 100644
--- a/drivers/scsi/BusLogic.c
+++ b/drivers/scsi/BusLogic.c
@@ -3578,7 +3578,7 @@ Target	Requested Completed  Requested Completed  Requested Completed\n\
 /*
   blogic_msg prints Driver Messages.
 */
-
+__printf(2, 4)
 static void blogic_msg(enum blogic_msglevel msglevel, char *fmt,
 			struct blogic_adapter *adapter, ...)
 {
-- 
2.27.0


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

* [PATCH 2/8] scsi: nsp32: Supply __printf(x, y) formatting for nsp32_message()
  2021-03-17  9:11 [PATCH 0/8] [Set 3 v2] Rid W=1 warnings in SCSI Lee Jones
  2021-03-17  9:11 ` [PATCH 1/8] scsi: BusLogic: Supply __printf(x, y) formatting for blogic_msg() Lee Jones
@ 2021-03-17  9:11 ` Lee Jones
  2021-03-17  9:11 ` [PATCH 3/8] scsi: nsp32: Remove or exclude unused variables Lee Jones
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 12+ messages in thread
From: Lee Jones @ 2021-03-17  9:11 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, GOTO Masanori, YOKOTA Hiroshi,
	James E.J. Bottomley, Martin K. Petersen, gotom, linux-scsi

Fixes the following W=1 kernel build warning(s):

 drivers/scsi/nsp32.c: In function ‘nsp32_message’:
 drivers/scsi/nsp32.c:318:2: warning: function ‘nsp32_message’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format]

Cc: GOTO Masanori <gotom@debian.or.jp>
Cc: YOKOTA Hiroshi <yokota@netlab.is.tsukuba.ac.jp>
Cc: "James E.J. Bottomley" <jejb@linux.ibm.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: gotom@debian.org
Cc: linux-scsi@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/scsi/nsp32.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/scsi/nsp32.c b/drivers/scsi/nsp32.c
index e44b1a0f67099..d5aa96f05bce4 100644
--- a/drivers/scsi/nsp32.c
+++ b/drivers/scsi/nsp32.c
@@ -309,6 +309,7 @@ static struct scsi_host_template nsp32_template = {
 
 #define NSP32_DEBUG_BUF_LEN		100
 
+__printf(4, 5)
 static void nsp32_message(const char *func, int line, char *type, char *fmt, ...)
 {
 	va_list args;
-- 
2.27.0


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

* [PATCH 3/8] scsi: nsp32: Remove or exclude unused variables
  2021-03-17  9:11 [PATCH 0/8] [Set 3 v2] Rid W=1 warnings in SCSI Lee Jones
  2021-03-17  9:11 ` [PATCH 1/8] scsi: BusLogic: Supply __printf(x, y) formatting for blogic_msg() Lee Jones
  2021-03-17  9:11 ` [PATCH 2/8] scsi: nsp32: Supply __printf(x, y) formatting for nsp32_message() Lee Jones
@ 2021-03-17  9:11 ` Lee Jones
  2021-03-17  9:11 ` [PATCH 4/8] scsi: FlashPoint: Remove unused variable 'TID' from 'FlashPoint_AbortCCB()' Lee Jones
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 12+ messages in thread
From: Lee Jones @ 2021-03-17  9:11 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, GOTO Masanori, YOKOTA Hiroshi,
	James E.J. Bottomley, Martin K. Petersen, gotom, linux-scsi

Fixes the following W=1 kernel build warning(s):

 drivers/scsi/nsp32.c: In function ‘nsp32_selection_autoscsi’:
 drivers/scsi/nsp32.c:584:17: warning: variable ‘execph’ set but not used [-Wunused-but-set-variable]
 drivers/scsi/nsp32.c: In function ‘nsp32_msgout_occur’:
 drivers/scsi/nsp32.c:1785:7: warning: variable ‘new_sgtp’ set but not used [-Wunused-but-set-variable]
 drivers/scsi/nsp32.c: In function ‘nsp32_analyze_sdtr’:
 drivers/scsi/nsp32.c:2227:20: warning: variable ‘syncnum’ set but not used [-Wunused-but-set-variable]
 drivers/scsi/nsp32.c:2223:20: warning: variable ‘synct’ set but not used [-Wunused-but-set-variable]
 drivers/scsi/nsp32.c: In function ‘nsp32_do_bus_reset’:
 drivers/scsi/nsp32.c:2841:17: warning: variable ‘intrdat’ set but not used [-Wunused-but-set-variable]
 drivers/scsi/nsp32.c: In function ‘nsp32_getprom_param’:
 drivers/scsi/nsp32.c:2912:11: warning: variable ‘val’ set but not used [-Wunused-but-set-variable]

Cc: GOTO Masanori <gotom@debian.or.jp>
Cc: YOKOTA Hiroshi <yokota@netlab.is.tsukuba.ac.jp>
Cc: "James E.J. Bottomley" <jejb@linux.ibm.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: gotom@debian.org
Cc: linux-scsi@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/scsi/nsp32.c | 23 ++++-------------------
 1 file changed, 4 insertions(+), 19 deletions(-)

diff --git a/drivers/scsi/nsp32.c b/drivers/scsi/nsp32.c
index d5aa96f05bce4..54abda4d07c64 100644
--- a/drivers/scsi/nsp32.c
+++ b/drivers/scsi/nsp32.c
@@ -581,7 +581,6 @@ static int nsp32_selection_autoscsi(struct scsi_cmnd *SCpnt)
 	int		status;
 	unsigned short	command	= 0;
 	unsigned int	msgout  = 0;
-	unsigned short	execph;
 	int		i;
 
 	nsp32_dbg(NSP32_DEBUG_AUTOSCSI, "in");
@@ -605,7 +604,7 @@ static int nsp32_selection_autoscsi(struct scsi_cmnd *SCpnt)
 	/*
 	 * clear execph
 	 */
-	execph = nsp32_read2(base, SCSI_EXECUTE_PHASE);
+	nsp32_read2(base, SCSI_EXECUTE_PHASE);
 
 	/*
 	 * clear FIFO counter to set CDBs
@@ -1781,8 +1780,6 @@ static void nsp32_msgout_occur(struct scsi_cmnd *SCpnt)
 {
 	nsp32_hw_data *data = (nsp32_hw_data *)SCpnt->device->host->hostdata;
 	unsigned int base   = SCpnt->device->host->io_port;
-	//unsigned short command;
-	long new_sgtp;
 	int i;
 	
 	nsp32_dbg(NSP32_DEBUG_MSGOUTOCCUR,
@@ -1796,14 +1793,6 @@ static void nsp32_msgout_occur(struct scsi_cmnd *SCpnt)
 		nsp32_build_nop(SCpnt);
 	}
 
-	/*
-	 * Set SGTP ADDR current entry for restarting AUTOSCSI, 
-	 * because SGTP is incremented next point.
-	 * There is few statement in the specification...
-	 */
- 	new_sgtp = data->cur_lunt->sglun_paddr + 
-		   (data->cur_lunt->cur_entry * sizeof(nsp32_sgtable));
-
 	/*
 	 * send messages
 	 */
@@ -2220,17 +2209,12 @@ static void nsp32_analyze_sdtr(struct scsi_cmnd *SCpnt)
 {
 	nsp32_hw_data   *data = (nsp32_hw_data *)SCpnt->device->host->hostdata;
 	nsp32_target     *target     = data->cur_target;
-	nsp32_sync_table *synct;
 	unsigned char     get_period = data->msginbuf[3];
 	unsigned char     get_offset = data->msginbuf[4];
 	int               entry;
-	int               syncnum;
 
 	nsp32_dbg(NSP32_DEBUG_MSGINOCCUR, "enter");
 
-	synct   = data->synct;
-	syncnum = data->syncnum;
-
 	/*
 	 * If this inititor sent the SDTR message, then target responds SDTR,
 	 * initiator SYNCREG, ACKWIDTH from SDTR parameter.
@@ -2838,8 +2822,8 @@ static int nsp32_eh_abort(struct scsi_cmnd *SCpnt)
 static void nsp32_do_bus_reset(nsp32_hw_data *data)
 {
 	unsigned int   base = data->BaseAddress;
-	unsigned short intrdat;
 	int i;
+	unsigned short __maybe_unused intrdat;
 
 	nsp32_dbg(NSP32_DEBUG_BUSRESET, "in");
 
@@ -2909,7 +2893,8 @@ static int nsp32_getprom_param(nsp32_hw_data *data)
 {
 	int vendor = data->pci_devid->vendor;
 	int device = data->pci_devid->device;
-	int ret, val, i;
+	int ret, i;
+	int __maybe_unused val;
 
 	/*
 	 * EEPROM checking.
-- 
2.27.0


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

* [PATCH 4/8] scsi: FlashPoint: Remove unused variable 'TID' from 'FlashPoint_AbortCCB()'
  2021-03-17  9:11 [PATCH 0/8] [Set 3 v2] Rid W=1 warnings in SCSI Lee Jones
                   ` (2 preceding siblings ...)
  2021-03-17  9:11 ` [PATCH 3/8] scsi: nsp32: Remove or exclude unused variables Lee Jones
@ 2021-03-17  9:11 ` Lee Jones
  2021-03-17 17:02   ` Khalid Aziz
  2021-03-17  9:11 ` [PATCH 5/8] scsi: sim710: Remove unused variable 'err' from sim710_init() Lee Jones
                   ` (4 subsequent siblings)
  8 siblings, 1 reply; 12+ messages in thread
From: Lee Jones @ 2021-03-17  9:11 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Khalid Aziz, James E.J. Bottomley,
	Martin K. Petersen, linux-scsi

Fixes the following W=1 kernel build warning(s):

 drivers/scsi/FlashPoint.c: In function ‘FlashPoint_AbortCCB’:
 drivers/scsi/FlashPoint.c:1618:16: warning: variable ‘TID’ set but not used [-Wunused-but-set-variable]

Cc: Khalid Aziz <khalid@gonehiking.org>
Cc: "James E.J. Bottomley" <jejb@linux.ibm.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: linux-scsi@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/scsi/FlashPoint.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/scsi/FlashPoint.c b/drivers/scsi/FlashPoint.c
index f479c542e787c..0464e37c806a4 100644
--- a/drivers/scsi/FlashPoint.c
+++ b/drivers/scsi/FlashPoint.c
@@ -1615,7 +1615,6 @@ static int FlashPoint_AbortCCB(void *pCurrCard, struct sccb *p_Sccb)
 
 	unsigned char thisCard;
 	CALL_BK_FN callback;
-	unsigned char TID;
 	struct sccb *pSaveSCCB;
 	struct sccb_mgr_tar_info *currTar_Info;
 
@@ -1652,9 +1651,6 @@ static int FlashPoint_AbortCCB(void *pCurrCard, struct sccb *p_Sccb)
 			}
 
 			else {
-
-				TID = p_Sccb->TargID;
-
 				if (p_Sccb->Sccb_tag) {
 					MDISABLE_INT(ioport);
 					if (((struct sccb_card *)pCurrCard)->
-- 
2.27.0


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

* [PATCH 5/8] scsi: sim710: Remove unused variable 'err' from sim710_init()
  2021-03-17  9:11 [PATCH 0/8] [Set 3 v2] Rid W=1 warnings in SCSI Lee Jones
                   ` (3 preceding siblings ...)
  2021-03-17  9:11 ` [PATCH 4/8] scsi: FlashPoint: Remove unused variable 'TID' from 'FlashPoint_AbortCCB()' Lee Jones
@ 2021-03-17  9:11 ` Lee Jones
  2021-03-17  9:11 ` [PATCH 6/8] scsi: isci: remote_device: Make local function isci_remote_device_wait_for_resume_from_abort() static Lee Jones
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 12+ messages in thread
From: Lee Jones @ 2021-03-17  9:11 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, James E.J. Bottomley, Martin K. Petersen,
	Richard Hirst, c by, linux-scsi

Take the opportunity to rework the comment a little.

Fixes the following W=1 kernel build warning(s):

 drivers/scsi/sim710.c: In function ‘sim710_init’:
 drivers/scsi/sim710.c:216:6: warning: variable ‘err’ set but not used [-Wunused-but-set-variable]

Cc: "James E.J. Bottomley" <jejb@linux.ibm.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: Richard Hirst <richard@sleepie.demon.co.uk>
Cc: c by <James.Bottomley@SteelEye.com>
Cc: linux-scsi@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/scsi/sim710.c | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/drivers/scsi/sim710.c b/drivers/scsi/sim710.c
index 22302612e032b..e519df68d603d 100644
--- a/drivers/scsi/sim710.c
+++ b/drivers/scsi/sim710.c
@@ -213,21 +213,19 @@ static struct eisa_driver sim710_eisa_driver = {
 
 static int __init sim710_init(void)
 {
-	int err = -ENODEV;
-
 #ifdef MODULE
 	if (sim710)
 		param_setup(sim710);
 #endif
 
 #ifdef CONFIG_EISA
-	err = eisa_driver_register(&sim710_eisa_driver);
+	/*
+	 * FIXME: We'd really like to return -ENODEV if no devices have actually
+	 * been found.  However eisa_driver_register() only reports problems
+	 * with kobject_register() so simply return success for now.
+	 */
+	eisa_driver_register(&sim710_eisa_driver);
 #endif
-	/* FIXME: what we'd really like to return here is -ENODEV if
-	 * no devices have actually been found.  Instead, the err
-	 * above actually only reports problems with kobject_register,
-	 * so for the moment return success */
-
 	return 0;
 }
 
-- 
2.27.0


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

* [PATCH 6/8] scsi: isci: remote_device: Make local function isci_remote_device_wait_for_resume_from_abort() static
  2021-03-17  9:11 [PATCH 0/8] [Set 3 v2] Rid W=1 warnings in SCSI Lee Jones
                   ` (4 preceding siblings ...)
  2021-03-17  9:11 ` [PATCH 5/8] scsi: sim710: Remove unused variable 'err' from sim710_init() Lee Jones
@ 2021-03-17  9:11 ` Lee Jones
  2021-03-17  9:11 ` [PATCH 7/8] scsi: isci: port: Make local function 'port_state_name()' static Lee Jones
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 12+ messages in thread
From: Lee Jones @ 2021-03-17  9:11 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Artur Paszkiewicz, James E.J. Bottomley,
	Martin K. Petersen, linux-scsi

Fixes the following W=1 kernel build warning(s):

 drivers/scsi/isci/remote_device.c:1387:6: warning: no previous prototype for ‘isci_remote_device_wait_for_resume_from_abort’ [-Wmissing-prototypes]

Cc: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Cc: "James E.J. Bottomley" <jejb@linux.ibm.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: linux-scsi@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/scsi/isci/remote_device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/isci/remote_device.c b/drivers/scsi/isci/remote_device.c
index c3f540b556895..b1276f7e49c89 100644
--- a/drivers/scsi/isci/remote_device.c
+++ b/drivers/scsi/isci/remote_device.c
@@ -1384,7 +1384,7 @@ static bool isci_remote_device_test_resume_done(
 	return done;
 }
 
-void isci_remote_device_wait_for_resume_from_abort(
+static void isci_remote_device_wait_for_resume_from_abort(
 	struct isci_host *ihost,
 	struct isci_remote_device *idev)
 {
-- 
2.27.0


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

* [PATCH 7/8] scsi: isci: port: Make local function 'port_state_name()' static
  2021-03-17  9:11 [PATCH 0/8] [Set 3 v2] Rid W=1 warnings in SCSI Lee Jones
                   ` (5 preceding siblings ...)
  2021-03-17  9:11 ` [PATCH 6/8] scsi: isci: remote_device: Make local function isci_remote_device_wait_for_resume_from_abort() static Lee Jones
@ 2021-03-17  9:11 ` Lee Jones
  2021-03-17  9:11 ` [PATCH 8/8] scsi: nsp32: Correct expected types in debug print formatting Lee Jones
  2021-03-19  2:58 ` [PATCH 0/8] [Set 3 v2] Rid W=1 warnings in SCSI Martin K. Petersen
  8 siblings, 0 replies; 12+ messages in thread
From: Lee Jones @ 2021-03-17  9:11 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Artur Paszkiewicz, James E.J. Bottomley,
	Martin K. Petersen, linux-scsi

Fixes the following W=1 kernel build warning(s):

 drivers/scsi/isci/port.c:65:13: warning: no previous prototype for ‘port_state_name’ [-Wmissing-prototypes]

Cc: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Cc: "James E.J. Bottomley" <jejb@linux.ibm.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: linux-scsi@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/scsi/isci/port.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/isci/port.c b/drivers/scsi/isci/port.c
index 448a8c31ba359..5a362ba76d63f 100644
--- a/drivers/scsi/isci/port.c
+++ b/drivers/scsi/isci/port.c
@@ -62,7 +62,7 @@
 
 #undef C
 #define C(a) (#a)
-const char *port_state_name(enum sci_port_states state)
+static const char *port_state_name(enum sci_port_states state)
 {
 	static const char * const strings[] = PORT_STATES;
 
-- 
2.27.0


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

* [PATCH 8/8] scsi: nsp32: Correct expected types in debug print formatting
  2021-03-17  9:11 [PATCH 0/8] [Set 3 v2] Rid W=1 warnings in SCSI Lee Jones
                   ` (6 preceding siblings ...)
  2021-03-17  9:11 ` [PATCH 7/8] scsi: isci: port: Make local function 'port_state_name()' static Lee Jones
@ 2021-03-17  9:11 ` Lee Jones
  2021-03-19  2:58 ` [PATCH 0/8] [Set 3 v2] Rid W=1 warnings in SCSI Martin K. Petersen
  8 siblings, 0 replies; 12+ messages in thread
From: Lee Jones @ 2021-03-17  9:11 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, GOTO Masanori, YOKOTA Hiroshi,
	James E.J. Bottomley, Martin K. Petersen, gotom, linux-scsi

Fixes the following W=1 kernel build warning(s):

 drivers/scsi/nsp32.c: In function ‘nsp32_setup_sg_table’:
 drivers/scsi/nsp32.c:879:6: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 5 has type ‘unsigned int’ [-Wformat=]
 drivers/scsi/nsp32.c:280:69: note: in definition of macro ‘nsp32_msg’
 drivers/scsi/nsp32.c:879:52: note: format string is defined here
 drivers/scsi/nsp32.c: In function ‘nsp32_detect’:
 drivers/scsi/nsp32.c:2719:6: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 5 has type ‘int’ [-Wformat=]
 drivers/scsi/nsp32.c:280:69: note: in definition of macro ‘nsp32_msg’
 drivers/scsi/nsp32.c:2719:22: note: format string is defined here
 drivers/scsi/nsp32.c:2719:6: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 6 has type ‘int’ [-Wformat=]
 drivers/scsi/nsp32.c:280:69: note: in definition of macro ‘nsp32_msg’
 drivers/scsi/nsp32.c:2719:28: note: format string is defined here
 drivers/scsi/nsp32.c: In function ‘nsp32_suspend’:
 drivers/scsi/nsp32.c:3267:23: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 6 has type ‘pm_message_t’ {aka ‘struct pm_message’} [-Wformat=]
 drivers/scsi/nsp32.c:280:69: note: in definition of macro ‘nsp32_msg’
 drivers/scsi/nsp32.c:3267:56: note: format string is defined here

Cc: GOTO Masanori <gotom@debian.or.jp>
Cc: YOKOTA Hiroshi <yokota@netlab.is.tsukuba.ac.jp>
Cc: "James E.J. Bottomley" <jejb@linux.ibm.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: gotom@debian.org
Cc: linux-scsi@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/scsi/nsp32.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/scsi/nsp32.c b/drivers/scsi/nsp32.c
index 54abda4d07c64..134bbd2d8b667 100644
--- a/drivers/scsi/nsp32.c
+++ b/drivers/scsi/nsp32.c
@@ -876,7 +876,7 @@ static int nsp32_setup_sg_table(struct scsi_cmnd *SCpnt)
 
 			if (le32_to_cpu(sgt[i].len) > 0x10000) {
 				nsp32_msg(KERN_ERR,
-					"can't transfer over 64KB at a time, size=0x%lx", le32_to_cpu(sgt[i].len));
+					"can't transfer over 64KB at a time, size=0x%x", le32_to_cpu(sgt[i].len));
 				return FALSE;
 			}
 			nsp32_dbg(NSP32_DEBUG_SGLIST,
@@ -2716,7 +2716,7 @@ static int nsp32_detect(struct pci_dev *pdev)
 	res = request_region(host->io_port, host->n_io_port, "nsp32");
 	if (res == NULL) {
 		nsp32_msg(KERN_ERR, 
-			  "I/O region 0x%lx+0x%lx is already used",
+			  "I/O region 0x%x+0x%x is already used",
 			  data->BaseAddress, data->NumAddress);
 		goto free_irq;
         }
@@ -3264,7 +3264,8 @@ static int nsp32_suspend(struct pci_dev *pdev, pm_message_t state)
 {
 	struct Scsi_Host *host = pci_get_drvdata(pdev);
 
-	nsp32_msg(KERN_INFO, "pci-suspend: pdev=0x%p, state=%ld, slot=%s, host=0x%p", pdev, state, pci_name(pdev), host);
+	nsp32_msg(KERN_INFO, "pci-suspend: pdev=0x%p, state.event=%x, slot=%s, host=0x%p",
+		  pdev, state.event, pci_name(pdev), host);
 
 	pci_save_state     (pdev);
 	pci_disable_device (pdev);
-- 
2.27.0


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

* Re: [PATCH 1/8] scsi: BusLogic: Supply __printf(x, y) formatting for blogic_msg()
  2021-03-17  9:11 ` [PATCH 1/8] scsi: BusLogic: Supply __printf(x, y) formatting for blogic_msg() Lee Jones
@ 2021-03-17 17:01   ` Khalid Aziz
  0 siblings, 0 replies; 12+ messages in thread
From: Khalid Aziz @ 2021-03-17 17:01 UTC (permalink / raw)
  To: Lee Jones
  Cc: linux-kernel, James E.J. Bottomley, Martin K. Petersen, linux-scsi

On 3/17/21 3:11 AM, Lee Jones wrote:
> Fixes the following W=1 kernel build warning(s):
> 
>  In file included from drivers/scsi/BusLogic.c:51:
>  drivers/scsi/BusLogic.c: In function ‘blogic_msg’:
>  drivers/scsi/BusLogic.c:3591:2: warning: function ‘blogic_msg’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format]
> 
> Cc: Khalid Aziz <khalid@gonehiking.org>
> Cc: "James E.J. Bottomley" <jejb@linux.ibm.com>
> Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
> Cc: "Leonard N. Zubkoff" <lnz@dandelion.com>
> Cc: linux-scsi@vger.kernel.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
>  drivers/scsi/BusLogic.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/scsi/BusLogic.c b/drivers/scsi/BusLogic.c
> index ccb061ab0a0ad..0ac3f713fc212 100644
> --- a/drivers/scsi/BusLogic.c
> +++ b/drivers/scsi/BusLogic.c
> @@ -3578,7 +3578,7 @@ Target	Requested Completed  Requested Completed  Requested Completed\n\
>  /*
>    blogic_msg prints Driver Messages.
>  */
> -
> +__printf(2, 4)
>  static void blogic_msg(enum blogic_msglevel msglevel, char *fmt,
>  			struct blogic_adapter *adapter, ...)
>  {
> 

Acked-by: Khalid Aziz <khalid@gonehiking.org>

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

* Re: [PATCH 4/8] scsi: FlashPoint: Remove unused variable 'TID' from 'FlashPoint_AbortCCB()'
  2021-03-17  9:11 ` [PATCH 4/8] scsi: FlashPoint: Remove unused variable 'TID' from 'FlashPoint_AbortCCB()' Lee Jones
@ 2021-03-17 17:02   ` Khalid Aziz
  0 siblings, 0 replies; 12+ messages in thread
From: Khalid Aziz @ 2021-03-17 17:02 UTC (permalink / raw)
  To: Lee Jones
  Cc: linux-kernel, James E.J. Bottomley, Martin K. Petersen, linux-scsi

On 3/17/21 3:11 AM, Lee Jones wrote:
> Fixes the following W=1 kernel build warning(s):
> 
>  drivers/scsi/FlashPoint.c: In function ‘FlashPoint_AbortCCB’:
>  drivers/scsi/FlashPoint.c:1618:16: warning: variable ‘TID’ set but not used [-Wunused-but-set-variable]
> 
> Cc: Khalid Aziz <khalid@gonehiking.org>
> Cc: "James E.J. Bottomley" <jejb@linux.ibm.com>
> Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
> Cc: linux-scsi@vger.kernel.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
>  drivers/scsi/FlashPoint.c | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/drivers/scsi/FlashPoint.c b/drivers/scsi/FlashPoint.c
> index f479c542e787c..0464e37c806a4 100644
> --- a/drivers/scsi/FlashPoint.c
> +++ b/drivers/scsi/FlashPoint.c
> @@ -1615,7 +1615,6 @@ static int FlashPoint_AbortCCB(void *pCurrCard, struct sccb *p_Sccb)
>  
>  	unsigned char thisCard;
>  	CALL_BK_FN callback;
> -	unsigned char TID;
>  	struct sccb *pSaveSCCB;
>  	struct sccb_mgr_tar_info *currTar_Info;
>  
> @@ -1652,9 +1651,6 @@ static int FlashPoint_AbortCCB(void *pCurrCard, struct sccb *p_Sccb)
>  			}
>  
>  			else {
> -
> -				TID = p_Sccb->TargID;
> -
>  				if (p_Sccb->Sccb_tag) {
>  					MDISABLE_INT(ioport);
>  					if (((struct sccb_card *)pCurrCard)->
> 

Acked-by: Khalid Aziz <khalid@gonehiking.org>

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

* Re: [PATCH 0/8] [Set 3 v2] Rid W=1 warnings in SCSI
  2021-03-17  9:11 [PATCH 0/8] [Set 3 v2] Rid W=1 warnings in SCSI Lee Jones
                   ` (7 preceding siblings ...)
  2021-03-17  9:11 ` [PATCH 8/8] scsi: nsp32: Correct expected types in debug print formatting Lee Jones
@ 2021-03-19  2:58 ` Martin K. Petersen
  8 siblings, 0 replies; 12+ messages in thread
From: Martin K. Petersen @ 2021-03-19  2:58 UTC (permalink / raw)
  To: Lee Jones
  Cc: linux-kernel, Artur Paszkiewicz, c by, GOTO Masanori, gotom,
	James E.J. Bottomley, Khalid Aziz, Leonard N. Zubkoff,
	linux-scsi, Martin K. Petersen, Richard Hirst, YOKOTA Hiroshi


Lee,

> This set contains functional changes.
>
> This set is part of a larger effort attempting to clean-up W=1
> kernel builds, which are currently overwhelmingly riddled with
> niggly little warnings.

Applied to 5.13/scsi-staging, thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering

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

end of thread, other threads:[~2021-03-19  3:01 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-17  9:11 [PATCH 0/8] [Set 3 v2] Rid W=1 warnings in SCSI Lee Jones
2021-03-17  9:11 ` [PATCH 1/8] scsi: BusLogic: Supply __printf(x, y) formatting for blogic_msg() Lee Jones
2021-03-17 17:01   ` Khalid Aziz
2021-03-17  9:11 ` [PATCH 2/8] scsi: nsp32: Supply __printf(x, y) formatting for nsp32_message() Lee Jones
2021-03-17  9:11 ` [PATCH 3/8] scsi: nsp32: Remove or exclude unused variables Lee Jones
2021-03-17  9:11 ` [PATCH 4/8] scsi: FlashPoint: Remove unused variable 'TID' from 'FlashPoint_AbortCCB()' Lee Jones
2021-03-17 17:02   ` Khalid Aziz
2021-03-17  9:11 ` [PATCH 5/8] scsi: sim710: Remove unused variable 'err' from sim710_init() Lee Jones
2021-03-17  9:11 ` [PATCH 6/8] scsi: isci: remote_device: Make local function isci_remote_device_wait_for_resume_from_abort() static Lee Jones
2021-03-17  9:11 ` [PATCH 7/8] scsi: isci: port: Make local function 'port_state_name()' static Lee Jones
2021-03-17  9:11 ` [PATCH 8/8] scsi: nsp32: Correct expected types in debug print formatting Lee Jones
2021-03-19  2:58 ` [PATCH 0/8] [Set 3 v2] Rid W=1 warnings in SCSI Martin K. Petersen

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.