linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 00/12] A series of small SCSI patches
@ 2021-11-29 19:45 Bart Van Assche
  2021-11-29 19:45 ` [PATCH v2 01/12] scsi: core: Suppress a kernel-doc warning Bart Van Assche
                   ` (13 more replies)
  0 siblings, 14 replies; 18+ messages in thread
From: Bart Van Assche @ 2021-11-29 19:45 UTC (permalink / raw)
  To: Martin K . Petersen; +Cc: Jaegeuk Kim, linux-scsi, Bart Van Assche

Hi Martin,

This patch series fixes a number of static checker warnings. Most of these
patches fix warnings introduced during the merge window.

Please consider these patches for kernel v5.17.

Thanks,

Bart.

Changes compared to v1:
- Dropped one patch since it is already upstream.
- Updated Acked-by / Reviewed-by tags.

Bart Van Assche (12):
  scsi: core: Suppress a kernel-doc warning
  scsi: core: Declare 'scsi_scan_type' static
  scsi: core: Show SCMD_LAST in text form
  scsi: a100u2w: Fix a kernel-doc warning
  scsi: atp870u: Fix a kernel-doc warning
  scsi: bfa: Declare 'bfad_im_vport_attrs' static
  scsi: dc395x: Fix a kernel-doc warning
  scsi: initio: Fix a kernel-doc warning
  scsi: megaraid: Fix a kernel-doc warning
  scsi: pm8001: Fix kernel-doc warnings
  scsi: pmcraid: Fix a kernel-doc warning
  scsi: Remove superfluous #include <linux/async.h> directives

 drivers/scsi/a100u2w.c                |  2 --
 drivers/scsi/atp870u.c                |  1 -
 drivers/scsi/bfa/bfad_attr.c          |  2 +-
 drivers/scsi/dc395x.c                 |  3 +--
 drivers/scsi/hisi_sas/hisi_sas.h      |  1 -
 drivers/scsi/initio.c                 |  2 --
 drivers/scsi/libsas/sas_discover.c    |  1 -
 drivers/scsi/megaraid/megaraid_mbox.c |  1 -
 drivers/scsi/pm8001/pm8001_ctl.c      | 24 ++++++++++++------------
 drivers/scsi/pmcraid.c                |  1 -
 drivers/scsi/scsi.c                   |  1 -
 drivers/scsi/scsi_debugfs.c           |  1 +
 drivers/scsi/scsi_pm.c                |  1 -
 drivers/scsi/scsi_priv.h              |  1 -
 drivers/scsi/scsi_scan.c              |  4 ++--
 drivers/scsi/sd.c                     |  1 -
 drivers/scsi/ufs/ufshpb.c             |  1 -
 17 files changed, 17 insertions(+), 31 deletions(-)


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

* [PATCH v2 01/12] scsi: core: Suppress a kernel-doc warning
  2021-11-29 19:45 [PATCH v2 00/12] A series of small SCSI patches Bart Van Assche
@ 2021-11-29 19:45 ` Bart Van Assche
  2021-12-13  2:53   ` Randy Dunlap
  2021-11-29 19:45 ` [PATCH v2 02/12] scsi: core: Declare 'scsi_scan_type' static Bart Van Assche
                   ` (12 subsequent siblings)
  13 siblings, 1 reply; 18+ messages in thread
From: Bart Van Assche @ 2021-11-29 19:45 UTC (permalink / raw)
  To: Martin K . Petersen
  Cc: Jaegeuk Kim, linux-scsi, Bart Van Assche, Stephen Rothwell,
	James E.J. Bottomley

Suppress the following kernel-doc warning:

drivers/scsi/scsi_scan.c:129: warning: Function parameter or member 'dev' not described in 'scsi_enable_async_suspend'

Fixes: a19a93e4c6a9 ("scsi: core: pm: Rely on the device driver core for async power management")
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
 drivers/scsi/scsi_scan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c
index 23e1c0acdeae..2f80509fa036 100644
--- a/drivers/scsi/scsi_scan.c
+++ b/drivers/scsi/scsi_scan.c
@@ -122,7 +122,7 @@ struct async_scan_data {
 	struct completion prev_finished;
 };
 
-/**
+/*
  * scsi_enable_async_suspend - Enable async suspend and resume
  */
 void scsi_enable_async_suspend(struct device *dev)

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

* [PATCH v2 02/12] scsi: core: Declare 'scsi_scan_type' static
  2021-11-29 19:45 [PATCH v2 00/12] A series of small SCSI patches Bart Van Assche
  2021-11-29 19:45 ` [PATCH v2 01/12] scsi: core: Suppress a kernel-doc warning Bart Van Assche
@ 2021-11-29 19:45 ` Bart Van Assche
  2021-11-29 19:46 ` [PATCH v2 03/12] scsi: core: Show SCMD_LAST in text form Bart Van Assche
                   ` (11 subsequent siblings)
  13 siblings, 0 replies; 18+ messages in thread
From: Bart Van Assche @ 2021-11-29 19:45 UTC (permalink / raw)
  To: Martin K . Petersen
  Cc: Jaegeuk Kim, linux-scsi, Bart Van Assche, kernel test robot,
	James E.J. Bottomley

'scsi_scan_type' is only used in one source file. Hence declare it static.

Fixes: a19a93e4c6a9 ("scsi: core: pm: Rely on the device driver core for async power management")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
 drivers/scsi/scsi_scan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c
