A series of small SCSI patches
Subsystems (8)
v2 cover A series of small SCSI patches
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(-)
PATCH v2 1/12 scsi: core: Suppress a kernel-doc warning
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'
--- drivers/scsi/scsi_scan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/scsi_scan.c +1 -1
@@ -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)
Re: [PATCH v2 01/12] scsi: core: Suppress a kernel-doc warning
Hi Bart, Martin,
Quoted 17 lines · Bart Van Assche
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 <[email protected]>Signed-off-by Bart Van Assche <[email protected]>--- drivers/scsi/scsi_scan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/scsi/scsi_scan.c +0
-0
drivers/scsi/scsi_scan.c struct async_scan_data { · line 128
Quoted 8 lines
drivers/scsi/scsi_scan.c +1
-1@@ -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.
Signature · 1 line
~Randy
Re: [PATCH v2 01/12] scsi: core: Suppress a kernel-doc warning
Quoted 11 lines · Randy Dunlap
drivers/scsi/scsi_scan.c struct async_scan_data { · line 128
Quoted 6 lines · Bart Van Assche
drivers/scsi/scsi_scan.c +1
-1-/** +/* * 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.
Re: [PATCH v2 01/12] scsi: core: Suppress a kernel-doc warning
Quoted 11 lines · Bart Van Assche
Quoted 10 lines · Randy Dunlap
Quoted 6 lines · Bart Van Assche
drivers/scsi/scsi_scan.c +1
-1-/** +/* *
scsi_enable_async_suspend- Enable async suspend and resume */
voidscsi_enable_async_suspend(struct device *dev)Why this instead of describing @dev: ?
Quoted 5 lines
Quoted 1 line
* @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.
Signature · 1 line
~Randy
PATCH v2 2/12 scsi: core: Declare 'scsi_scan_type' static
In reply to Bart Van Assche'scsi_scan_type' is only used in one source file. Hence declare it static.
--- drivers/scsi/scsi_scan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/scsi_scan.c +1 -1
@@ -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 );
PATCH v2 3/12 scsi: core: Show SCMD_LAST in text form
In reply to Bart Van AsscheThe 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.
--- drivers/scsi/scsi_debugfs.c | 1 + 1 file changed, 1 insertion(+)
drivers/scsi/scsi_debugfs.c +1 -0
@@ -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
PATCH v2 4/12 scsi: a100u2w: Fix a kernel-doc warning
In reply to Bart Van AsscheFix the following kernel-doc warning:
drivers/scsi/a100u2w.c:915: warning: Excess function parameter 'done' description in 'inia100_queue_lck'
--- drivers/scsi/a100u2w.c | 2 -- 1 file changed, 2 deletions(-)
drivers/scsi/a100u2w.c +0 -2
@@ -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;
PATCH v2 5/12 scsi: atp870u: Fix a kernel-doc warning
In reply to Bart Van AsscheFix the following kernel-doc warning:
drivers/scsi/atp870u.c:622: warning: Excess function parameter 'done' description in 'atp870u_queuecommand_lck'
--- drivers/scsi/atp870u.c | 1 - 1 file changed, 1 deletion(-)
drivers/scsi/atp870u.c +0 -1
@@ -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. */
PATCH v2 6/12 scsi: bfa: Declare 'bfad_im_vport_attrs' static
In reply to Bart Van AsscheFix the following kernel-doc warning:
'bfad_im_vport_attrs' is only used in one source file. Hence declare this array static.
--- drivers/scsi/bfa/bfad_attr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/bfa/bfad_attr.c +1 -1
@@ -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,
PATCH v2 7/12 scsi: dc395x: Fix a kernel-doc warning
In reply to Bart Van AsscheFix the following kernel-doc warning:
drivers/scsi/dc395x.c:964: warning: Excess function parameter 'done' description in 'dc395x_queue_command_lck'
--- drivers/scsi/dc395x.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/scsi/dc395x.c +1 -2
@@ -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;
PATCH v2 8/12 scsi: initio: Fix a kernel-doc warning
In reply to Bart Van AsscheFix the following kernel-doc warning:
drivers/scsi/initio.c:2613: warning: Excess function parameter 'done' description in 'i91u_queuecommand_lck'
--- drivers/scsi/initio.c | 2 -- 1 file changed, 2 deletions(-)
drivers/scsi/initio.c +0 -2
@@ -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;
PATCH v2 9/12 scsi: megaraid: Fix a kernel-doc warning
In reply to Bart Van AsscheFix the following kernel-doc warning:
drivers/scsi/megaraid/megaraid_mbox.c:1439: warning: Excess function parameter 'done' description in 'megaraid_queue_command_lck'
--- drivers/scsi/megaraid/megaraid_mbox.c | 1 - 1 file changed, 1 deletion(-)
drivers/scsi/megaraid/megaraid_mbox.c +0 -1
@@ -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. */
PATCH v2 10/12 scsi: pm8001: Fix kernel-doc warnings
In reply to Bart Van AsscheFix 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'
--- drivers/scsi/pm8001/pm8001_ctl.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-)
drivers/scsi/pm8001/pm8001_ctl.c +12 -12
@@ -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) {
PATCH v2 11/12 scsi: pmcraid: Fix a kernel-doc warning
In reply to Bart Van AsscheFix the following kernel-doc warning:
drivers/scsi/pmcraid.c:3317: warning: Excess function parameter 'done' description in 'pmcraid_queuecommand_lck'
--- drivers/scsi/pmcraid.c | 1 - 1 file changed, 1 deletion(-)
drivers/scsi/pmcraid.c +0 -1
@@ -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
PATCH v2 12/12 scsi: Remove superfluous #include <linux/async.h> directives
In reply to Bart Van AsscheRemove this include directive from code that does not use any functionality from kernel/async.c.
--- 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(-)
drivers/scsi/hisi_sas/hisi_sas.h +0 -1
@@ -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>
drivers/scsi/libsas/sas_discover.c +0 -1
@@ -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"
drivers/scsi/scsi.c +0 -1
@@ -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>
drivers/scsi/scsi_pm.c +0 -1
@@ -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>
drivers/scsi/scsi_priv.h +0 -1
@@ -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>
drivers/scsi/sd.c +0 -1
@@ -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>
drivers/scsi/ufs/ufshpb.c +0 -1
@@ -10,7 +10,6 @@*/ #include <asm/unaligned.h> -#include <linux/async.h> #include "ufshcd.h" #include "ufshpb.h"
Martin K. Petersen
AppliedBart,
Quoted 2 lines
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!
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering
Martin K. Petersen
AppliedQuoted 8 lines · Bart Van Assche
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
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering