linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/10] Fix a bunch SCSI related W=1 warnings
@ 2020-07-07 14:00 Lee Jones
  2020-07-07 14:00 ` [PATCH 01/10] scsi: megaraid: megaraid_mm: Strip excess function param description Lee Jones
                   ` (11 more replies)
  0 siblings, 12 replies; 22+ messages in thread
From: Lee Jones @ 2020-07-07 14:00 UTC (permalink / raw)
  To: jejb, martin.petersen; +Cc: linux-kernel, linux-scsi, Lee Jones

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.

There are a whole lot more of these.  More fixes to follow.

Lee Jones (10):
  scsi: megaraid: megaraid_mm: Strip excess function param description
  scsi: megaraid: megaraid_mbox: Fix some kerneldoc bitrot
  scsi: fdomain: Mark 'fdomain_pm_ops' as __maybe_unused
  scsi: megaraid: megaraid_sas_fusion: Fix-up a whole myriad of
    kerneldoc misdemeanours
  scsi: megaraid: megaraid_sas_base: Provide prototypes for non-static
    functions
  scsi: aha152x: Remove unused variable 'ret'
  scsi: pcmcia: nsp_cs: Use new __printf() format notation
  scsi: pcmcia: nsp_cs: Remove unused variable 'dummy'
  scsi: libfc: fc_disc: Fix-up some incorrectly referenced function
    parameters
  scsi: megaraid: megaraid_sas: Convert forward-declarations to
    prototypes

 drivers/scsi/aha152x.c                      |   3 +-
 drivers/scsi/fdomain.h                      |   2 +-
 drivers/scsi/libfc/fc_disc.c                |   6 +-
 drivers/scsi/megaraid/megaraid_mbox.c       |   4 +-
 drivers/scsi/megaraid/megaraid_mm.c         |   1 -
 drivers/scsi/megaraid/megaraid_sas.h        |  25 ++++-
 drivers/scsi/megaraid/megaraid_sas_base.c   |   4 -
 drivers/scsi/megaraid/megaraid_sas_fusion.c | 102 ++++++++------------
 drivers/scsi/megaraid/megaraid_sas_fusion.h |   6 ++
 drivers/scsi/pcmcia/nsp_cs.c                |   5 +-
 10 files changed, 81 insertions(+), 77 deletions(-)

-- 
2.25.1


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

* [PATCH 01/10] scsi: megaraid: megaraid_mm: Strip excess function param description
  2020-07-07 14:00 [PATCH 00/10] Fix a bunch SCSI related W=1 warnings Lee Jones
@ 2020-07-07 14:00 ` Lee Jones
  2020-07-07 14:00 ` [PATCH 02/10] scsi: megaraid: megaraid_mbox: Fix some kerneldoc bitrot Lee Jones
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 22+ messages in thread
From: Lee Jones @ 2020-07-07 14:00 UTC (permalink / raw)
  To: jejb, martin.petersen
  Cc: linux-kernel, linux-scsi, Lee Jones, Kashyap Desai, Sumit Saxena,
	Shivasharan S, megaraidlinux.pdl

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

 drivers/scsi/megaraid/megaraid_mm.c:105: warning: Excess function parameter 'inode' description in 'mraid_mm_ioctl'

Cc: Kashyap Desai <kashyap.desai@broadcom.com>
Cc: Sumit Saxena <sumit.saxena@broadcom.com>
Cc: Shivasharan S <shivasharan.srikanteshwara@broadcom.com>
Cc: megaraidlinux.pdl@broadcom.com
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/scsi/megaraid/megaraid_mm.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/scsi/megaraid/megaraid_mm.c b/drivers/scsi/megaraid/megaraid_mm.c
index e83163c668845..8df53446641ac 100644
--- a/drivers/scsi/megaraid/megaraid_mm.c
+++ b/drivers/scsi/megaraid/megaraid_mm.c
@@ -95,7 +95,6 @@ mraid_mm_open(struct inode *inode, struct file *filep)
 
 /**
  * mraid_mm_ioctl - module entry-point for ioctls
- * @inode	: inode (ignored)
  * @filep	: file operations pointer (ignored)
  * @cmd		: ioctl command
  * @arg		: user ioctl packet
-- 
2.25.1


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

* [PATCH 02/10] scsi: megaraid: megaraid_mbox: Fix some kerneldoc bitrot
  2020-07-07 14:00 [PATCH 00/10] Fix a bunch SCSI related W=1 warnings Lee Jones
  2020-07-07 14:00 ` [PATCH 01/10] scsi: megaraid: megaraid_mm: Strip excess function param description Lee Jones
@ 2020-07-07 14:00 ` Lee Jones
  2020-07-07 14:00 ` [PATCH 03/10] scsi: fdomain: Mark 'fdomain_pm_ops' as __maybe_unused Lee Jones
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 22+ messages in thread
From: Lee Jones @ 2020-07-07 14:00 UTC (permalink / raw)
  To: jejb, martin.petersen
  Cc: linux-kernel, linux-scsi, Lee Jones, Kashyap Desai, Sumit Saxena,
	Shivasharan S, Atul Mukker, Sreenivas Bagalkote, Manoj Jose,
	megaraidlinux, megaraidlinux.pdl

Some function parameters have changed without updating the documentation.

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

 drivers/scsi/megaraid/megaraid_mbox.c:3314: warning: Excess function parameter 'level' description in 'megaraid_mbox_display_scb'
 drivers/scsi/megaraid/megaraid_mbox.c:3985: warning: Function parameter or member 'dev' not described in 'megaraid_sysfs_show_app_hndl'
 drivers/scsi/megaraid/megaraid_mbox.c:3985: warning: Function parameter or member 'attr' not described in 'megaraid_sysfs_show_app_hndl'
 drivers/scsi/megaraid/megaraid_mbox.c:3985: warning: Excess function parameter 'cdev' description in 'megaraid_sysfs_show_app_hndl'

Cc: Kashyap Desai <kashyap.desai@broadcom.com>
Cc: Sumit Saxena <sumit.saxena@broadcom.com>
Cc: Shivasharan S <shivasharan.srikanteshwara@broadcom.com>
Cc: Atul Mukker <Atul.Mukker@lsi.com>
Cc: Sreenivas Bagalkote <Sreenivas.Bagalkote@lsi.com>
Cc: Manoj Jose <Manoj.Jose@lsi.com>
Cc: megaraidlinux@lsi.com
Cc: megaraidlinux.pdl@broadcom.com
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/scsi/megaraid/megaraid_mbox.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/megaraid/megaraid_mbox.c b/drivers/scsi/megaraid/megaraid_mbox.c
index 8f918df631bfe..cace28dd81ad8 100644
--- a/drivers/scsi/megaraid/megaraid_mbox.c
+++ b/drivers/scsi/megaraid/megaraid_mbox.c
@@ -3304,7 +3304,6 @@ megaraid_mbox_fire_sync_cmd(adapter_t *adapter)
  * megaraid_mbox_display_scb - display SCB information, mostly debug purposes
  * @adapter		: controller's soft state
  * @scb			: SCB to be displayed
- * @level		: debug level for console print
  *
  * Diplay information about the given SCB iff the current debug level is
  * verbose.
@@ -3972,7 +3971,8 @@ megaraid_sysfs_get_ldmap(adapter_t *adapter)
 
 /**
  * megaraid_sysfs_show_app_hndl - display application handle for this adapter
- * @cdev	: class device object representation for the host
+ * @dev		: device object representation for the host
+ * @attr	: unused
  * @buf		: buffer to send data to
  *
  * Display the handle used by the applications while executing management
-- 
2.25.1


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

* [PATCH 03/10] scsi: fdomain: Mark 'fdomain_pm_ops' as __maybe_unused
  2020-07-07 14:00 [PATCH 00/10] Fix a bunch SCSI related W=1 warnings Lee Jones
  2020-07-07 14:00 ` [PATCH 01/10] scsi: megaraid: megaraid_mm: Strip excess function param description Lee Jones
  2020-07-07 14:00 ` [PATCH 02/10] scsi: megaraid: megaraid_mbox: Fix some kerneldoc bitrot Lee Jones
@ 2020-07-07 14:00 ` Lee Jones
  2020-07-07 14:00 ` [PATCH 04/10] scsi: megaraid: megaraid_sas_fusion: Fix-up a whole myriad of kerneldoc misdemeanours Lee Jones
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 22+ messages in thread
From: Lee Jones @ 2020-07-07 14:00 UTC (permalink / raw)
  To: jejb, martin.petersen; +Cc: linux-kernel, linux-scsi, Lee Jones

Not all source files which include 'fdomain.h' make use of 'fdomain_pm_ops'
leaving them defined but unused.  Mark it as __maybe_unused to tell the
compiler this is not only acceptable, but expected.

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

 In file included from drivers/scsi/pcmcia/fdomain_cs.c:16:
 drivers/scsi/fdomain.h:106:32: warning: ‘fdomain_pm_ops’ defined but not used [-Wunused-const-variable=]
 106 | static const struct dev_pm_ops fdomain_pm_ops;
 | ^~~~~~~~~~~~~~

Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/scsi/fdomain.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/fdomain.h b/drivers/scsi/fdomain.h
index 6f63fc6b0d127..93afcee207aed 100644
--- a/drivers/scsi/fdomain.h
+++ b/drivers/scsi/fdomain.h
@@ -103,7 +103,7 @@ enum {
 #define REG_FIFO_COUNT		14	/* R: FIFO Data Count */
 
 #ifdef CONFIG_PM_SLEEP
-static const struct dev_pm_ops fdomain_pm_ops;
+static const struct dev_pm_ops __maybe_unused fdomain_pm_ops;
 #define FDOMAIN_PM_OPS	(&fdomain_pm_ops)
 #else
 #define FDOMAIN_PM_OPS	NULL
-- 
2.25.1


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

* [PATCH 04/10] scsi: megaraid: megaraid_sas_fusion: Fix-up a whole myriad of kerneldoc misdemeanours
  2020-07-07 14:00 [PATCH 00/10] Fix a bunch SCSI related W=1 warnings Lee Jones
                   ` (2 preceding siblings ...)
  2020-07-07 14:00 ` [PATCH 03/10] scsi: fdomain: Mark 'fdomain_pm_ops' as __maybe_unused Lee Jones