index 2f80509fa036..3520b9384428 100644
--- a/drivers/scsi/scsi_scan.c
+++ b/drivers/scsi/scsi_scan.c
@@ -97,7 +97,7 @@ MODULE_PARM_DESC(max_luns,
 #define SCSI_SCAN_TYPE_DEFAULT "sync"
 #endif
 
-char scsi_scan_type[7] = SCSI_SCAN_TYPE_DEFAULT;
+static char scsi_scan_type[7] = SCSI_SCAN_TYPE_DEFAULT;
 
 module_param_string(scan, scsi_scan_type, sizeof(scsi_scan_type),
 		    S_IRUGO|S_IWUSR);

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

* [PATCH v2 03/12] scsi: core: Show SCMD_LAST in text form
  2021-11-29 19:45 [PATCH v2 00/12] A series of small SCSI patches Bart Van Assche
  2021-11-29 19:45 ` [PATCH v2 01/12] scsi: core: Suppress a kernel-doc warning Bart Van Assche
  2021-11-29 19:45 ` [PATCH v2 02/12] scsi: core: Declare 'scsi_scan_type' static Bart Van Assche
@ 2021-11-29 19:46 ` Bart Van Assche
  2021-11-29 19:46 ` [PATCH v2 04/12] scsi: a100u2w: Fix a kernel-doc warning Bart Van Assche
                   ` (10 subsequent siblings)
  13 siblings, 0 replies; 18+ messages in thread
From: Bart Van Assche @ 2021-11-29 19:46 UTC (permalink / raw)
  To: Martin K . Petersen
  Cc: Jaegeuk Kim, linux-scsi, Bart Van Assche, James E.J. Bottomley,
	Paolo Bonzini, Hannes Reinecke, Ming Lei

The SCSI debugfs code supports showing information about pending
commands, including translating SCSI command flags from numeric into
text format. Also convert the SCMD_LAST flag from numeric into text
form.

Fixes: 8930a6c20791 ("scsi: core: add support for request batching")
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
 drivers/scsi/scsi_debugfs.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/scsi/scsi_debugfs.c b/drivers/scsi/scsi_debugfs.c
index d9109771f274..db8517f1a485 100644
--- a/drivers/scsi/scsi_debugfs.c
+++ b/drivers/scsi/scsi_debugfs.c
@@ -9,6 +9,7 @@
 static const char *const scsi_cmd_flags[] = {
 	SCSI_CMD_FLAG_NAME(TAGGED),
 	SCSI_CMD_FLAG_NAME(INITIALIZED),
+	SCSI_CMD_FLAG_NAME(LAST),
 };
 #undef SCSI_CMD_FLAG_NAME
 

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

* [PATCH v2 04/12] scsi: a100u2w: Fix a kernel-doc warning
  2021-11-29 19:45 [PATCH v2 00/12] A series of small SCSI patches Bart Van Assche
                   ` (2 preceding siblings ...)
  2021-11-29 19:46 ` [PATCH v2 03/12] scsi: core: Show SCMD_LAST in text form Bart Van Assche
@ 2021-11-29 19:46 ` Bart Van Assche
  2021-11-29 19:46 ` [PATCH v2 05/12] scsi: atp870u: " Bart Van Assche
                   ` (9 subsequent siblings)
  13 siblings, 0 replies; 18+ messages in thread
From: Bart Van Assche @ 2021-11-29 19:46 UTC (permalink / raw)
  To: Martin K . Petersen
  Cc: Jaegeuk Kim, linux-scsi, Bart Van Assche, James E.J. Bottomley

Fix the following kernel-doc warning:

drivers/scsi/a100u2w.c:915: warning: Excess function parameter 'done' description in 'inia100_queue_lck'

Fixes: af049dfd0b10 ("scsi: core: Remove the 'done' argument from SCSI queuecommand_lck functions")
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
 drivers/scsi/a100u2w.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/scsi/a100u2w.c b/drivers/scsi/a100u2w.c
index 564ade03b530..d02eb5b213d0 100644
--- a/drivers/scsi/a100u2w.c
+++ b/drivers/scsi/a100u2w.c
@@ -904,13 +904,11 @@ static int inia100_build_scb(struct orc_host * host, struct orc_scb * scb, struc
 /**
  *	inia100_queue_lck		-	queue command with host
  *	@cmd: Command block
- *	@done: Completion function
  *
  *	Called by the mid layer to queue a command. Process the command
  *	block, build the host specific scb structures and if there is room
  *	queue the command down to the controller
  */
-
 static int inia100_queue_lck(struct scsi_cmnd *cmd)
 {
 	struct orc_scb *scb;

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

* [PATCH v2 05/12] scsi: atp870u: Fix a kernel-doc warning
  2021-11-29 19:45 [PATCH v2 00/12] A series of small SCSI patches Bart Van Assche
                   ` (3 preceding siblings ...)
  2021-11-29 19:46 ` [PATCH v2 04/12] scsi: a100u2w: Fix a kernel-doc warning Bart Van Assche
@ 2021-11-29 19:46 ` Bart Van Assche
  2021-11-29 19:46 ` [PATCH v2 06/12] scsi: bfa: Declare 'bfad_im_vport_attrs' static Bart Van Assche
                   ` (8 subsequent siblings)
  13 siblings, 0 replies; 18+ messages in thread
From: Bart Van Assche @ 2021-11-29 19:46 UTC (permalink / raw)
  To: Martin K . Petersen
  Cc: Jaegeuk Kim, linux-scsi, Bart Van Assche, James E.J. Bottomley

Fix the following kernel-doc warning:

drivers/scsi/atp870u.c:622: warning: Excess function parameter 'done' description in 'atp870u_queuecommand_lck'

Fixes: af049dfd0b10 ("scsi: core: Remove the 'done' argument from SCSI queuecommand_lck functions")
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
 drivers/scsi/atp870u.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/scsi/atp870u.c b/drivers/scsi/atp870u.c
index dcd6fae65a88..7143418d690f 100644
--- a/drivers/scsi/atp870u.c
+++ b/drivers/scsi/atp870u.c
@@ -614,7 +614,6 @@ static irqreturn_t atp870u_intr_handle(int irq, void *dev_id)
 /**
  *	atp870u_queuecommand_lck -	Queue SCSI command
  *	@req_p: request block
- *	@done: completion function
  *
  *	Queue a command to the ATP queue. Called with the host lock held.
  */

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

* [PATCH v2 06/12] scsi: bfa: Declare 'bfad_im_vport_attrs' static
  2021-11-29 19:45 [PATCH v2 00/12] A series of small SCSI patches Bart Van Assche
                   ` (4 preceding siblings ...)
  2021-11-29 19:46 ` [PATCH v2 05/12] scsi: atp870u: " Bart Van Assche
@ 2021-11-29 19:46 ` Bart Van Assche
  2021-11-29 19:46 ` [PATCH v2 07/12] scsi: dc395x: Fix a kernel-doc warning Bart Van Assche
                   ` (7 subsequent siblings)
  13 siblings, 0 replies; 18+ messages in thread
From: Bart Van Assche @ 2021-11-29 19:46 UTC (permalink / raw)
  To: Martin K . Petersen
  Cc: Jaegeuk Kim, linux-scsi, Bart Van Assche, kernel test robot,
	Anil Gurumurthy, Sudarsana Kalluru, James E.J. Bottomley

Fix the following kernel-doc warning:

'bfad_im_vport_attrs' is only used in one source file. Hence declare this
array static.

Fixes: e73af234a1a2 ("scsi: bfa: Switch to attribute groups")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
 drivers/scsi/bfa/bfad_attr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/bfa/bfad_attr.c b/drivers/scsi/bfa/bfad_attr.c
index c8b947c16069..f46989bd083c 100644
--- a/drivers/scsi/bfa/bfad_attr.c
+++ b/drivers/scsi/bfa/bfad_attr.c
@@ -981,7 +981,7 @@ const struct attribute_group *bfad_im_host_groups[] = {
 	NULL
 };
 
-struct attribute *bfad_im_vport_attrs[] = {
+static struct attribute *bfad_im_vport_attrs[] = {
 	&dev_attr_serial_number.attr,
 	&dev_attr_model.attr,
 	&dev_attr_model_description.attr,

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

* [PATCH v2 07/12] scsi: dc395x: Fix a kernel-doc warning
  2021-11-29 19:45 [PATCH v2 00/12] A series of small SCSI patches Bart Van Assche
                   ` (5 preceding siblings ...)
  2021-11-29 19:46 ` [PATCH v2 06/12] scsi: bfa: Declare 'bfad_im_vport_attrs' static Bart Van Assche
@ 2021-11-29 19:46 ` Bart Van Assche
  2021-11-29 19:46 ` [PATCH v2 08/12] scsi: initio: " Bart Van Assche
                   ` (6 subsequent siblings)
  13 siblings, 0 replies; 18+ messages in thread
From: Bart Van Assche @ 2021-11-29 19:46 UTC (permalink / raw)
  To: Martin K . Petersen
  Cc: Jaegeuk Kim, linux-scsi, Bart Van Assche, Oliver Neukum,
	Ali Akcaagac, Jamie Lenehan, James E.J. Bottomley

Fix the following kernel-doc warning:

drivers/scsi/dc395x.c:964: warning: Excess function parameter 'done' description in 'dc395x_queue_command_lck'

Fixes: af049dfd0b10 ("scsi: core: Remove the 'done' argument from SCSI queuecommand_lck functions")
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
 drivers/scsi/dc395x.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/scsi/dc395x.c b/drivers/scsi/dc395x.c
index 9b8796c9e634..c11916b8ae00 100644
--- a/drivers/scsi/dc395x.c
+++ b/drivers/scsi/dc395x.c
@@ -946,7 +946,6 @@ static void build_srb(struct scsi_cmnd *cmd, struct DeviceCtlBlk *dcb,
  * layer, invoke 'done' on completion
  *
  * @cmd: pointer to scsi command object
- * @done: function pointer to be invoked on completion
  *
  * Returns 1 if the adapter (host) is busy, else returns 0. One
  * reason for an adapter to be busy is that the number
@@ -959,7 +958,7 @@ static void build_srb(struct scsi_cmnd *cmd, struct DeviceCtlBlk *dcb,
  * Locks: struct Scsi_Host::host_lock held on entry (with "irqsave")
  *        and is expected to be held on return.
  *
- **/
+ */
 static int dc395x_queue_command_lck(struct scsi_cmnd *cmd)
 {
 	void (*done)(struct scsi_cmnd *) = scsi_done;

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

* [PATCH v2 08/12] scsi: initio: Fix a kernel-doc warning
  2021-11-29 19:45 [PATCH v2 00/12] A series of small SCSI patches Bart Van Assche
                   ` (6 preceding siblings ...)
  2021-11-29 19:46 ` [PATCH v2 07/12] scsi: dc395x: Fix a kernel-doc warning Bart Van Assche
@ 2021-11-29 19:46 ` Bart Van Assche
  2021-11-29 19:46 ` [PATCH v2 09/12] scsi: megaraid: " Bart Van Assche
                   ` (5 subsequent siblings)
  13 siblings, 0 replies; 18+ messages in thread
From: Bart Van Assche @ 2021-11-29 19:46 UTC (permalink / raw)
  To: Martin K . Petersen
  Cc: Jaegeuk Kim, linux-scsi, Bart Van Assche, James E.J. Bottomley

Fix the following kernel-doc warning:

drivers/scsi/initio.c:2613: warning: Excess function parameter 'done' description in 'i91u_queuecommand_lck'

Fixes: af049dfd0b10 ("scsi: core: Remove the 'done' argument from SCSI queuecommand_lck functions")
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
 drivers/scsi/initio.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/scsi/initio.c b/drivers/scsi/initio.c
index fd6da96bc51a..9cdee38f5ba3 100644
--- a/drivers/scsi/initio.c
+++ b/drivers/scsi/initio.c
@@ -2602,13 +2602,11 @@ static void initio_build_scb(struct initio_host * host, struct scsi_ctrl_blk * c
 /**
  *	i91u_queuecommand_lck	-	Queue a new command if possible
  *	@cmd: SCSI command block from the mid layer
- *	@done: Completion handler
  *
  *	Attempts to queue a new command with the host adapter. Will return
  *	zero if successful or indicate a host busy condition if not (which
  *	will cause the mid layer to call us again later with the command)
  */
-
 static int i91u_queuecommand_lck(struct scsi_cmnd *cmd)
 {
 	struct initio_host *host = (struct initio_host *) cmd->device->host->hostdata;

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

* [PATCH v2 09/12] scsi: megaraid: Fix a kernel-doc warning
  2021-11-29 19:45 [PATCH v2 00/12] A series of small SCSI patches Bart Van Assche
                   ` (7 preceding siblings ...)
  2021-11-29 19:46 ` [PATCH v2 08/12] scsi: initio: " Bart Van Assche
@ 2021-11-29 19:46 ` Bart Van Assche
  2021-11-29 19:46 ` [PATCH v2 10/12] scsi: pm8001: Fix kernel-doc warnings Bart Van Assche
                   ` (4 subsequent siblings)
  13 siblings, 0 replies; 18+ messages in thread
From: Bart Van Assche @ 2021-11-29 19:46 UTC (permalink / raw)
  To: Martin K . Petersen
  Cc: Jaegeuk Kim, linux-scsi, Bart Van Assche, Kashyap Desai,
	Sumit Saxena, Shivasharan S, James E.J. Bottomley

Fix the following kernel-doc warning:

drivers/scsi/megaraid/megaraid_mbox.c:1439: warning: Excess function parameter 'done' description in 'megaraid_queue_command_lck'

Fixes: af049dfd0b10 ("scsi: core: Remove the 'done' argument from SCSI queuecommand_lck functions")
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
 drivers/scsi/megaraid/megaraid_mbox.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/scsi/megaraid/megaraid_mbox.c b/drivers/scsi/megaraid/megaraid_mbox.c
index 14f930d27ca1..2a339d4a7e9d 100644
--- a/drivers/scsi/megaraid/megaraid_mbox.c
+++ b/drivers/scsi/megaraid/megaraid_mbox.c
@@ -1431,7 +1431,6 @@ mbox_post_cmd(adapter_t *adapter, scb_t *scb)
 /**
  * megaraid_queue_command_lck - generic queue entry point for all LLDs
  * @scp		: pointer to the scsi command to be executed
- * @done	: callback routine to be called after the cmd has be completed
  *
  * Queue entry point for mailbox based controllers.
  */

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

* [PATCH v2 10/12] scsi: pm8001: Fix kernel-doc warnings
  2021-11-29 19:45 [PATCH v2 00/12] A series of small SCSI patches Bart Van Assche
                   ` (8 preceding siblings ...)
  2021-11-29 19:46 ` [PATCH v2 09/12] scsi: megaraid: " Bart Van Assche
@ 2021-11-29 19:46 ` Bart Van Assche
  2021-11-29 19:46 ` [PATCH v2 11/12] scsi: pmcraid: Fix a kernel-doc warning Bart Van Assche
                   ` (3 subsequent siblings)
  13 siblings, 0 replies; 18+ messages in thread
From: Bart Van Assche @ 2021-11-29 19:46 UTC (permalink / raw)
  To: Martin K . Petersen
  Cc: Jaegeuk Kim, linux-scsi, Bart Van Assche, Jack Wang, Jack Wang,
	James E.J. Bottomley, Ashokkumar N, kernel test robot,
	Vishakha Channapattan, Ruksar Devadi

Fix the following kernel-doc warnings:

drivers/scsi/pm8001/pm8001_ctl.c:900: warning: cannot understand function prototype: 'const char *const mpiStateText[] = '
drivers/scsi/pm8001/pm8001_ctl.c:930: warning: Function parameter or member 'attr' not described in 'ctl_hmi_error_show'
drivers/scsi/pm8001/pm8001_ctl.c:951: warning: Function parameter or member 'attr' not described in 'ctl_raae_count_show'
drivers/scsi/pm8001/pm8001_ctl.c:972: warning: Function parameter or member 'attr' not described in 'ctl_iop0_count_show'
drivers/scsi/pm8001/pm8001_ctl.c:993: warning: Function parameter or member 'attr' not described in 'ctl_iop1_count_show'

Acked-by: Jack Wang <jinpu.wang@ionos.com>
Fixes: 4ddbea1b6f51 ("scsi: pm80xx: Add sysfs attribute to check MPI state")
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
 drivers/scsi/pm8001/pm8001_ctl.c | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/scsi/pm8001/pm8001_ctl.c b/drivers/scsi/pm8001/pm8001_ctl.c
index 397eb9f6a1dd..41a63c9b719b 100644
--- a/drivers/scsi/pm8001/pm8001_ctl.c
+++ b/drivers/scsi/pm8001/pm8001_ctl.c
@@ -889,14 +889,6 @@ static ssize_t pm8001_show_update_fw(struct device *cdev,
 static DEVICE_ATTR(update_fw, S_IRUGO|S_IWUSR|S_IWGRP,
 	pm8001_show_update_fw, pm8001_store_update_fw);
 
-/**
- * ctl_mpi_state_show - controller MPI state check
- * @cdev: pointer to embedded class device
- * @buf: the buffer returned
- *
- * A sysfs 'read-only' shost attribute.
- */
-
 static const char *const mpiStateText[] = {
 	"MPI is not initialized",
 	"MPI is successfully initialized",
@@ -904,6 +896,14 @@ static const char *const mpiStateText[] = {
 	"MPI initialization failed with error in [31:16]"
 };
 
+/**
+ * ctl_mpi_state_show - controller MPI state check
+ * @cdev: pointer to embedded class device
+ * @attr: device attribute (unused)
+ * @buf: the buffer returned
+ *
+ * A sysfs 'read-only' shost attribute.
+ */
 static ssize_t ctl_mpi_state_show(struct device *cdev,
 		struct device_attribute *attr, char *buf)
 {
@@ -920,11 +920,11 @@ static DEVICE_ATTR_RO(ctl_mpi_state);
 /**
  * ctl_hmi_error_show - controller MPI initialization fails
  * @cdev: pointer to embedded class device
+ * @attr: device attribute (unused)
  * @buf: the buffer returned
  *
  * A sysfs 'read-only' shost attribute.
  */
-
 static ssize_t ctl_hmi_error_show(struct device *cdev,
 		struct device_attribute *attr, char *buf)
 {
@@ -941,11 +941,11 @@ static DEVICE_ATTR_RO(ctl_hmi_error);
 /**
  * ctl_raae_count_show - controller raae count check
  * @cdev: pointer to embedded class device
+ * @attr: device attribute (unused)
  * @buf: the buffer returned
  *
  * A sysfs 'read-only' shost attribute.
  */
-
 static ssize_t ctl_raae_count_show(struct device *cdev,
 		struct device_attribute *attr, char *buf)
 {
@@ -962,11 +962,11 @@ static DEVICE_ATTR_RO(ctl_raae_count);
 /**
  * ctl_iop0_count_show - controller iop0 count check
  * @cdev: pointer to embedded class device
+ * @attr: device attribute (unused)
  * @buf: the buffer returned
  *
  * A sysfs 'read-only' shost attribute.
  */
-
 static ssize_t ctl_iop0_count_show(struct device *cdev,
 		struct device_attribute *attr, char *buf)
 {
@@ -983,11 +983,11 @@ static DEVICE_ATTR_RO(ctl_iop0_count);
 /**
  * ctl_iop1_count_show - controller iop1 count check
  * @cdev: pointer to embedded class device
+ * @attr: device attribute (unused)
  * @buf: the buffer returned
  *
  * A sysfs 'read-only' shost attribute.
  */
-
 static ssize_t ctl_iop1_count_show(struct device *cdev,
 		struct device_attribute *attr, char *buf)
 {

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

* [PATCH v2 11/12] scsi: pmcraid: Fix a kernel-doc warning
  2021-11-29 19:45 [PATCH v2 00/12] A series of small SCSI patches Bart Van Assche
                   ` (9 preceding siblings ...)
  2021-11-29 19:46 ` [PATCH v2 10/12] scsi: pm8001: Fix kernel-doc warnings Bart Van Assche
@ 2021-11-29 19:46 ` Bart Van Assche
  2021-11-29 19:46 ` [PATCH v2 12/12] scsi: Remove superfluous #include <linux/async.h> directives Bart Van Assche
                   ` (2 subsequent siblings)
  13 siblings, 0 replies; 18+ messages in thread
From: Bart Van Assche @ 2021-11-29 19:46 UTC (permalink / raw)
  To: Martin K . Petersen
  Cc: Jaegeuk Kim, linux-scsi, Bart Van Assche, James E.J. Bottomley

Fix the following kernel-doc warning:

drivers/scsi/pmcraid.c:3317: warning: Excess function parameter 'done' description in 'pmcraid_queuecommand_lck'

Fixes: af049dfd0b10 ("scsi: core: Remove the 'done' argument from SCSI queuecommand_lck functions")
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
 drivers/scsi/pmcraid.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/scsi/pmcraid.c b/drivers/scsi/pmcraid.c
index 88046a793767..2fe7a0019fff 100644
--- a/drivers/scsi/pmcraid.c
+++ b/drivers/scsi/pmcraid.c
@@ -3302,7 +3302,6 @@ static int pmcraid_copy_sglist(
 /**
  * pmcraid_queuecommand_lck - Queue a mid-layer request
  * @scsi_cmd: scsi command struct
- * @done: done function
  *
  * This function queues a request generated by the mid-layer. Midlayer calls
  * this routine within host->lock. Some of the functions called by queuecommand

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

* [PATCH v2 12/12] scsi: Remove superfluous #include <linux/async.h> directives
  2021-11-29 19:45 [PATCH v2 00/12] A series of small SCSI patches Bart Van Assche
                   ` (10 preceding siblings ...)
  2021-11-29 19:46 ` [PATCH v2 11/12] scsi: pmcraid: Fix a kernel-doc warning Bart Van Assche
@ 2021-11-29 19:46 ` Bart Van Assche
  2021-11-30  4:02 ` [PATCH v2 00/12] A series of small SCSI patches Martin K. Petersen
  2021-12-03  3:03 ` Martin K. Petersen
  13 siblings, 0 replies; 18+ messages in thread
From: Bart Van Assche @ 2021-11-29 19:46 UTC (permalink / raw)
  To: Martin K . Petersen
  Cc: Jaegeuk Kim, linux-scsi, Bart Van Assche, Daejun Park,
	John Garry, James E.J. Bottomley, Luo Jiaxing,
	Gustavo A. R. Silva, Jason Yan, Avri Altman, Bean Huo,
	Keoseong Park

Remove this include directive from code that does not use any
functionality from kernel/async.c.

Reviewed-by: Daejun Park <daejun7.park@samsung.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
 drivers/scsi/hisi_sas/hisi_sas.h   | 1 -
 drivers/scsi/libsas/sas_discover.c | 1 -
 drivers/scsi/scsi.c                | 1 -
 drivers/scsi/scsi_pm.c             | 1 -
 drivers/scsi/scsi_priv.h           | 1 -
 drivers/scsi/sd.c                  | 1 -
 drivers/scsi/ufs/ufshpb.c          | 1 -
 7 files changed, 7 deletions(-)

diff --git a/drivers/scsi/hisi_sas/hisi_sas.h b/drivers/scsi/hisi_sas/hisi_sas.h
index 2213a91923a5..ed9419643235 100644
--- a/drivers/scsi/hisi_sas/hisi_sas.h
+++ b/drivers/scsi/hisi_sas/hisi_sas.h
@@ -8,7 +8,6 @@
 #define _HISI_SAS_H_
 
 #include <linux/acpi.h>
-#include <linux/async.h>
 #include <linux/blk-mq.h>
 #include <linux/blk-mq-pci.h>
 #include <linux/clk.h>
diff --git a/drivers/scsi/libsas/sas_discover.c b/drivers/scsi/libsas/sas_discover.c
index 12e1e36d7c04..758213694091 100644
--- a/drivers/scsi/libsas/sas_discover.c
+++ b/drivers/scsi/libsas/sas_discover.c
@@ -8,7 +8,6 @@
 
 #include <linux/scatterlist.h>
 #include <linux/slab.h>
-#include <linux/async.h>
 #include <scsi/scsi_host.h>
 #include <scsi/scsi_eh.h>
 #include "sas_internal.h"
diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c
index f6af1562cba4..dee4d9c6046d 100644
--- a/drivers/scsi/scsi.c
+++ b/drivers/scsi/scsi.c
@@ -55,7 +55,6 @@
 #include <linux/notifier.h>
 #include <linux/cpu.h>
 #include <linux/mutex.h>
-#include <linux/async.h>
 #include <asm/unaligned.h>
 
 #include <scsi/scsi.h>
diff --git a/drivers/scsi/scsi_pm.c b/drivers/scsi/scsi_pm.c
index b5a858c29488..0e841e8761c5 100644
--- a/drivers/scsi/scsi_pm.c
+++ b/drivers/scsi/scsi_pm.c
@@ -8,7 +8,6 @@
 
 #include <linux/pm_runtime.h>
 #include <linux/export.h>
-#include <linux/async.h>
 #include <linux/blk-pm.h>
 
 #include <scsi/scsi.h>
diff --git a/drivers/scsi/scsi_priv.h b/drivers/scsi/scsi_priv.h
index 0f5743f4769b..5c4786310a31 100644
--- a/drivers/scsi/scsi_priv.h
+++ b/drivers/scsi/scsi_priv.h
@@ -3,7 +3,6 @@
 #define _SCSI_PRIV_H
 
 #include <linux/device.h>
-#include <linux/async.h>
 #include <scsi/scsi_device.h>
 #include <linux/sbitmap.h>
 
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index 65875a598d62..2a50a840a00c 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -51,7 +51,6 @@
 #include <linux/major.h>
 #include <linux/mutex.h>
 #include <linux/string_helpers.h>
-#include <linux/async.h>
 #include <linux/slab.h>
 #include <linux/sed-opal.h>
 #include <linux/pm_runtime.h>
diff --git a/drivers/scsi/ufs/ufshpb.c b/drivers/scsi/ufs/ufshpb.c
index 2e31e1413826..9778d4fd03cc 100644
--- a/drivers/scsi/ufs/ufshpb.c
+++ b/drivers/scsi/ufs/ufshpb.c
@@ -10,7 +10,6 @@
  */
 
 #include <asm/unaligned.h>
-#include <linux/async.h>
 
 #include "ufshcd.h"
 #include "ufshpb.h"

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

* Re: [PATCH v2 00/12] A series of small SCSI patches
  2021-11-29 19:45 [PATCH v2 00/12] A series of small SCSI patches Bart Van Assche
                   ` (11 preceding siblings ...)
  2021-11-29 19:46 ` [PATCH v2 12/12] scsi: Remove superfluous #include <linux/async.h> directives Bart Van Assche
@ 2021-11-30  4:02 ` Martin K. Petersen
  2021-12-03  3:03 ` Martin K. Petersen
  13 siblings, 0 replies; 18+ messages in thread
From: Martin K. Petersen @ 2021-11-30  4:02 UTC (permalink / raw)
  To: Bart Van Assche; +Cc: Martin K . Petersen, Jaegeuk Kim, linux-scsi


Bart,

> This patch series fixes a number of static checker warnings. Most of
> these patches fix warnings introduced during the merge window.

Applied to 5.17/scsi-staging, thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering

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

* Re: [PATCH v2 00/12] A series of small SCSI patches
  2021-11-29 19:45 [PATCH v2 00/12] A series of small SCSI patches Bart Van Assche
                   ` (12 preceding siblings ...)
  2021-11-30  4:02 ` [PATCH v2 00/12] A series of small SCSI patches Martin K. Petersen
@ 2021-12-03  3:03 ` Martin K. Petersen
  13 siblings, 0 replies; 18+ messages in thread
From: Martin K. Petersen @ 2021-12-03  3:03 UTC (permalink / raw)
  To: Bart Van Assche; +Cc: Martin K . Petersen, Jaegeuk Kim, linux-scsi

On Mon, 29 Nov 2021 11:45:57 -0800, Bart Van Assche wrote:

> This patch series fixes a number of static checker warnings. Most of these
> patches fix warnings introduced during the merge window.
> 
> Please consider these patches for kernel v5.17.
> 
> Thanks,
> 
> [...]

Applied to 5.17/scsi-queue, thanks!

[01/12] scsi: core: Suppress a kernel-doc warning
        https://git.kernel.org/mkp/scsi/c/776141dda77f
[02/12] scsi: core: Declare 'scsi_scan_type' static
        https://git.kernel.org/mkp/scsi/c/7cc5aad6c98e
[03/12] scsi: core: Show SCMD_LAST in text form
        https://git.kernel.org/mkp/scsi/c/3369046e54ca
[04/12] scsi: a100u2w: Fix a kernel-doc warning
        https://git.kernel.org/mkp/scsi/c/332053e87cda
[05/12] scsi: atp870u: Fix a kernel-doc warning
        https://git.kernel.org/mkp/scsi/c/471d6840559a
[06/12] scsi: bfa: Declare 'bfad_im_vport_attrs' static
        https://git.kernel.org/mkp/scsi/c/69e623791eb3
[07/12] scsi: dc395x: Fix a kernel-doc warning
        https://git.kernel.org/mkp/scsi/c/013d14eafd5c
[08/12] scsi: initio: Fix a kernel-doc warning
        https://git.kernel.org/mkp/scsi/c/0addfa587797
[09/12] scsi: megaraid: Fix a kernel-doc warning
        https://git.kernel.org/mkp/scsi/c/acad9c432499
[10/12] scsi: pm8001: Fix kernel-doc warnings
        https://git.kernel.org/mkp/scsi/c/d6e71a43b11c
[11/12] scsi: pmcraid: Fix a kernel-doc warning
        https://git.kernel.org/mkp/scsi/c/b558fa11e4b5
[12/12] scsi: Remove superfluous #include <linux/async.h> directives
        https://git.kernel.org/mkp/scsi/c/db33028647a3

-- 
Martin K. Petersen	Oracle Linux Engineering

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

* Re: [PATCH v2 01/12] scsi: core: Suppress a kernel-doc warning
  2021-11-29 19:45 ` [PATCH v2 01/12] scsi: core: Suppress a kernel-doc warning Bart Van Assche
@ 2021-12-13  2:53   ` Randy Dunlap
  2021-12-13  3:03     ` Bart Van Assche
  0 siblings, 1 reply; 18+ messages in thread
From: Randy Dunlap @ 2021-12-13  2:53 UTC (permalink / raw)
  To: Bart Van Assche, Martin K . Petersen
  Cc: Jaegeuk Kim, linux-scsi, Stephen Rothwell, James E.J. Bottomley

Hi Bart, Martin,

On 11/29/21 11:45, Bart Van Assche wrote:
> Suppress the following kernel-doc warning:
> 
> drivers/scsi/scsi_scan.c:129: warning: Function parameter or member 'dev' not described in 'scsi_enable_async_suspend'
> 
> Fixes: a19a93e4c6a9 ("scsi: core: pm: Rely on the device driver core for async power management")
> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> Signed-off-by: Bart Van Assche <bvanassche@acm.org>
> ---
>  drivers/scsi/scsi_scan.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c
> index 23e1c0acdeae..2f80509fa036 100644
> --- a/drivers/scsi/scsi_scan.c
> +++ b/drivers/scsi/scsi_scan.c
> @@ -122,7 +122,7 @@ struct async_scan_data {
>  	struct completion prev_finished;
>  };
>  
> -/**
> +/*
>   * scsi_enable_async_suspend - Enable async suspend and resume
>   */
>  void scsi_enable_async_suspend(struct device *dev)
> 

Why this instead of describing @dev: ?

 * @dev: the struct device to enable for async suspend and resume


thanks.
-- 
~Randy

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

* Re: [PATCH v2 01/12] scsi: core: Suppress a kernel-doc warning
  2021-12-13  2:53   ` Randy Dunlap
@ 2021-12-13  3:03     ` Bart Van Assche
  2021-12-13  3:06       ` Randy Dunlap
  0 siblings, 1 reply; 18+ messages in thread
From: Bart Van Assche @ 2021-12-13  3:03 UTC (permalink / raw)
  To: Randy Dunlap, Martin K . Petersen
  Cc: Jaegeuk Kim, linux-scsi, Stephen Rothwell, James E.J. Bottomley

On 12/12/21 18:53, Randy Dunlap wrote:
> On 11/29/21 11:45, Bart Van Assche wrote:
>> -/**
>> +/*
>>    * scsi_enable_async_suspend - Enable async suspend and resume
>>    */
>>   void scsi_enable_async_suspend(struct device *dev)
>>
> 
> Why this instead of describing @dev: ?
> 
>   * @dev: the struct device to enable for async suspend and resume

Hi Randy,

I expect that anyone can guess the meaning of the @dev argument without 
adding any explanation. Hence the choice to convert the kernel-doc 
comment into a regular comment.

Thanks,

Bart.

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

* Re: [PATCH v2 01/12] scsi: core: Suppress a kernel-doc warning
  2021-12-13  3:03     ` Bart Van Assche
@ 2021-12-13  3:06       ` Randy Dunlap
  0 siblings, 0 replies; 18+ messages in thread
From: Randy Dunlap @ 2021-12-13  3:06 UTC (permalink / raw)
  To: Bart Van Assche, Martin K . Petersen
  Cc: Jaegeuk Kim, linux-scsi, Stephen Rothwell, James E.J. Bottomley



On 12/12/21 19:03, Bart Van Assche wrote:
> On 12/12/21 18:53, Randy Dunlap wrote:
>> On 11/29/21 11:45, Bart Van Assche wrote:
>>> -/**
>>> +/*
>>>    * scsi_enable_async_suspend - Enable async suspend and resume
>>>    */
>>>   void scsi_enable_async_suspend(struct device *dev)
>>>
>>
>> Why this instead of describing @dev: ?
>>
>>   * @dev: the struct device to enable for async suspend and resume
> 
> Hi Randy,
> 
> I expect that anyone can guess the meaning of the @dev argument without adding any explanation. Hence the choice to convert the kernel-doc comment into a regular comment.

That's probably true, but we do try to document (using kernel-doc)
non-static functions for other people's use.

Oh well. Thanks.

-- 
~Randy

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

end of thread, other threads:[~2021-12-13  3:06 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-29 19:45 [PATCH v2 00/12] A series of small SCSI patches Bart Van Assche
2021-11-29 19:45 ` [PATCH v2 01/12] scsi: core: Suppress a kernel-doc warning Bart Van Assche
2021-12-13  2:53   ` Randy Dunlap
2021-12-13  3:03     ` Bart Van Assche
2021-12-13  3:06       ` Randy Dunlap
2021-11-29 19:45 ` [PATCH v2 02/12] scsi: core: Declare 'scsi_scan_type' static Bart Van Assche
2021-11-29 19:46 ` [PATCH v2 03/12] scsi: core: Show SCMD_LAST in text form Bart Van Assche
2021-11-29 19:46 ` [PATCH v2 04/12] scsi: a100u2w: Fix a kernel-doc warning Bart Van Assche
2021-11-29 19:46 ` [PATCH v2 05/12] scsi: atp870u: " Bart Van Assche
2021-11-29 19:46 ` [PATCH v2 06/12] scsi: bfa: Declare 'bfad_im_vport_attrs' static Bart Van Assche
2021-11-29 19:46 ` [PATCH v2 07/12] scsi: dc395x: Fix a kernel-doc warning Bart Van Assche
2021-11-29 19:46 ` [PATCH v2 08/12] scsi: initio: " Bart Van Assche
2021-11-29 19:46 ` [PATCH v2 09/12] scsi: megaraid: " Bart Van Assche
2021-11-29 19:46 ` [PATCH v2 10/12] scsi: pm8001: Fix kernel-doc warnings Bart Van Assche
2021-11-29 19:46 ` [PATCH v2 11/12] scsi: pmcraid: Fix a kernel-doc warning Bart Van Assche
2021-11-29 19:46 ` [PATCH v2 12/12] scsi: Remove superfluous #include <linux/async.h> directives Bart Van Assche
2021-11-30  4:02 ` [PATCH v2 00/12] A series of small SCSI patches Martin K. Petersen
2021-12-03  3:03 ` Martin K. Petersen

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