@ 2020-07-07 14:00 ` Lee Jones
  2020-07-07 14:00 ` [PATCH 05/10] scsi: megaraid: megaraid_sas_base: Provide prototypes for non-static functions Lee Jones
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 22+ messages in thread
From: Lee Jones @ 2020-07-07 14:00 UTC (permalink / raw)
  To: jejb, martin.petersen
  Cc: linux-kernel, linux-scsi, Lee Jones, Kashyap Desai, Sumit Saxena,
	Shivasharan S, megaraidlinux.pdl

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

 drivers/scsi/megaraid/megaraid_sas_fusion.c:106: warning: Function parameter or member 'instance' not described in 'megasas_adp_reset_wait_for_ready'
 drivers/scsi/megaraid/megaraid_sas_fusion.c:106: warning: Function parameter or member 'do_adp_reset' not described in 'megasas_adp_reset_wait_for_ready'
 drivers/scsi/megaraid/megaraid_sas_fusion.c:106: warning: Function parameter or member 'ocr_context' not described in 'megasas_adp_reset_wait_for_ready'
 drivers/scsi/megaraid/megaraid_sas_fusion.c:159: warning: Function parameter or member 'instance' not described in 'megasas_check_same_4gb_region'
 drivers/scsi/megaraid/megaraid_sas_fusion.c:159: warning: Function parameter or member 'start_addr' not described in 'megasas_check_same_4gb_region'
 drivers/scsi/megaraid/megaraid_sas_fusion.c:159: warning: Function parameter or member 'size' not described in 'megasas_check_same_4gb_region'
 drivers/scsi/megaraid/megaraid_sas_fusion.c:181: warning: Function parameter or member 'instance' not described in 'megasas_enable_intr_fusion'
 drivers/scsi/megaraid/megaraid_sas_fusion.c:181: warning: Excess function parameter 'regs' description in 'megasas_enable_intr_fusion'
 drivers/scsi/megaraid/megaraid_sas_fusion.c:203: warning: Function parameter or member 'instance' not described in 'megasas_disable_intr_fusion'
 drivers/scsi/megaraid/megaraid_sas_fusion.c:203: warning: Excess function parameter 'regs' description in 'megasas_disable_intr_fusion'
 drivers/scsi/megaraid/megaraid_sas_fusion.c:246: warning: Function parameter or member 'blk_tag' not described in 'megasas_get_cmd_fusion'
 drivers/scsi/megaraid/megaraid_sas_fusion.c:323: warning: Function parameter or member 'fw_boot_context' not described in 'megasas_fusion_update_can_queue'
 drivers/scsi/megaraid/megaraid_sas_fusion.c:1025: warning: Function parameter or member 'seconds' not described in 'wait_and_poll'
 drivers/scsi/megaraid/megaraid_sas_fusion.c:1912: warning: Function parameter or member 'work' not described in 'megasas_fault_detect_work'
 drivers/scsi/megaraid/megaraid_sas_fusion.c:2001: warning: Function parameter or member 'fusion' not described in 'map_cmd_status'
 drivers/scsi/megaraid/megaraid_sas_fusion.c:2001: warning: Function parameter or member 'scmd' not described in 'map_cmd_status'
 drivers/scsi/megaraid/megaraid_sas_fusion.c:2001: warning: Function parameter or member 'data_length' not described in 'map_cmd_status'
 drivers/scsi/megaraid/megaraid_sas_fusion.c:2001: warning: Function parameter or member 'sense' not described in 'map_cmd_status'
 drivers/scsi/megaraid/megaraid_sas_fusion.c:2001: warning: Excess function parameter 'cmd' description in 'map_cmd_status'
 drivers/scsi/megaraid/megaraid_sas_fusion.c:2245: warning: Function parameter or member 'sge_count' not described in 'megasas_make_sgl_fusion'
 drivers/scsi/megaraid/megaraid_sas_fusion.c:2356: warning: Function parameter or member 'io_request' not described in 'megasas_set_pd_lba'
 drivers/scsi/megaraid/megaraid_sas_fusion.c:2356: warning: Function parameter or member 'io_info' not described in 'megasas_set_pd_lba'
 drivers/scsi/megaraid/megaraid_sas_fusion.c:2356: warning: Function parameter or member 'scp' not described in 'megasas_set_pd_lba'
 drivers/scsi/megaraid/megaraid_sas_fusion.c:2356: warning: Function parameter or member 'local_map_ptr' not described in 'megasas_set_pd_lba'
 drivers/scsi/megaraid/megaraid_sas_fusion.c:2356: warning: Function parameter or member 'ref_tag' not described in 'megasas_set_pd_lba'
 drivers/scsi/megaraid/megaraid_sas_fusion.c:2356: warning: Excess function parameter 'cdb' description in 'megasas_set_pd_lba'
 drivers/scsi/megaraid/megaraid_sas_fusion.c:2356: warning: Excess function parameter 'start_blk' description in 'megasas_set_pd_lba'
 drivers/scsi/megaraid/megaraid_sas_fusion.c:2617: warning: Function parameter or member 'fusion' not described in 'megasas_set_raidflag_cpu_affinity'
 drivers/scsi/megaraid/megaraid_sas_fusion.c:2617: warning: Function parameter or member 'scsi_buff_len' not described in 'megasas_set_raidflag_cpu_affinity'
 drivers/scsi/megaraid/megaraid_sas_fusion.c:2950: warning: Function parameter or member 'scmd' not described in 'megasas_build_ld_nonrw_fusion'
 drivers/scsi/megaraid/megaraid_sas_fusion.c:2950: warning: Excess function parameter 'scp' description in 'megasas_build_ld_nonrw_fusion'
 drivers/scsi/megaraid/megaraid_sas_fusion.c:3041: warning: Function parameter or member 'scmd' not described in 'megasas_build_syspd_fusion'
 drivers/scsi/megaraid/megaraid_sas_fusion.c:3041: warning: Excess function parameter 'scp' description in 'megasas_build_syspd_fusion'
 drivers/scsi/megaraid/megaraid_sas_fusion.c:3414: warning: Function parameter or member 'cmd' not described in 'megasas_complete_r1_command'
 drivers/scsi/megaraid/megaraid_sas_fusion.c:3414: warning: Excess function parameter 'cmd_fusion' description in 'megasas_complete_r1_command'
 drivers/scsi/megaraid/megaraid_sas_fusion.c:3467: warning: Function parameter or member 'MSIxIndex' not described in 'complete_cmd_fusion'
 drivers/scsi/megaraid/megaraid_sas_fusion.c:3467: warning: Function parameter or member 'irq_context' not described in 'complete_cmd_fusion'
 drivers/scsi/megaraid/megaraid_sas_fusion.c:3639: warning: Function parameter or member 'instance' not described in 'megasas_enable_irq_poll'
 drivers/scsi/megaraid/megaraid_sas_fusion.c:3656: warning: Function parameter or member 'instance_addr' not described in 'megasas_sync_irqs'
 drivers/scsi/megaraid/megaraid_sas_fusion.c:3656: warning: Excess function parameter 'instance' description in 'megasas_sync_irqs'
 drivers/scsi/megaraid/megaraid_sas_fusion.c:3715: warning: Function parameter or member 'instance_addr' not described in 'megasas_complete_cmd_dpc_fusion'
 drivers/scsi/megaraid/megaraid_sas_fusion.c:3715: warning: Excess function parameter 'instance' description in 'megasas_complete_cmd_dpc_fusion'
 drivers/scsi/megaraid/megaraid_sas_fusion.c:3734: warning: Function parameter or member 'irq' not described in 'megasas_isr_fusion'
 drivers/scsi/megaraid/megaraid_sas_fusion.c:3734: warning: Function parameter or member 'devp' not described in 'megasas_isr_fusion'
 drivers/scsi/megaraid/megaraid_sas_fusion.c:3772: warning: Function parameter or member 'mfi_cmd' not described in 'build_mpt_mfi_pass_thru'
 drivers/scsi/megaraid/megaraid_sas_fusion.c:3887: warning: Function parameter or member 'instance' not described in 'megasas_read_fw_status_reg_fusion'
 drivers/scsi/megaraid/megaraid_sas_fusion.c:3887: warning: Excess function parameter 'regs' description in 'megasas_read_fw_status_reg_fusion'
 drivers/scsi/megaraid/megaraid_sas_fusion.c:3937: warning: Function parameter or member 'instance' not described in 'megasas_adp_reset_fusion'
 drivers/scsi/megaraid/megaraid_sas_fusion.c:4014: warning: Function parameter or member 'instance' not described in 'megasas_check_reset_fusion'
 drivers/scsi/megaraid/megaraid_sas_fusion.c:4346: warning: Function parameter or member 'instance' not described in 'megasas_tm_response_code'
 drivers/scsi/megaraid/megaraid_sas_fusion.c:4346: warning: Excess function parameter 'ioc' description in 'megasas_tm_response_code'
 drivers/scsi/megaraid/megaraid_sas_fusion.c:4408: warning: Function parameter or member 'mr_device_priv_data' not described in 'megasas_issue_tm'
 drivers/scsi/megaraid/megaraid_sas_fusion.c:4408: warning: Excess function parameter 'm_type' description in 'megasas_issue_tm'

Cc: Kashyap Desai <kashyap.desai@broadcom.com>
Cc: Sumit Saxena <sumit.saxena@broadcom.com>
Cc: Shivasharan S <shivasharan.srikanteshwara@broadcom.com>
Cc: megaraidlinux.pdl@broadcom.com
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/scsi/megaraid/megaraid_sas_fusion.c | 73 ++++++++++++---------
 1 file changed, 41 insertions(+), 32 deletions(-)

diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c b/drivers/scsi/megaraid/megaraid_sas_fusion.c
index 319f241da4b66..a0cf55776361c 100644
--- a/drivers/scsi/megaraid/megaraid_sas_fusion.c
+++ b/drivers/scsi/megaraid/megaraid_sas_fusion.c
@@ -90,9 +90,9 @@ extern u32 megasas_readl(struct megasas_instance *instance,
 /**
  * megasas_adp_reset_wait_for_ready -	initiate chip reset and wait for
  *					controller to come to ready state
- * @instance -				adapter's soft state
- * @do_adp_reset -			If true, do a chip reset
- * @ocr_context -			If called from OCR context this will
+ * @instance:				adapter's soft state
+ * @do_adp_reset:			If true, do a chip reset
+ * @ocr_context:			If called from OCR context this will
  *					be set to 1, else 0
  *
  * This function initates a chip reset followed by a wait for controller to
@@ -146,10 +146,10 @@ megasas_adp_reset_wait_for_ready(struct megasas_instance *instance,
 /**
  * megasas_check_same_4gb_region -	check if allocation
  *					crosses same 4GB boundary or not
- * @instance -				adapter's soft instance
- * start_addr -			start address of DMA allocation
- * size -				size of allocation in bytes
- * return -				true : allocation does not cross same
+ * @instance:				adapter's soft instance
+ * @start_addr:			start address of DMA allocation
+ * @size:				size of allocation in bytes
+ * @return:				true : allocation does not cross same
  *					4GB boundary
  *					false: allocation crosses same
  *					4GB boundary
@@ -174,7 +174,7 @@ static inline bool megasas_check_same_4gb_region
 
 /**
  * megasas_enable_intr_fusion -	Enables interrupts
- * @regs:			MFI register set
+ * @instance:		Adapter soft state
  */
 static void
 megasas_enable_intr_fusion(struct megasas_instance *instance)
@@ -196,7 +196,7 @@ megasas_enable_intr_fusion(struct megasas_instance *instance)
 
 /**
  * megasas_disable_intr_fusion - Disables interrupt
- * @regs:			 MFI register set
+ * @instance:		Adapter soft state
  */
 static void
 megasas_disable_intr_fusion(struct megasas_instance *instance)
@@ -238,6 +238,7 @@ megasas_clear_intr_fusion(struct megasas_instance *instance)
 /**
  * megasas_get_cmd_fusion -	Get a command from the free pool
  * @instance:		Adapter soft state
+ * @blk_tag:		Index into the command list
  *
  * Returns a blk_tag indexed mpt frame
  */
@@ -310,7 +311,7 @@ megasas_fire_cmd_fusion(struct megasas_instance *instance,
 /**
  * megasas_fusion_update_can_queue -	Do all Adapter Queue depth related calculations here
  * @instance:							Adapter soft state
- * fw_boot_context:						Whether this function called during probe or after OCR
+ * @fw_boot_context:						Whether this function called during probe or after OCR
  *
  * This function is only for fusion controllers.
  * Update host can queue, if firmware downgrade max supported firmware commands.
@@ -1016,6 +1017,7 @@ megasas_alloc_cmds_fusion(struct megasas_instance *instance)
  * wait_and_poll -	Issues a polling command
  * @instance:			Adapter soft state
  * @cmd:			Command packet to be issued
+ * @seconds:			Total seconds to wait
  *
  * For polling, MFI requires the cmd_status to be set to 0xFF before posting.
  */
@@ -1906,6 +1908,7 @@ megasas_init_adapter_fusion(struct megasas_instance *instance)
 /**
  * megasas_fault_detect_work	-	Worker function of
  *					FW fault handling workqueue.
+ * @work:	Pointer to work information
  */
 static void
 megasas_fault_detect_work(struct work_struct *work)
@@ -1989,9 +1992,12 @@ megasas_fusion_stop_watchdog(struct megasas_instance *instance)
 
 /**
  * map_cmd_status -	Maps FW cmd status to OS cmd status
- * @cmd :		Pointer to cmd
+ * @fusion :		Pointer to driver data
+ * @scmd :		Pointer to SCSI cmd
  * @status :		status of cmd returned by FW
  * @ext_status :	ext status of cmd returned by FW
+ * @data_length :	size of reqeusted data
+ * @sense :		sense data
  */
 
 static void
@@ -2234,8 +2240,7 @@ megasas_make_prp_nvme(struct megasas_instance *instance, struct scsi_cmnd *scmd,
  * @scp:		SCSI command from the mid-layer
  * @sgl_ptr:		SGL to be filled in
  * @cmd:		cmd we are working on
- * @sge_count		sge count
- *
+ * @sge_count:		sge count
  */
 static void
 megasas_make_sgl_fusion(struct megasas_instance *instance,
@@ -2341,11 +2346,9 @@ int megasas_make_sgl(struct megasas_instance *instance, struct scsi_cmnd *scp,
 	return sge_count;
 }
 
-/**
+/*
  * megasas_set_pd_lba -	Sets PD LBA
- * @cdb:		CDB
  * @cdb_len:		cdb length
- * @start_blk:		Start block of IO
  *
  * Used to set the PD LBA in CDB for FP IOs
  */
@@ -2603,11 +2606,12 @@ static void megasas_stream_detect(struct megasas_instance *instance,
  * affinity (cpu of the controller) and raid_flags in the raid context
  * based on IO type.
  *
+ * @fusion :		Pointer to driver data
  * @praid_context:	IO RAID context
  * @raid:		LD raid map
  * @fp_possible:	Is fast path possible?
  * @is_read:		Is read IO?
- *
+ * @scsi_buff_len:	SCSI buffer length
  */
 static void
 megasas_set_raidflag_cpu_affinity(struct fusion_context *fusion,
@@ -2940,7 +2944,7 @@ megasas_build_ldio_fusion(struct megasas_instance *instance,
 /**
  * megasas_build_ld_nonrw_fusion - prepares non rw ios for virtual disk
  * @instance:		Adapter soft state
- * @scp:		SCSI command
+ * @scmd:		SCSI command
  * @cmd:		Command to be prepared
  *
  * Prepares the io_request frame for non-rw io cmds for vd.
@@ -3028,7 +3032,7 @@ static void megasas_build_ld_nonrw_fusion(struct megasas_instance *instance,
 /**
  * megasas_build_syspd_fusion - prepares rw/non-rw ios for syspd
  * @instance:		Adapter soft state
- * @scp:		SCSI command
+ * @scmd:		SCSI command
  * @cmd:		Command to be prepared
  * @fp_possible:	parameter to detect fast path or firmware path io.
  *
@@ -3405,7 +3409,7 @@ megasas_build_and_issue_cmd_fusion(struct megasas_instance *instance,
  * megasas_complete_r1_command -
  * completes R1 FP write commands which has valid peer smid
  * @instance:			Adapter soft state
- * @cmd_fusion:			MPT command frame
+ * @cmd:			MPT command frame
  *
  */
 static inline void
@@ -3456,7 +3460,7 @@ megasas_complete_r1_command(struct megasas_instance *instance,
 	}
 }
 
-/**
+/*
  * complete_cmd_fusion -	Completes command
  * @instance:			Adapter soft state
  * Completes all commands that is in reply descriptor queue
@@ -3634,6 +3638,7 @@ complete_cmd_fusion(struct megasas_instance *instance, u32 MSIxIndex,
 
 /**
  * megasas_enable_irq_poll() - enable irqpoll
+ * @instance:			Adapter soft state
  */
 static void megasas_enable_irq_poll(struct megasas_instance *instance)
 {
@@ -3650,7 +3655,7 @@ static void megasas_enable_irq_poll(struct megasas_instance *instance)
 
 /**
  * megasas_sync_irqs -	Synchronizes all IRQs owned by adapter
- * @instance:			Adapter soft state
+ * @instance_addr:		Adapter soft state
  */
 static void megasas_sync_irqs(unsigned long instance_addr)
 {
@@ -3706,7 +3711,7 @@ int megasas_irqpoll(struct irq_poll *irqpoll, int budget)
 
 /**
  * megasas_complete_cmd_dpc_fusion -	Completes command
- * @instance:			Adapter soft state
+ * @instance_addr:		Adapter soft state
  *
  * Tasklet to complete cmds
  */
@@ -3729,6 +3734,8 @@ megasas_complete_cmd_dpc_fusion(unsigned long instance_addr)
 
 /**
  * megasas_isr_fusion - isr entry point
+ * @irq:	Interrupt number
+ * @devp:	Interrupt contect
  */
 static irqreturn_t megasas_isr_fusion(int irq, void *devp)
 {
@@ -3763,7 +3770,7 @@ static irqreturn_t megasas_isr_fusion(int irq, void *devp)
 /**
  * build_mpt_mfi_pass_thru - builds a cmd fo MFI Pass thru
  * @instance:			Adapter soft state
- * mfi_cmd:			megasas_cmd pointer
+ * @mfi_cmd:			megasas_cmd pointer
  *
  */
 static void
@@ -3880,7 +3887,7 @@ megasas_release_fusion(struct megasas_instance *instance)
 
 /**
  * megasas_read_fw_status_reg_fusion - returns the current FW status value
- * @regs:			MFI register set
+ * @instance:			Adapter soft state
  */
 static u32
 megasas_read_fw_status_reg_fusion(struct megasas_instance *instance)
@@ -3929,7 +3936,8 @@ megasas_free_host_crash_buffer(struct megasas_instance *instance)
 
 /**
  * megasas_adp_reset_fusion -	For controller reset
- * @regs:				MFI register set
+ * @instance:			Adapter soft state
+ * @regs:			MFI register set
  */
 static int
 megasas_adp_reset_fusion(struct megasas_instance *instance,
@@ -4006,7 +4014,8 @@ megasas_adp_reset_fusion(struct megasas_instance *instance,
 
 /**
  * megasas_check_reset_fusion -	For controller reset check
- * @regs:				MFI register set
+ * @instance:			Adapter soft state
+ * @regs:			MFI register set
  */
 static int
 megasas_check_reset_fusion(struct megasas_instance *instance,
@@ -4168,7 +4177,7 @@ void  megasas_reset_reply_desc(struct megasas_instance *instance)
 	}
 }
 
-/*
+/**
  * megasas_refire_mgmt_cmd :	Re-fire management commands
  * @instance:				Controller's soft instance
 */
@@ -4267,7 +4276,7 @@ static void megasas_refire_mgmt_cmd(struct megasas_instance *instance,
 	}
 }
 
-/*
+/**
  * megasas_return_polled_cmds: Return polled mode commands back to the pool
  *			       before initiating an OCR.
  * @instance:                  Controller's soft instance
@@ -4298,7 +4307,7 @@ megasas_return_polled_cmds(struct megasas_instance *instance)
 	}
 }
 
-/*
+/**
  * megasas_track_scsiio : Track SCSI IOs outstanding to a SCSI device
  * @instance: per adapter struct
  * @channel: the channel assigned by the OS
@@ -4335,7 +4344,7 @@ static int megasas_track_scsiio(struct megasas_instance *instance,
 
 /**
  * megasas_tm_response_code - translation of device response code
- * @ioc: per adapter object
+ * @instance:                  Controller's soft instance
  * @mpi_reply: MPI reply returned by firmware
  *
  * Return nothing.
@@ -4393,7 +4402,7 @@ megasas_tm_response_code(struct megasas_instance *instance,
  * @id: the id assigned by the OS
  * @type: MPI2_SCSITASKMGMT_TASKTYPE__XXX (defined in megaraid_sas_fusion.c)
  * @smid_task: smid assigned to the task
- * @m_type: TM_MUTEX_ON or TM_MUTEX_OFF
+ * @mr_device_priv_data: Private device data
  * Context: user
  *
  * MegaRaid use MPT interface for Task Magement request.
-- 
2.25.1


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

* [PATCH 05/10] scsi: megaraid: megaraid_sas_base: Provide prototypes for non-static functions
  2020-07-07 14:00 [PATCH 00/10] Fix a bunch SCSI related W=1 warnings Lee Jones
                   ` (3 preceding siblings ...)
  2020-07-07 14:00 ` [PATCH 04/10] scsi: megaraid: megaraid_sas_fusion: Fix-up a whole myriad of kerneldoc misdemeanours Lee Jones
@ 2020-07-07 14:00 ` Lee Jones
  2020-07-07 14:00 ` [PATCH 06/10] scsi: aha152x: Remove unused variable 'ret' Lee Jones
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 22+ messages in thread
From: Lee Jones @ 2020-07-07 14:00 UTC (permalink / raw)
  To: jejb, martin.petersen
  Cc: linux-kernel, linux-scsi, Lee Jones, Kashyap Desai, Sumit Saxena,
	Shivasharan S, megaraidlinux.pdl

For Megaraid DebugFS functions called from 'megaraid_sas_base.c'.

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

 drivers/scsi/megaraid/megaraid_sas_debugfs.c:102:6: warning: no previous prototype for ‘megasas_init_debugfs’ [-Wmissing-prototypes]
 102 | void megasas_init_debugfs(void)
 | ^~~~~~~~~~~~~~~~~~~~
 drivers/scsi/megaraid/megaraid_sas_debugfs.c:112:6: warning: no previous prototype for ‘megasas_exit_debugfs’ [-Wmissing-prototypes]
 112 | void megasas_exit_debugfs(void)
 | ^~~~~~~~~~~~~~~~~~~~
 drivers/scsi/megaraid/megaraid_sas_debugfs.c:122:1: warning: no previous prototype for ‘megasas_setup_debugfs’ [-Wmissing-prototypes]
 122 | megasas_setup_debugfs(struct megasas_instance *instance)
 | ^~~~~~~~~~~~~~~~~~~~~
 drivers/scsi/megaraid/megaraid_sas_debugfs.c:161:6: warning: no previous prototype for ‘megasas_destroy_debugfs’ [-Wmissing-prototypes]
 161 | void megasas_destroy_debugfs(struct megasas_instance *instance)
 | ^~~~~~~~~~~~~~~~~~~~~~~

Cc: Kashyap Desai <kashyap.desai@broadcom.com>
Cc: Sumit Saxena <sumit.saxena@broadcom.com>
Cc: Shivasharan S <shivasharan.srikanteshwara@broadcom.com>
Cc: megaraidlinux.pdl@broadcom.com
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/scsi/megaraid/megaraid_sas_base.c   | 4 ----
 drivers/scsi/megaraid/megaraid_sas_fusion.h | 6 ++++++
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
index 00668335c2afc..1ccd72b1cbe7f 100644
--- a/drivers/scsi/megaraid/megaraid_sas_base.c
+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
@@ -202,10 +202,6 @@ static bool support_pci_lane_margining;
 static spinlock_t poll_aen_lock;
 
 extern struct dentry *megasas_debugfs_root;
-extern void megasas_init_debugfs(void);
-extern void megasas_exit_debugfs(void);
-extern void megasas_setup_debugfs(struct megasas_instance *instance);
-extern void megasas_destroy_debugfs(struct megasas_instance *instance);
 
 void
 megasas_complete_cmd(struct megasas_instance *instance, struct megasas_cmd *cmd,
diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.h b/drivers/scsi/megaraid/megaraid_sas_fusion.h
index 30de4b01f7035..5f657d2ba733a 100644
--- a/drivers/scsi/megaraid/megaraid_sas_fusion.h
+++ b/drivers/scsi/megaraid/megaraid_sas_fusion.h
@@ -1388,4 +1388,10 @@ int megasas_check_mpio_paths(struct megasas_instance *instance,
 			      struct scsi_cmnd *scmd);
 void megasas_fusion_ocr_wq(struct work_struct *work);
 
+/* DebugFS Prototypes */
+void megasas_init_debugfs(void);
+void megasas_exit_debugfs(void);
+void megasas_setup_debugfs(struct megasas_instance *instance);
+void megasas_destroy_debugfs(struct megasas_instance *instance);
+
 #endif /* _MEGARAID_SAS_FUSION_H_ */
-- 
2.25.1


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

* [PATCH 06/10] scsi: aha152x: Remove unused variable 'ret'
  2020-07-07 14:00 [PATCH 00/10] Fix a bunch SCSI related W=1 warnings Lee Jones
                   ` (4 preceding siblings ...)
  2020-07-07 14:00 ` [PATCH 05/10] scsi: megaraid: megaraid_sas_base: Provide prototypes for non-static functions Lee Jones
@ 2020-07-07 14:00 ` Lee Jones
  2020-07-07 14:00 ` [PATCH 07/10] scsi: pcmcia: nsp_cs: Use new __printf() format notation Lee Jones
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 22+ messages in thread
From: Lee Jones @ 2020-07-07 14:00 UTC (permalink / raw)
  To: jejb, martin.petersen
  Cc: linux-kernel, linux-scsi, Lee Jones, Juergen E. Fischer

Looks to be unused since 2014.

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

 drivers/scsi/aha152x.c: In function ‘datai_run’:
 drivers/scsi/aha152x.c:2033:9: warning: variable ‘data’ set but not used [-Wunused-but-set-variable]
 2033 | int data;
 | ^~~~

Cc: "Juergen E. Fischer" <fischer@norbit.de>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/scsi/aha152x.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/scsi/aha152x.c b/drivers/scsi/aha152x.c
index 90f97df1c42a4..d8e19afa7a140 100644
--- a/drivers/scsi/aha152x.c
+++ b/drivers/scsi/aha152x.c
@@ -2030,8 +2030,7 @@ static void datai_run(struct Scsi_Host *shpnt)
 				    fifodata, GETPORT(FIFOSTAT));
 			SETPORT(DMACNTRL0, ENDMA|_8BIT);
 			while(fifodata>0) {
-				int data;
-				data=GETPORT(DATAPORT);
+				GETPORT(DATAPORT);
 				fifodata--;
 				DATA_LEN++;
 			}
-- 
2.25.1


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

* [PATCH 07/10] scsi: pcmcia: nsp_cs: Use new __printf() format notation
  2020-07-07 14:00 [PATCH 00/10] Fix a bunch SCSI related W=1 warnings Lee Jones
                   ` (5 preceding siblings ...)
  2020-07-07 14:00 ` [PATCH 06/10] scsi: aha152x: Remove unused variable 'ret' Lee Jones
@ 2020-07-07 14:00 ` Lee Jones
  2020-07-07 14:00 ` [PATCH 08/10] scsi: pcmcia: nsp_cs: Remove unused variable 'dummy' Lee Jones
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 22+ messages in thread
From: Lee Jones @ 2020-07-07 14:00 UTC (permalink / raw)
  To: jejb, martin.petersen; +Cc: linux-kernel, linux-scsi, Lee Jones, YOKOTA Hiroshi

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

 drivers/scsi/pcmcia/nsp_cs.c: In function ‘nsp_cs_message’:
 drivers/scsi/pcmcia/nsp_cs.c:143:2: warning: function ‘nsp_cs_message’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format]
 drivers/scsi/pcmcia/nsp_cs.c: In function ‘nsp_fifo_count’:
 drivers/scsi/pcmcia/nsp_cs.c:692:24: warning: variable ‘dummy’ set but not used [-Wunused-but-set-variable]

Cc: YOKOTA Hiroshi <yokota@netlab.is.tsukuba.ac.jp>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/scsi/pcmcia/nsp_cs.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/scsi/pcmcia/nsp_cs.c b/drivers/scsi/pcmcia/nsp_cs.c
index d79ce97a04bd7..57a78f84f97ab 100644
--- a/drivers/scsi/pcmcia/nsp_cs.c
+++ b/drivers/scsi/pcmcia/nsp_cs.c
@@ -134,6 +134,7 @@ static inline void nsp_inc_resid(struct scsi_cmnd *SCpnt, int residInc)
 	scsi_set_resid(SCpnt, scsi_get_resid(SCpnt) + residInc);
 }
 
+__printf(4, 5)
 static void nsp_cs_message(const char *func, int line, char *type, char *fmt, ...)
 {
 	va_list args;
-- 
2.25.1


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

* [PATCH 08/10] scsi: pcmcia: nsp_cs: Remove unused variable 'dummy'
  2020-07-07 14:00 [PATCH 00/10] Fix a bunch SCSI related W=1 warnings Lee Jones
                   ` (6 preceding siblings ...)
  2020-07-07 14:00 ` [PATCH 07/10] scsi: pcmcia: nsp_cs: Use new __printf() format notation Lee Jones
@ 2020-07-07 14:00 ` Lee Jones
  2020-07-07 14:00 ` [PATCH 09/10] scsi: libfc: fc_disc: Fix-up some incorrectly referenced function parameters Lee Jones
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 22+ messages in thread
From: Lee Jones @ 2020-07-07 14:00 UTC (permalink / raw)
  To: jejb, martin.petersen; +Cc: linux-kernel, linux-scsi, Lee Jones, YOKOTA Hiroshi

There is no need to populate an unused variable, even if the read is required.

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

 drivers/scsi/pcmcia/nsp_cs.c: In function ‘nsp_cs_message’:
 drivers/scsi/pcmcia/nsp_cs.c:143:2: warning: function ‘nsp_cs_message’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format]
 drivers/scsi/pcmcia/nsp_cs.c: In function ‘nsp_fifo_count’:
 drivers/scsi/pcmcia/nsp_cs.c:692:24: warning: variable ‘dummy’ set but not used [-Wunused-but-set-variable]

Cc: YOKOTA Hiroshi <yokota@netlab.is.tsukuba.ac.jp>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/scsi/pcmcia/nsp_cs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/pcmcia/nsp_cs.c b/drivers/scsi/pcmcia/nsp_cs.c
index 57a78f84f97ab..8655ff1249bbc 100644
--- a/drivers/scsi/pcmcia/nsp_cs.c
+++ b/drivers/scsi/pcmcia/nsp_cs.c
@@ -690,14 +690,14 @@ static int nsp_fifo_count(struct scsi_cmnd *SCpnt)
 {
 	unsigned int base = SCpnt->device->host->io_port;
 	unsigned int count;
-	unsigned int l, m, h, dummy;
+	unsigned int l, m, h;
 
 	nsp_index_write(base, POINTERCLR, POINTER_CLEAR | ACK_COUNTER);
 
 	l     = nsp_index_read(base, TRANSFERCOUNT);
 	m     = nsp_index_read(base, TRANSFERCOUNT);
 	h     = nsp_index_read(base, TRANSFERCOUNT);
-	dummy = nsp_index_read(base, TRANSFERCOUNT); /* required this! */
+	nsp_index_read(base, TRANSFERCOUNT); /* required this! */
 
 	count = (h << 16) | (m << 8) | (l << 0);
 
-- 
2.25.1


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

* [PATCH 09/10] scsi: libfc: fc_disc: Fix-up some incorrectly referenced function parameters
  2020-07-07 14:00 [PATCH 00/10] Fix a bunch SCSI related W=1 warnings Lee Jones
                   ` (7 preceding siblings ...)
  2020-07-07 14:00 ` [PATCH 08/10] scsi: pcmcia: nsp_cs: Remove unused variable 'dummy' Lee Jones
@ 2020-07-07 14:00 ` Lee Jones
  2020-07-08  6:30   ` Hannes Reinecke
  2020-07-08  7:34   ` Johannes Thumshirn
  2020-07-07 14:00 ` [PATCH 10/10] scsi: megaraid: megaraid_sas: Convert forward-declarations to prototypes Lee Jones
                   ` (2 subsequent siblings)
  11 siblings, 2 replies; 22+ messages in thread
From: Lee Jones @ 2020-07-07 14:00 UTC (permalink / raw)
  To: jejb, martin.petersen
  Cc: linux-kernel, linux-scsi, Lee Jones, Hannes Reinecke

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

 drivers/scsi/libfc/fc_disc.c:343: warning: Function parameter or member 'disc' not described in 'fc_disc_gpn_ft_req'
 drivers/scsi/libfc/fc_disc.c:343: warning: Excess function parameter 'lport' description in 'fc_disc_gpn_ft_req'
 drivers/scsi/libfc/fc_disc.c:380: warning: Function parameter or member 'disc' not described in 'fc_disc_gpn_ft_parse'
 drivers/scsi/libfc/fc_disc.c:380: warning: Excess function parameter 'lport' description in 'fc_disc_gpn_ft_parse'
 drivers/scsi/libfc/fc_disc.c:498: warning: Function parameter or member 'disc_arg' not described in 'fc_disc_gpn_ft_resp'
 drivers/scsi/libfc/fc_disc.c:498: warning: Excess function parameter 'lp_arg' description in 'fc_disc_gpn_ft_resp'

Cc: Hannes Reinecke <hare@suse.de>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/scsi/libfc/fc_disc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/scsi/libfc/fc_disc.c b/drivers/scsi/libfc/fc_disc.c
index 2b865c6423e29..428f40cfd1c36 100644
--- a/drivers/scsi/libfc/fc_disc.c
+++ b/drivers/scsi/libfc/fc_disc.c
@@ -337,7 +337,7 @@ static void fc_disc_error(struct fc_disc *disc, struct fc_frame *fp)
 
 /**
  * fc_disc_gpn_ft_req() - Send Get Port Names by FC-4 type (GPN_FT) request
- * @lport: The discovery context
+ * @disc: The discovery context
  */
 static void fc_disc_gpn_ft_req(struct fc_disc *disc)
 {
@@ -370,7 +370,7 @@ static void fc_disc_gpn_ft_req(struct fc_disc *disc)
 
 /**
  * fc_disc_gpn_ft_parse() - Parse the body of the dNS GPN_FT response.
- * @lport: The local port the GPN_FT was received on
+ * @disc:  The descovery context
  * @buf:   The GPN_FT response buffer
  * @len:   The size of response buffer
  *
@@ -488,7 +488,7 @@ static void fc_disc_timeout(struct work_struct *work)
  * fc_disc_gpn_ft_resp() - Handle a response frame from Get Port Names (GPN_FT)
  * @sp:	    The sequence that the GPN_FT response was received on
  * @fp:	    The GPN_FT response frame
- * @lp_arg: The discovery context
+ * @disc_arg: The discovery context
  *
  * Locking Note: This function is called without disc mutex held, and
  *		 should do all its processing with the mutex held
-- 
2.25.1


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

* [PATCH 10/10] scsi: megaraid: megaraid_sas: Convert forward-declarations to prototypes
  2020-07-07 14:00 [PATCH 00/10] Fix a bunch SCSI related W=1 warnings Lee Jones
                   ` (8 preceding siblings ...)
  2020-07-07 14:00 ` [PATCH 09/10] scsi: libfc: fc_disc: Fix-up some incorrectly referenced function parameters Lee Jones
@ 2020-07-07 14:00 ` Lee Jones
  2020-07-08  0:53 ` [PATCH 00/10] Fix a bunch SCSI related W=1 warnings Damien Le Moal
  2020-07-08  6:06 ` Martin K. Petersen
  11 siblings, 0 replies; 22+ messages in thread
From: Lee Jones @ 2020-07-07 14:00 UTC (permalink / raw)
  To: jejb, martin.petersen
  Cc: linux-kernel, linux-scsi, Lee Jones, Kashyap Desai, Sumit Saxena,
	Shivasharan S, megaraidlinux.pdl

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

 drivers/scsi/megaraid/megaraid_sas_base.c:240:5: warning: no previous prototype for ‘megasas_readl’ [-Wmissing-prototypes]
 240 | u32 megasas_readl(struct megasas_instance *instance,
 | ^~~~~~~~~~~~~
 drivers/scsi/megaraid/megaraid_sas_base.c:301:21: warning: no previous prototype for ‘megasas_get_cmd’ [-Wmissing-prototypes]
 301 | struct megasas_cmd *megasas_get_cmd(struct megasas_instance
 | ^~~~~~~~~~~~~~~
 drivers/scsi/megaraid/megaraid_sas_base.c:327:1: warning: no previous prototype for ‘megasas_return_cmd’ [-Wmissing-prototypes]
 327 | megasas_return_cmd(struct megasas_instance *instance, struct megasas_cmd *cmd)
 | ^~~~~~~~~~~~~~~~~~
 drivers/scsi/megaraid/megaraid_sas_base.c:1088:1: warning: no previous prototype for ‘megasas_issue_polled’ [-Wmissing-prototypes]
 1088 | megasas_issue_polled(struct megasas_instance *instance, struct megasas_cmd *cmd)
 | ^~~~~~~~~~~~~~~~~~~~
 drivers/scsi/megaraid/megaraid_sas_base.c:2149:6: warning: no previous prototype for ‘megaraid_sas_kill_hba’ [-Wmissing-prototypes]
 2149 | void megaraid_sas_kill_hba(struct megasas_instance *instance)
 | ^~~~~~~~~~~~~~~~~~~~~
 drivers/scsi/megaraid/megaraid_sas_base.c:2186:1: warning: no previous prototype for ‘megasas_check_and_restore_queue_depth’ [-Wmissing-prototypes]
 2186 | megasas_check_and_restore_queue_depth(struct megasas_instance *instance)
 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 drivers/scsi/megaraid/megaraid_sas_base.c:2263:6: warning: no previous prototype for ‘megasas_start_timer’ [-Wmissing-prototypes]
 2263 | void megasas_start_timer(struct megasas_instance *instance)
 | ^~~~~~~~~~~~~~~~~~~
 drivers/scsi/megaraid/megaraid_sas_base.c:2579:5: warning: no previous prototype for ‘megasas_sriov_start_heartbeat’ [-Wmissing-prototypes]
 2579 | int megasas_sriov_start_heartbeat(struct megasas_instance *instance,
 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 drivers/scsi/megaraid/megaraid_sas_base.c:4292:6: warning: no previous prototype for ‘megasas_free_cmds’ [-Wmissing-prototypes]
 4292 | void megasas_free_cmds(struct megasas_instance *instance)
 | ^~~~~~~~~~~~~~~~~
 drivers/scsi/megaraid/megaraid_sas_base.c:4329:5: warning: no previous prototype for ‘megasas_alloc_cmds’ [-Wmissing-prototypes]
 4329 | int megasas_alloc_cmds(struct megasas_instance *instance)
 | ^~~~~~~~~~~~~~~~~~

Cc: Kashyap Desai <kashyap.desai@broadcom.com>
Cc: Sumit Saxena <sumit.saxena@broadcom.com>
Cc: Shivasharan S <shivasharan.srikanteshwara@broadcom.com>
Cc: megaraidlinux.pdl@broadcom.com
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/scsi/megaraid/megaraid_sas.h        | 25 +++++++++++++++++-
 drivers/scsi/megaraid/megaraid_sas_fusion.c | 29 ---------------------
 2 files changed, 24 insertions(+), 30 deletions(-)

diff --git a/drivers/scsi/megaraid/megaraid_sas.h b/drivers/scsi/megaraid/megaraid_sas.h
index af2c7a2a95657..5c8037fca5fc6 100644
--- a/drivers/scsi/megaraid/megaraid_sas.h
+++ b/drivers/scsi/megaraid/megaraid_sas.h
@@ -2683,8 +2683,31 @@ void megasas_return_cmd_fusion(struct megasas_instance *instance,
 	struct megasas_cmd_fusion *cmd);
 int megasas_issue_blocked_cmd(struct megasas_instance *instance,
 	struct megasas_cmd *cmd, int timeout);
-void __megasas_return_cmd(struct megasas_instance *instance,
+void megasas_return_cmd(struct megasas_instance *instance,
 	struct megasas_cmd *cmd);
+u32 megasas_readl(struct megasas_instance *instance,
+		  const volatile void __iomem *addr);
+void megasas_free_cmds(struct megasas_instance *instance);
+struct megasas_cmd *megasas_get_cmd(struct megasas_instance *instance);
+void megaraid_sas_kill_hba(struct megasas_instance *instance);
+void megasas_complete_cmd(struct megasas_instance *instance,
+		     struct megasas_cmd *cmd, u8 alt_status);
+int wait_and_poll(struct megasas_instance *instance, struct megasas_cmd *cmd,
+		  int seconds);
+
+int megasas_alloc_cmds(struct megasas_instance *instance);
+int megasas_clear_intr_fusion(struct megasas_instance *instance);
+int megasas_issue_polled(struct megasas_instance *instance,
+			 struct megasas_cmd *cmd);
+void megasas_check_and_restore_queue_depth(struct megasas_instance *instance);
+
+int megasas_transition_to_ready(struct megasas_instance *instance, int ocr);
+void megaraid_sas_kill_hba(struct megasas_instance *instance);
+
+extern u32 megasas_dbg_lvl;
+int megasas_sriov_start_heartbeat(struct megasas_instance *instance,
+				  int initial);
+void megasas_start_timer(struct megasas_instance *instance);
 
 void megasas_return_mfi_mpt_pthr(struct megasas_instance *instance,
 	struct megasas_cmd *cmd_mfi, struct megasas_cmd_fusion *cmd_fusion);
diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c b/drivers/scsi/megaraid/megaraid_sas_fusion.c
index a0cf55776361c..fd0f40bc1795d 100644
--- a/drivers/scsi/megaraid/megaraid_sas_fusion.c
+++ b/drivers/scsi/megaraid/megaraid_sas_fusion.c
@@ -48,34 +48,7 @@
 #include "megaraid_sas.h"
 
 
-extern void megasas_free_cmds(struct megasas_instance *instance);
-extern struct megasas_cmd *megasas_get_cmd(struct megasas_instance
-					   *instance);
-extern void
-megasas_complete_cmd(struct megasas_instance *instance,
-		     struct megasas_cmd *cmd, u8 alt_status);
-int
-wait_and_poll(struct megasas_instance *instance, struct megasas_cmd *cmd,
-	      int seconds);
-
-void
-megasas_return_cmd(struct megasas_instance *instance, struct megasas_cmd *cmd);
-int megasas_alloc_cmds(struct megasas_instance *instance);
-int
-megasas_clear_intr_fusion(struct megasas_instance *instance);
-int
-megasas_issue_polled(struct megasas_instance *instance,
-		     struct megasas_cmd *cmd);
-void
-megasas_check_and_restore_queue_depth(struct megasas_instance *instance);
-
-int megasas_transition_to_ready(struct megasas_instance *instance, int ocr);
-void megaraid_sas_kill_hba(struct megasas_instance *instance);
 
-extern u32 megasas_dbg_lvl;
-int megasas_sriov_start_heartbeat(struct megasas_instance *instance,
-				  int initial);
-void megasas_start_timer(struct megasas_instance *instance);
 extern struct megasas_mgmt_info megasas_mgmt_info;
 extern unsigned int resetwaittime;
 extern unsigned int dual_qdepth_disable;
@@ -84,8 +57,6 @@ static void megasas_free_reply_fusion(struct megasas_instance *instance);
 static inline
 void megasas_configure_queue_sizes(struct megasas_instance *instance);
 static void megasas_fusion_crash_dump(struct megasas_instance *instance);
-extern u32 megasas_readl(struct megasas_instance *instance,
-			 const volatile void __iomem *addr);
 
 /**
  * megasas_adp_reset_wait_for_ready -	initiate chip reset and wait for
-- 
2.25.1


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

* Re: [PATCH 00/10] Fix a bunch SCSI related W=1 warnings
  2020-07-07 14:00 [PATCH 00/10] Fix a bunch SCSI related W=1 warnings Lee Jones
                   ` (9 preceding siblings ...)
  2020-07-07 14:00 ` [PATCH 10/10] scsi: megaraid: megaraid_sas: Convert forward-declarations to prototypes Lee Jones
@ 2020-07-08  0:53 ` Damien Le Moal
  2020-07-08  6:51   ` Lee Jones
  2020-07-08  6:06 ` Martin K. Petersen
  11 siblings, 1 reply; 22+ messages in thread
From: Damien Le Moal @ 2020-07-08  0:53 UTC (permalink / raw)
  To: Lee Jones, jejb, martin.petersen; +Cc: linux-kernel, linux-scsi

On 2020/07/07 23:01, Lee Jones wrote:
> 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.
> 
> There are a whole lot more of these.  More fixes to follow.

Hi Lee,

I posted a series doing that cleanup for megaraid, mpt3sas sd and sd_zbc yesterday.

https://www.spinics.net/lists/linux-scsi/msg144023.html

Probably could merge the series since yours touches other drivers too.

> 
> Lee Jones (10):
>   scsi: megaraid: megaraid_mm: Strip excess function param description
>   scsi: megaraid: megaraid_mbox: Fix some kerneldoc bitrot
>   scsi: fdomain: Mark 'fdomain_pm_ops' as __maybe_unused
>   scsi: megaraid: megaraid_sas_fusion: Fix-up a whole myriad of
>     kerneldoc misdemeanours
>   scsi: megaraid: megaraid_sas_base: Provide prototypes for non-static
>     functions
>   scsi: aha152x: Remove unused variable 'ret'
>   scsi: pcmcia: nsp_cs: Use new __printf() format notation
>   scsi: pcmcia: nsp_cs: Remove unused variable 'dummy'
>   scsi: libfc: fc_disc: Fix-up some incorrectly referenced function
>     parameters
>   scsi: megaraid: megaraid_sas: Convert forward-declarations to
>     prototypes
> 
>  drivers/scsi/aha152x.c                      |   3 +-
>  drivers/scsi/fdomain.h                      |   2 +-
>  drivers/scsi/libfc/fc_disc.c                |   6 +-
>  drivers/scsi/megaraid/megaraid_mbox.c       |   4 +-
>  drivers/scsi/megaraid/megaraid_mm.c         |   1 -
>  drivers/scsi/megaraid/megaraid_sas.h        |  25 ++++-
>  drivers/scsi/megaraid/megaraid_sas_base.c   |   4 -
>  drivers/scsi/megaraid/megaraid_sas_fusion.c | 102 ++++++++------------
>  drivers/scsi/megaraid/megaraid_sas_fusion.h |   6 ++
>  drivers/scsi/pcmcia/nsp_cs.c                |   5 +-
>  10 files changed, 81 insertions(+), 77 deletions(-)
> 


-- 
Damien Le Moal
Western Digital Research

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

* Re: [PATCH 00/10] Fix a bunch SCSI related W=1 warnings
  2020-07-07 14:00 [PATCH 00/10] Fix a bunch SCSI related W=1 warnings Lee Jones
                   ` (10 preceding siblings ...)
  2020-07-08  0:53 ` [PATCH 00/10] Fix a bunch SCSI related W=1 warnings Damien Le Moal
@ 2020-07-08  6:06 ` Martin K. Petersen
  2020-07-08  6:51   ` Lee Jones
  11 siblings, 1 reply; 22+ messages in thread
From: Martin K. Petersen @ 2020-07-08  6:06 UTC (permalink / raw)
  To: Lee Jones, jejb; +Cc: Martin K . Petersen, linux-kernel, linux-scsi

On Tue, 7 Jul 2020 15:00:45 +0100, Lee Jones wrote:

> 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.
> 
> There are a whole lot more of these.  More fixes to follow.
> 
> Lee Jones (10):
>   scsi: megaraid: megaraid_mm: Strip excess function param description
>   scsi: megaraid: megaraid_mbox: Fix some kerneldoc bitrot
>   scsi: fdomain: Mark 'fdomain_pm_ops' as __maybe_unused
>   scsi: megaraid: megaraid_sas_fusion: Fix-up a whole myriad of
>     kerneldoc misdemeanours
>   scsi: megaraid: megaraid_sas_base: Provide prototypes for non-static
>     functions
>   scsi: aha152x: Remove unused variable 'ret'
>   scsi: pcmcia: nsp_cs: Use new __printf() format notation
>   scsi: pcmcia: nsp_cs: Remove unused variable 'dummy'
>   scsi: libfc: fc_disc: Fix-up some incorrectly referenced function
>     parameters
>   scsi: megaraid: megaraid_sas: Convert forward-declarations to
>     prototypes
> 
> [...]

Applied to 5.9/scsi-queue, thanks!

[03/10] scsi: fdomain: Mark 'fdomain_pm_ops' as __maybe_unused
        https://git.kernel.org/mkp/scsi/c/4be1fa2b55a8
[06/10] scsi: aha152x: Remove unused variable 'ret'
        https://git.kernel.org/mkp/scsi/c/3c011793aca7
[07/10] scsi: pcmcia: nsp_cs: Use new __printf() format notation
        https://git.kernel.org/mkp/scsi/c/af0b55d06004
[08/10] scsi: pcmcia: nsp_cs: Remove unused variable 'dummy'
        https://git.kernel.org/mkp/scsi/c/97a33483425d
[09/10] scsi: libfc: fc_disc: Fix-up some incorrectly referenced function parameters
        https://git.kernel.org/mkp/scsi/c/b1987c884585

-- 
Martin K. Petersen	Oracle Linux Engineering

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

* Re: [PATCH 09/10] scsi: libfc: fc_disc: Fix-up some incorrectly referenced function parameters
  2020-07-07 14:00 ` [PATCH 09/10] scsi: libfc: fc_disc: Fix-up some incorrectly referenced function parameters Lee Jones
@ 2020-07-08  6:30   ` Hannes Reinecke
  2020-07-08  7:34   ` Johannes Thumshirn
  1 sibling, 0 replies; 22+ messages in thread
From: Hannes Reinecke @ 2020-07-08  6:30 UTC (permalink / raw)
  To: Lee Jones, jejb, martin.petersen; +Cc: linux-kernel, linux-scsi

On 7/7/20 4:00 PM, Lee Jones wrote:
> Fixes the following W=1 kernel build warning(s):
> 
>   drivers/scsi/libfc/fc_disc.c:343: warning: Function parameter or member 'disc' not described in 'fc_disc_gpn_ft_req'
>   drivers/scsi/libfc/fc_disc.c:343: warning: Excess function parameter 'lport' description in 'fc_disc_gpn_ft_req'
>   drivers/scsi/libfc/fc_disc.c:380: warning: Function parameter or member 'disc' not described in 'fc_disc_gpn_ft_parse'
>   drivers/scsi/libfc/fc_disc.c:380: warning: Excess function parameter 'lport' description in 'fc_disc_gpn_ft_parse'
>   drivers/scsi/libfc/fc_disc.c:498: warning: Function parameter or member 'disc_arg' not described in 'fc_disc_gpn_ft_resp'
>   drivers/scsi/libfc/fc_disc.c:498: warning: Excess function parameter 'lp_arg' description in 'fc_disc_gpn_ft_resp'
> 
> Cc: Hannes Reinecke <hare@suse.de>
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
>   drivers/scsi/libfc/fc_disc.c | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/scsi/libfc/fc_disc.c b/drivers/scsi/libfc/fc_disc.c
> index 2b865c6423e29..428f40cfd1c36 100644
> --- a/drivers/scsi/libfc/fc_disc.c
> +++ b/drivers/scsi/libfc/fc_disc.c
> @@ -337,7 +337,7 @@ static void fc_disc_error(struct fc_disc *disc, struct fc_frame *fp)
>   
>   /**
>    * fc_disc_gpn_ft_req() - Send Get Port Names by FC-4 type (GPN_FT) request
> - * @lport: The discovery context
> + * @disc: The discovery context
>    */
>   static void fc_disc_gpn_ft_req(struct fc_disc *disc)
>   {
> @@ -370,7 +370,7 @@ static void fc_disc_gpn_ft_req(struct fc_disc *disc)
>   
>   /**
>    * fc_disc_gpn_ft_parse() - Parse the body of the dNS GPN_FT response.
> - * @lport: The local port the GPN_FT was received on
> + * @disc:  The descovery context
>    * @buf:   The GPN_FT response buffer
>    * @len:   The size of response buffer
>    *
> @@ -488,7 +488,7 @@ static void fc_disc_timeout(struct work_struct *work)
>    * fc_disc_gpn_ft_resp() - Handle a response frame from Get Port Names (GPN_FT)
>    * @sp:	    The sequence that the GPN_FT response was received on
>    * @fp:	    The GPN_FT response frame
> - * @lp_arg: The discovery context
> + * @disc_arg: The discovery context
>    *
>    * Locking Note: This function is called without disc mutex held, and
>    *		 should do all its processing with the mutex held
> 
Reviewed-by: Hannes Reinecke <hare@suse.de>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke            Teamlead Storage & Networking
hare@suse.de                               +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer

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

* Re: [PATCH 00/10] Fix a bunch SCSI related W=1 warnings
  2020-07-08  6:06 ` Martin K. Petersen
@ 2020-07-08  6:51   ` Lee Jones
  2020-07-08  7:17     ` Martin K. Petersen
  0 siblings, 1 reply; 22+ messages in thread
From: Lee Jones @ 2020-07-08  6:51 UTC (permalink / raw)
  To: Martin K. Petersen; +Cc: jejb, linux-kernel, linux-scsi

On Wed, 08 Jul 2020, Martin K. Petersen wrote:

> On Tue, 7 Jul 2020 15:00:45 +0100, Lee Jones wrote:
> 
> > 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.
> > 
> > There are a whole lot more of these.  More fixes to follow.
> > 
> > Lee Jones (10):
> >   scsi: megaraid: megaraid_mm: Strip excess function param description
> >   scsi: megaraid: megaraid_mbox: Fix some kerneldoc bitrot
> >   scsi: fdomain: Mark 'fdomain_pm_ops' as __maybe_unused
> >   scsi: megaraid: megaraid_sas_fusion: Fix-up a whole myriad of
> >     kerneldoc misdemeanours
> >   scsi: megaraid: megaraid_sas_base: Provide prototypes for non-static
> >     functions
> >   scsi: aha152x: Remove unused variable 'ret'
> >   scsi: pcmcia: nsp_cs: Use new __printf() format notation
> >   scsi: pcmcia: nsp_cs: Remove unused variable 'dummy'
> >   scsi: libfc: fc_disc: Fix-up some incorrectly referenced function
> >     parameters
> >   scsi: megaraid: megaraid_sas: Convert forward-declarations to
> >     prototypes
> > 
> > [...]
> 
> Applied to 5.9/scsi-queue, thanks!
> 
> [03/10] scsi: fdomain: Mark 'fdomain_pm_ops' as __maybe_unused
>         https://git.kernel.org/mkp/scsi/c/4be1fa2b55a8
> [06/10] scsi: aha152x: Remove unused variable 'ret'
>         https://git.kernel.org/mkp/scsi/c/3c011793aca7
> [07/10] scsi: pcmcia: nsp_cs: Use new __printf() format notation
>         https://git.kernel.org/mkp/scsi/c/af0b55d06004
> [08/10] scsi: pcmcia: nsp_cs: Remove unused variable 'dummy'
>         https://git.kernel.org/mkp/scsi/c/97a33483425d
> [09/10] scsi: libfc: fc_disc: Fix-up some incorrectly referenced function parameters
>         https://git.kernel.org/mkp/scsi/c/b1987c884585

Thanks Martin.

Out of interest, do you know of any other efforts to fix W=1 warnings
in SCSI?  I was going to clean the whole sub-system, but I really
would like to avoid duplicating efforts if at all possible.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* Re: [PATCH 00/10] Fix a bunch SCSI related W=1 warnings
  2020-07-08  0:53 ` [PATCH 00/10] Fix a bunch SCSI related W=1 warnings Damien Le Moal
@ 2020-07-08  6:51   ` Lee Jones
  2020-07-08  7:35     ` Damien Le Moal
  0 siblings, 1 reply; 22+ messages in thread
From: Lee Jones @ 2020-07-08  6:51 UTC (permalink / raw)
  To: Damien Le Moal; +Cc: jejb, martin.petersen, linux-kernel, linux-scsi

On Wed, 08 Jul 2020, Damien Le Moal wrote:

> On 2020/07/07 23:01, Lee Jones wrote:
> > 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.
> > 
> > There are a whole lot more of these.  More fixes to follow.
> 
> Hi Lee,
> 
> I posted a series doing that cleanup for megaraid, mpt3sas sd and sd_zbc yesterday.
> 
> https://www.spinics.net/lists/linux-scsi/msg144023.html
> 
> Probably could merge the series since yours touches other drivers too.

Do you have plans to fix anything else, or should I continue?

> > Lee Jones (10):
> >   scsi: megaraid: megaraid_mm: Strip excess function param description
> >   scsi: megaraid: megaraid_mbox: Fix some kerneldoc bitrot
> >   scsi: fdomain: Mark 'fdomain_pm_ops' as __maybe_unused
> >   scsi: megaraid: megaraid_sas_fusion: Fix-up a whole myriad of
> >     kerneldoc misdemeanours
> >   scsi: megaraid: megaraid_sas_base: Provide prototypes for non-static
> >     functions
> >   scsi: aha152x: Remove unused variable 'ret'
> >   scsi: pcmcia: nsp_cs: Use new __printf() format notation
> >   scsi: pcmcia: nsp_cs: Remove unused variable 'dummy'
> >   scsi: libfc: fc_disc: Fix-up some incorrectly referenced function
> >     parameters
> >   scsi: megaraid: megaraid_sas: Convert forward-declarations to
> >     prototypes
> > 
> >  drivers/scsi/aha152x.c                      |   3 +-
> >  drivers/scsi/fdomain.h                      |   2 +-
> >  drivers/scsi/libfc/fc_disc.c                |   6 +-
> >  drivers/scsi/megaraid/megaraid_mbox.c       |   4 +-
> >  drivers/scsi/megaraid/megaraid_mm.c         |   1 -
> >  drivers/scsi/megaraid/megaraid_sas.h        |  25 ++++-
> >  drivers/scsi/megaraid/megaraid_sas_base.c   |   4 -
> >  drivers/scsi/megaraid/megaraid_sas_fusion.c | 102 ++++++++------------
> >  drivers/scsi/megaraid/megaraid_sas_fusion.h |   6 ++
> >  drivers/scsi/pcmcia/nsp_cs.c                |   5 +-
> >  10 files changed, 81 insertions(+), 77 deletions(-)
> > 
> 
> 

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* Re: [PATCH 00/10] Fix a bunch SCSI related W=1 warnings
  2020-07-08  6:51   ` Lee Jones
@ 2020-07-08  7:17     ` Martin K. Petersen
  2020-07-08  7:28       ` Lee Jones
  0 siblings, 1 reply; 22+ messages in thread
From: Martin K. Petersen @ 2020-07-08  7:17 UTC (permalink / raw)
  To: Lee Jones; +Cc: Martin K. Petersen, jejb, linux-kernel, linux-scsi


Lee,

> Out of interest, do you know of any other efforts to fix W=1 warnings
> in SCSI?

I am not.

I try to encourage that all new patches get compiled with C=1/W=1. If I
could, I would strictly enforce this. However, there is just too much
vintage code around at this point. And even some of the most actively
developed "contemporary" drivers suffer from a large amount of sparse
warnings. Would love to see things cleaned up.

-- 
Martin K. Petersen	Oracle Linux Engineering

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

* Re: [PATCH 00/10] Fix a bunch SCSI related W=1 warnings
  2020-07-08  7:17     ` Martin K. Petersen
@ 2020-07-08  7:28       ` Lee Jones
  0 siblings, 0 replies; 22+ messages in thread
From: Lee Jones @ 2020-07-08  7:28 UTC (permalink / raw)
  To: Martin K. Petersen; +Cc: jejb, linux-kernel, linux-scsi

On Wed, 08 Jul 2020, Martin K. Petersen wrote:

> 
> Lee,
> 
> > Out of interest, do you know of any other efforts to fix W=1 warnings
> > in SCSI?
> 
> I am not.
> 
> I try to encourage that all new patches get compiled with C=1/W=1. If I
> could, I would strictly enforce this. However, there is just too much
> vintage code around at this point. And even some of the most actively
> developed "contemporary" drivers suffer from a large amount of sparse
> warnings.

Exactly.  This is what spurred me on in the first place.  I really
wanted to build my own subsytems with W=1, but due to the very many
spurious build warnings I was forced to avoid them.  Once I fixed my
own, I thought "why not fix others", and here we are.

Backlight, MFD, PWM, USB, Misc, Regulator, GPIO, ASoC and MMC are all
clean.  Now it's SCSI's turn.

> warnings. Would love to see things cleaned up.

Great.  Watch this space.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* Re: [PATCH 09/10] scsi: libfc: fc_disc: Fix-up some incorrectly referenced function parameters
  2020-07-07 14:00 ` [PATCH 09/10] scsi: libfc: fc_disc: Fix-up some incorrectly referenced function parameters Lee Jones
  2020-07-08  6:30   ` Hannes Reinecke
@ 2020-07-08  7:34   ` Johannes Thumshirn
  2020-07-08  7:46     ` Lee Jones
  1 sibling, 1 reply; 22+ messages in thread
From: Johannes Thumshirn @ 2020-07-08  7:34 UTC (permalink / raw)
  To: Lee Jones, jejb, martin.petersen
  Cc: linux-kernel, linux-scsi, Hannes Reinecke

On 07/07/2020 16:01, Lee Jones wrote:
> + * @disc:  The descovery context

s/descovery/discovery

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

* Re: [PATCH 00/10] Fix a bunch SCSI related W=1 warnings
  2020-07-08  6:51   ` Lee Jones
@ 2020-07-08  7:35     ` Damien Le Moal
  2020-07-08  7:42       ` Lee Jones
  0 siblings, 1 reply; 22+ messages in thread
From: Damien Le Moal @ 2020-07-08  7:35 UTC (permalink / raw)
  To: Lee Jones; +Cc: jejb, martin.petersen, linux-kernel, linux-scsi

On 2020/07/08 15:51, Lee Jones wrote:
> On Wed, 08 Jul 2020, Damien Le Moal wrote:
> 
>> On 2020/07/07 23:01, Lee Jones wrote:
>>> 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.
>>>
>>> There are a whole lot more of these.  More fixes to follow.
>>
>> Hi Lee,
>>
>> I posted a series doing that cleanup for megaraid, mpt3sas sd and sd_zbc yesterday.
>>
>> https://www.spinics.net/lists/linux-scsi/msg144023.html
>>
>> Probably could merge the series since yours touches other drivers too.
> 
> Do you have plans to fix anything else, or should I continue?

I only fixed the warnings for the drivers enabled on my test setup. No real plan
to continue with other drivers for now.

My series did not touch aha, pcmcia and libfc, so these should still apply.

> 
>>> Lee Jones (10):
>>>   scsi: megaraid: megaraid_mm: Strip excess function param description
>>>   scsi: megaraid: megaraid_mbox: Fix some kerneldoc bitrot
>>>   scsi: fdomain: Mark 'fdomain_pm_ops' as __maybe_unused
>>>   scsi: megaraid: megaraid_sas_fusion: Fix-up a whole myriad of
>>>     kerneldoc misdemeanours
>>>   scsi: megaraid: megaraid_sas_base: Provide prototypes for non-static
>>>     functions
>>>   scsi: aha152x: Remove unused variable 'ret'
>>>   scsi: pcmcia: nsp_cs: Use new __printf() format notation
>>>   scsi: pcmcia: nsp_cs: Remove unused variable 'dummy'
>>>   scsi: libfc: fc_disc: Fix-up some incorrectly referenced function
>>>     parameters
>>>   scsi: megaraid: megaraid_sas: Convert forward-declarations to
>>>     prototypes
>>>
>>>  drivers/scsi/aha152x.c                      |   3 +-
>>>  drivers/scsi/fdomain.h                      |   2 +-
>>>  drivers/scsi/libfc/fc_disc.c                |   6 +-
>>>  drivers/scsi/megaraid/megaraid_mbox.c       |   4 +-
>>>  drivers/scsi/megaraid/megaraid_mm.c         |   1 -
>>>  drivers/scsi/megaraid/megaraid_sas.h        |  25 ++++-
>>>  drivers/scsi/megaraid/megaraid_sas_base.c   |   4 -
>>>  drivers/scsi/megaraid/megaraid_sas_fusion.c | 102 ++++++++------------
>>>  drivers/scsi/megaraid/megaraid_sas_fusion.h |   6 ++
>>>  drivers/scsi/pcmcia/nsp_cs.c                |   5 +-
>>>  10 files changed, 81 insertions(+), 77 deletions(-)
>>>
>>
>>
> 


-- 
Damien Le Moal
Western Digital Research

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

* Re: [PATCH 00/10] Fix a bunch SCSI related W=1 warnings
  2020-07-08  7:35     ` Damien Le Moal
@ 2020-07-08  7:42       ` Lee Jones
  0 siblings, 0 replies; 22+ messages in thread
From: Lee Jones @ 2020-07-08  7:42 UTC (permalink / raw)
  To: Damien Le Moal; +Cc: jejb, martin.petersen, linux-kernel, linux-scsi

On Wed, 08 Jul 2020, Damien Le Moal wrote:

> On 2020/07/08 15:51, Lee Jones wrote:
> > On Wed, 08 Jul 2020, Damien Le Moal wrote:
> > 
> >> On 2020/07/07 23:01, Lee Jones wrote:
> >>> 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.
> >>>
> >>> There are a whole lot more of these.  More fixes to follow.
> >>
> >> Hi Lee,
> >>
> >> I posted a series doing that cleanup for megaraid, mpt3sas sd and sd_zbc yesterday.
> >>
> >> https://www.spinics.net/lists/linux-scsi/msg144023.html
> >>
> >> Probably could merge the series since yours touches other drivers too.
> > 
> > Do you have plans to fix anything else, or should I continue?
> 
> I only fixed the warnings for the drivers enabled on my test setup. No real plan
> to continue with other drivers for now.
> 
> My series did not touch aha, pcmcia and libfc, so these should still apply.

Great.  Thanks for letting me know.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* Re: [PATCH 09/10] scsi: libfc: fc_disc: Fix-up some incorrectly referenced function parameters
  2020-07-08  7:34   ` Johannes Thumshirn
@ 2020-07-08  7:46     ` Lee Jones
  0 siblings, 0 replies; 22+ messages in thread
From: Lee Jones @ 2020-07-08  7:46 UTC (permalink / raw)
  To: Johannes Thumshirn
  Cc: jejb, martin.petersen, linux-kernel, linux-scsi, Hannes Reinecke

On Wed, 08 Jul 2020, Johannes Thumshirn wrote:

> On 07/07/2020 16:01, Lee Jones wrote:
> > + * @disc:  The descovery context
> 
> s/descovery/discovery

Ah yes.  I can't even blame copy/paste for this!

I think this patch has been applied.  I will send up a follow-up.

Thank you!

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

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

end of thread, other threads:[~2020-07-08  7:46 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-07 14:00 [PATCH 00/10] Fix a bunch SCSI related W=1 warnings Lee Jones
2020-07-07 14:00 ` [PATCH 01/10] scsi: megaraid: megaraid_mm: Strip excess function param description Lee Jones
2020-07-07 14:00 ` [PATCH 02/10] scsi: megaraid: megaraid_mbox: Fix some kerneldoc bitrot Lee Jones
2020-07-07 14:00 ` [PATCH 03/10] scsi: fdomain: Mark 'fdomain_pm_ops' as __maybe_unused Lee Jones
2020-07-07 14:00 ` [PATCH 04/10] scsi: megaraid: megaraid_sas_fusion: Fix-up a whole myriad of kerneldoc misdemeanours Lee Jones
2020-07-07 14:00 ` [PATCH 05/10] scsi: megaraid: megaraid_sas_base: Provide prototypes for non-static functions Lee Jones
2020-07-07 14:00 ` [PATCH 06/10] scsi: aha152x: Remove unused variable 'ret' Lee Jones
2020-07-07 14:00 ` [PATCH 07/10] scsi: pcmcia: nsp_cs: Use new __printf() format notation Lee Jones
2020-07-07 14:00 ` [PATCH 08/10] scsi: pcmcia: nsp_cs: Remove unused variable 'dummy' Lee Jones
2020-07-07 14:00 ` [PATCH 09/10] scsi: libfc: fc_disc: Fix-up some incorrectly referenced function parameters Lee Jones
2020-07-08  6:30   ` Hannes Reinecke
2020-07-08  7:34   ` Johannes Thumshirn
2020-07-08  7:46     ` Lee Jones
2020-07-07 14:00 ` [PATCH 10/10] scsi: megaraid: megaraid_sas: Convert forward-declarations to prototypes Lee Jones
2020-07-08  0:53 ` [PATCH 00/10] Fix a bunch SCSI related W=1 warnings Damien Le Moal
2020-07-08  6:51   ` Lee Jones
2020-07-08  7:35     ` Damien Le Moal
2020-07-08  7:42       ` Lee Jones
2020-07-08  6:06 ` Martin K. Petersen
2020-07-08  6:51   ` Lee Jones
2020-07-08  7:17     ` Martin K. Petersen
2020-07-08  7:28       ` Lee Jones

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).