All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 00/29] Fix a bunch more SCSI related W=1 warnings
@ 2020-07-13  7:46 Lee Jones
  2020-07-13  7:46 ` [PATCH v2 01/29] scsi: libfc: fc_exch: Supply some missing kerneldoc struct/function attributes/params Lee Jones
                   ` (29 more replies)
  0 siblings, 30 replies; 53+ messages in thread
From: Lee Jones @ 2020-07-13  7:46 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.

Slowly working through the SCSI related ones.  There are many.

Change-log:

v1 => v2
 - Collected *-by tags
 - Squashed patch 13 => 11
   - Suggested by Johannes Thumshirn

Lee Jones (29):
  scsi: libfc: fc_exch: Supply some missing kerneldoc struct/function
    attributes/params
  include: scsi: scsi_transport_fc: Match HBA Attribute Length with
    HBAAPI V2.0 definitions
  scsi: libfc: fc_disc: trivial: Fix spelling mistake of 'discovery'
  scsi: fcoe: fcoe: Fix various kernel-doc infringements
  scsi: fcoe: fcoe_ctlr: Fix a myriad of documentation issues
  scsi: fcoe: fcoe_transport: Correct some kernel-doc issues
  scsi: bnx2fc: bnx2fc_fcoe: Repair a range of kerneldoc issues
  scsi: qedf: qedf_main: Demote obvious misuse of kerneldoc to standard
    comment blocks
  scsi: qedf: qedf_main: Remove set but not checked variable 'tmp'
  scsi: libfc: fc_lport: Repair function parameter documentation
  scsi: libfc: fc_rport: Fix a couple of misdocumented function
    parameters
  scsi: libfc: fc_fcp: Provide missing and repair existing function
    documentation
  scsi: bnx2fc: bnx2fc_hwi: Fix a couple  of bitrotted function
    documentation headers
  scsi: arcmsr: arcmsr_hba: Remove some set but unused variables
  scsi: arcmsr: arcmsr_hba: Make room for the trailing NULL, even if it
    is over-written
  scsi: qedf: qedf_io: Remove a whole host of unused variables
  scsi: bnx2fc: bnx2fc_tgt: Demote obvious misuse of kerneldoc to
    standard comment blocks
  scsi: aic7xxx: aic7xxx_osm: Remove unused variable 'tinfo'
  scsi: aic7xxx: aic7xxx_osm: Remove unused variable 'ahc'
  scsi: aic7xxx: aic7xxx_osm: Remove unused variable 'targ'
  scsi: aic7xxx: aic7xxx_osm: Fix 'amount_xferred' set but not used
    issue
  scsi: qedf: qedf_debugfs: Demote obvious misuse of kerneldoc to
    standard comment blocks
  scsi: aacraid: linit: Provide suggested curly braces around empty body
    of if()
  scsi: aacraid: linit: Fix a couple of small kerneldoc issues
  scsi: aic94xx: aic94xx_init: Demote seemingly unintentional kerneldoc
    header
  scsi: pm8001: pm8001_init: Demote obvious misuse of kerneldoc and
    update others
  scsi: aic94xx: aic94xx_hwi: Repair kerneldoc formatting error and
    remove extra param
  scsi: aacraid: aachba: Fix a bunch of function doc formatting errors
  scsi: qla4xxx: ql4_init: Provide a missing function param description
    and fix formatting

 drivers/scsi/aacraid/aachba.c       | 17 +++-------------
 drivers/scsi/aacraid/linit.c        |  6 +++---
 drivers/scsi/aic7xxx/aic7xxx_osm.c  | 13 ++----------
 drivers/scsi/aic94xx/aic94xx_hwi.c  |  3 +--
 drivers/scsi/aic94xx/aic94xx_init.c |  2 +-
 drivers/scsi/arcmsr/arcmsr_hba.c    | 31 ++++++++++++-----------------
 drivers/scsi/bnx2fc/bnx2fc_fcoe.c   | 18 ++++++++---------
 drivers/scsi/bnx2fc/bnx2fc_hwi.c    |  6 +++---
 drivers/scsi/bnx2fc/bnx2fc_tgt.c    |  7 +++----
 drivers/scsi/fcoe/fcoe.c            | 10 ++++------
 drivers/scsi/fcoe/fcoe_ctlr.c       | 26 ++++++++++++------------
 drivers/scsi/fcoe/fcoe_transport.c  |  4 +++-
 drivers/scsi/libfc/fc_disc.c        |  2 +-
 drivers/scsi/libfc/fc_exch.c        |  7 ++++++-
 drivers/scsi/libfc/fc_fcp.c         | 11 ++++++----
 drivers/scsi/libfc/fc_lport.c       |  7 +++++--
 drivers/scsi/libfc/fc_rport.c       |  4 ++--
 drivers/scsi/pm8001/pm8001_init.c   | 30 ++++++++++++++--------------
 drivers/scsi/qedf/qedf_debugfs.c    | 18 ++++++++---------
 drivers/scsi/qedf/qedf_io.c         | 30 ++++------------------------
 drivers/scsi/qedf/qedf_main.c       | 10 ++++------
 drivers/scsi/qla4xxx/ql4_init.c     |  7 ++++---
 include/scsi/fc/fc_ms.h             |  4 ++--
 23 files changed, 115 insertions(+), 158 deletions(-)

-- 
2.25.1


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

* [PATCH v2 01/29] scsi: libfc: fc_exch: Supply some missing kerneldoc struct/function attributes/params
  2020-07-13  7:46 [PATCH v2 00/29] Fix a bunch more SCSI related W=1 warnings Lee Jones
@ 2020-07-13  7:46 ` Lee Jones
  2020-07-14  6:47   ` Hannes Reinecke
  2020-07-13  7:46 ` [PATCH v2 02/29] include: scsi: scsi_transport_fc: Match HBA Attribute Length with HBAAPI V2.0 definitions Lee Jones
                   ` (28 subsequent siblings)
  29 siblings, 1 reply; 53+ messages in thread
From: Lee Jones @ 2020-07-13  7:46 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_exch.c:66: warning: Function parameter or member 'left' not described in 'fc_exch_pool'
 drivers/scsi/libfc/fc_exch.c:66: warning: Function parameter or member 'right' not described in 'fc_exch_pool'
 drivers/scsi/libfc/fc_exch.c:100: warning: Function parameter or member 'lport' not described in 'fc_exch_mgr'
 drivers/scsi/libfc/fc_exch.c:727: warning: Function parameter or member 'ep' not described in 'fc_invoke_resp'
 drivers/scsi/libfc/fc_exch.c:727: warning: Function parameter or member 'sp' not described in 'fc_invoke_resp'
 drivers/scsi/libfc/fc_exch.c:727: warning: Function parameter or member 'fp' not described in 'fc_invoke_resp'

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

diff --git a/drivers/scsi/libfc/fc_exch.c b/drivers/scsi/libfc/fc_exch.c
index 52e8666598531..16eb3b60ed582 100644
--- a/drivers/scsi/libfc/fc_exch.c
+++ b/drivers/scsi/libfc/fc_exch.c
@@ -49,6 +49,8 @@ static struct workqueue_struct *fc_exch_workqueue;
  * @total_exches: Total allocated exchanges
  * @lock:	  Exch pool lock
  * @ex_list:	  List of exchanges
+ * @left:	  Cache of free slot in exch array
+ * @right:	  Cache of free slot in exch array
  *
  * This structure manages per cpu exchanges in array of exchange pointers.
  * This array is allocated followed by struct fc_exch_pool memory for
@@ -60,7 +62,6 @@ struct fc_exch_pool {
 	u16		 next_index;
 	u16		 total_exches;
 
-	/* two cache of free slot in exch array */
 	u16		 left;
 	u16		 right;
 } ____cacheline_aligned_in_smp;
@@ -74,6 +75,7 @@ struct fc_exch_pool {
  * @ep_pool:	    Reserved exchange pointers
  * @pool_max_index: Max exch array index in exch pool
  * @pool:	    Per cpu exch pool
+ * @lport:	    Local exchange port
  * @stats:	    Statistics structure
  *
  * This structure is the center for creating exchanges and sequences.
@@ -702,6 +704,9 @@ int fc_seq_exch_abort(const struct fc_seq *req_sp, unsigned int timer_msec)
 
 /**
  * fc_invoke_resp() - invoke ep->resp()
+ * @ep:	   The exchange to be operated on
+ * @fp:	   The frame pointer to pass through to ->resp()
+ * @sp:	   The sequence pointer to pass through to ->resp()
  *
  * Notes:
  * It is assumed that after initialization finished (this means the
-- 
2.25.1


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

* [PATCH v2 02/29] include: scsi: scsi_transport_fc: Match HBA Attribute Length with HBAAPI V2.0 definitions
  2020-07-13  7:46 [PATCH v2 00/29] Fix a bunch more SCSI related W=1 warnings Lee Jones
  2020-07-13  7:46 ` [PATCH v2 01/29] scsi: libfc: fc_exch: Supply some missing kerneldoc struct/function attributes/params Lee Jones
@ 2020-07-13  7:46 ` Lee Jones
  2020-07-14  6:49   ` Hannes Reinecke
  2020-07-13  7:46 ` [PATCH v2 03/29] scsi: libfc: fc_disc: trivial: Fix spelling mistake of 'discovery' Lee Jones
                   ` (27 subsequent siblings)
  29 siblings, 1 reply; 53+ messages in thread
From: Lee Jones @ 2020-07-13  7:46 UTC (permalink / raw)
  To: jejb, martin.petersen; +Cc: linux-kernel, linux-scsi, Lee Jones

According to 'include/scsi/scsi_transport_fc.h':

 "Attributes are based on HBAAPI V2.0 definitions"

... so it seems sane to match the 'HBA Attribute Length' to them.

If we don't, the compiler complains that the copied data will be truncated.

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

 In file included from include/linux/bitmap.h:9,
 from include/linux/cpumask.h:12,
 from include/linux/smp.h:13,
 from include/linux/percpu.h:7,
 from include/scsi/libfc.h:13,
 from drivers/scsi/libfc/fc_elsct.c:17:
 In function ‘strncpy’,
 inlined from ‘fc_ct_ms_fill.constprop’ at include/scsi/fc_encode.h:263:3:
 include/linux/string.h:297:30: warning: ‘__builtin_strncpy’ output may be truncated copying 64 bytes from a string of length  79 [-Wstringop-truncation]
 297 | #define __underlying_strncpy __builtin_strncpy
 | ^
 include/linux/string.h:307:9: note: in expansion of macro ‘__underlying_strncpy’
 307 | return __underlying_strncpy(p, q, size);
 | ^~~~~~~~~~~~~~~~~~~~
 In function ‘strncpy’,
 inlined from ‘fc_ct_ms_fill.constprop’ at include/scsi/fc_encode.h:275:3:
 include/linux/string.h:297:30: warning: ‘__builtin_strncpy’ output may be truncated copying 64 bytes from a string of length 79 [-Wstringop-truncation]
 297 | #define __underlying_strncpy __builtin_strncpy
 | ^
 include/linux/string.h:307:9: note: in expansion of macro ‘__underlying_strncpy’
 307 | return __underlying_strncpy(p, q, size);
 | ^~~~~~~~~~~~~~~~~~~~

Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 include/scsi/fc/fc_ms.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/scsi/fc/fc_ms.h b/include/scsi/fc/fc_ms.h
index 800d53dc94705..9e273fed0a85f 100644
--- a/include/scsi/fc/fc_ms.h
+++ b/include/scsi/fc/fc_ms.h
@@ -63,8 +63,8 @@ enum fc_fdmi_hba_attr_type {
  * HBA Attribute Length
  */
 #define FC_FDMI_HBA_ATTR_NODENAME_LEN		8
-#define FC_FDMI_HBA_ATTR_MANUFACTURER_LEN	64
-#define FC_FDMI_HBA_ATTR_SERIALNUMBER_LEN	64
+#define FC_FDMI_HBA_ATTR_MANUFACTURER_LEN	80
+#define FC_FDMI_HBA_ATTR_SERIALNUMBER_LEN	80
 #define FC_FDMI_HBA_ATTR_MODEL_LEN		256
 #define FC_FDMI_HBA_ATTR_MODELDESCR_LEN		256
 #define FC_FDMI_HBA_ATTR_HARDWAREVERSION_LEN	256
-- 
2.25.1


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

* [PATCH v2 03/29] scsi: libfc: fc_disc: trivial: Fix spelling mistake of 'discovery'
  2020-07-13  7:46 [PATCH v2 00/29] Fix a bunch more SCSI related W=1 warnings Lee Jones
  2020-07-13  7:46 ` [PATCH v2 01/29] scsi: libfc: fc_exch: Supply some missing kerneldoc struct/function attributes/params Lee Jones
  2020-07-13  7:46 ` [PATCH v2 02/29] include: scsi: scsi_transport_fc: Match HBA Attribute Length with HBAAPI V2.0 definitions Lee Jones
@ 2020-07-13  7:46 ` Lee Jones
  2020-07-14  6:50   ` Hannes Reinecke
  2020-07-13  7:46 ` [PATCH v2 04/29] scsi: fcoe: fcoe: Fix various kernel-doc infringements Lee Jones
                   ` (26 subsequent siblings)
  29 siblings, 1 reply; 53+ messages in thread
From: Lee Jones @ 2020-07-13  7:46 UTC (permalink / raw)
  To: jejb, martin.petersen
  Cc: linux-kernel, linux-scsi, Lee Jones, Hannes Reinecke, Johannes Thumshirn

This is my fault (can't even blame copy/paste).

Cc: Hannes Reinecke <hare@suse.de>
Reported-by: Johannes Thumshirn <Johannes.Thumshirn@wdc.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/scsi/libfc/fc_disc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/libfc/fc_disc.c b/drivers/scsi/libfc/fc_disc.c
index 428f40cfd1c36..19721db232839 100644
--- a/drivers/scsi/libfc/fc_disc.c
+++ b/drivers/scsi/libfc/fc_disc.c
@@ -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.
- * @disc:  The descovery context
+ * @disc:  The discovery context
  * @buf:   The GPN_FT response buffer
  * @len:   The size of response buffer
  *
-- 
2.25.1


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

* [PATCH v2 04/29] scsi: fcoe: fcoe: Fix various kernel-doc infringements
  2020-07-13  7:46 [PATCH v2 00/29] Fix a bunch more SCSI related W=1 warnings Lee Jones
                   ` (2 preceding siblings ...)
  2020-07-13  7:46 ` [PATCH v2 03/29] scsi: libfc: fc_disc: trivial: Fix spelling mistake of 'discovery' Lee Jones
@ 2020-07-13  7:46 ` Lee Jones
  2020-07-14  6:58   ` Hannes Reinecke
  2020-07-13  7:46 ` [PATCH v2 05/29] scsi: fcoe: fcoe_ctlr: Fix a myriad of documentation issues Lee Jones
                   ` (25 subsequent siblings)
  29 siblings, 1 reply; 53+ messages in thread
From: Lee Jones @ 2020-07-13  7:46 UTC (permalink / raw)
  To: jejb, martin.petersen
  Cc: linux-kernel, linux-scsi, Lee Jones, Hannes Reinecke

A couple of headers make no attempt to document their associated function
parameters.  Others looks as if they are suffering with a little bitrot.

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

 drivers/scsi/fcoe/fcoe.c:654: warning: Function parameter or member 'lport' not described in 'fcoe_netdev_features_change'
 drivers/scsi/fcoe/fcoe.c:654: warning: Function parameter or member 'netdev' not described in 'fcoe_netdev_features_change'
 drivers/scsi/fcoe/fcoe.c:2039: warning: Function parameter or member 'ctlr_dev' not described in 'fcoe_ctlr_mode'
 drivers/scsi/fcoe/fcoe.c:2039: warning: Excess function parameter 'cdev' description in 'fcoe_ctlr_mode'
 drivers/scsi/fcoe/fcoe.c:2144: warning: Function parameter or member 'fcoe' not described in 'fcoe_dcb_create'
 drivers/scsi/fcoe/fcoe.c:2144: warning: Excess function parameter 'netdev' description in 'fcoe_dcb_create'
 drivers/scsi/fcoe/fcoe.c:2144: warning: Excess function parameter 'port' description in 'fcoe_dcb_create'
 drivers/scsi/fcoe/fcoe.c:2627: warning: Function parameter or member 'lport' not described in 'fcoe_elsct_send'
 drivers/scsi/fcoe/fcoe.c:2627: warning: Function parameter or member 'did' not described in 'fcoe_elsct_send'
 drivers/scsi/fcoe/fcoe.c:2627: warning: Function parameter or member 'fp' not described in 'fcoe_elsct_send'
 drivers/scsi/fcoe/fcoe.c:2627: warning: Function parameter or member 'op' not described in 'fcoe_elsct_send'
 drivers/scsi/fcoe/fcoe.c:2627: warning: Function parameter or member 'resp' not described in 'fcoe_elsct_send'
 drivers/scsi/fcoe/fcoe.c:2627: warning: Function parameter or member 'arg' not described in 'fcoe_elsct_send'
 drivers/scsi/fcoe/fcoe.c:2627: warning: Function parameter or member 'timeout' not described in 'fcoe_elsct_send'

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

diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c
index cb41d166e0c0f..0f9274960dc6b 100644
--- a/drivers/scsi/fcoe/fcoe.c
+++ b/drivers/scsi/fcoe/fcoe.c
@@ -645,7 +645,7 @@ static int fcoe_lport_config(struct fc_lport *lport)
 	return 0;
 }
 
-/**
+/*
  * fcoe_netdev_features_change - Updates the lport's offload flags based
  * on the LLD netdev's FCoE feature flags
  */
@@ -2029,7 +2029,7 @@ static int fcoe_ctlr_enabled(struct fcoe_ctlr_device *cdev)
 
 /**
  * fcoe_ctlr_mode() - Switch FIP mode
- * @cdev: The FCoE Controller that is being modified
+ * @ctlr_dev: The FCoE Controller that is being modified
  *
  * When the FIP mode has been changed we need to update
  * the multicast addresses to ensure we get the correct
@@ -2136,9 +2136,7 @@ static bool fcoe_match(struct net_device *netdev)
 
 /**
  * fcoe_dcb_create() - Initialize DCB attributes and hooks
- * @netdev: The net_device object of the L2 link that should be queried
- * @port: The fcoe_port to bind FCoE APP priority with
- * @
+ * @fcoe:   The new FCoE interface
  */
 static void fcoe_dcb_create(struct fcoe_interface *fcoe)
 {
@@ -2609,7 +2607,7 @@ static void fcoe_logo_resp(struct fc_seq *seq, struct fc_frame *fp, void *arg)
 	fc_lport_logo_resp(seq, fp, lport);
 }
 
-/**
+/*
  * fcoe_elsct_send - FCoE specific ELS handler
  *
  * This does special case handling of FIP encapsualted ELS exchanges for FCoE,
-- 
2.25.1


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

* [PATCH v2 05/29] scsi: fcoe: fcoe_ctlr: Fix a myriad of documentation issues
  2020-07-13  7:46 [PATCH v2 00/29] Fix a bunch more SCSI related W=1 warnings Lee Jones
                   ` (3 preceding siblings ...)
  2020-07-13  7:46 ` [PATCH v2 04/29] scsi: fcoe: fcoe: Fix various kernel-doc infringements Lee Jones
@ 2020-07-13  7:46 ` Lee Jones
  2020-07-14  7:00   ` Hannes Reinecke
                     ` (2 more replies)
  2020-07-13  7:46 ` [PATCH v2 06/29] scsi: fcoe: fcoe_transport: Correct some kernel-doc issues Lee Jones
                   ` (24 subsequent siblings)
  29 siblings, 3 replies; 53+ messages in thread
From: Lee Jones @ 2020-07-13  7:46 UTC (permalink / raw)
  To: jejb, martin.petersen
  Cc: linux-kernel, linux-scsi, Lee Jones, Hannes Reinecke

Mostly missing or incorrect (bitrotted) function parameters.

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

 drivers/scsi/fcoe/fcoe_ctlr.c:139: warning: Function parameter or member 'mode' not described in 'fcoe_ctlr_init'
 drivers/scsi/fcoe/fcoe_ctlr.c:604: warning: Function parameter or member 'lport' not described in 'fcoe_ctlr_encaps'
 drivers/scsi/fcoe/fcoe_ctlr.c:1312: warning: Function parameter or member 'skb' not described in 'fcoe_ctlr_recv_clr_vlink'
 drivers/scsi/fcoe/fcoe_ctlr.c:1312: warning: Excess function parameter 'fh' description in 'fcoe_ctlr_recv_clr_vlink'
 drivers/scsi/fcoe/fcoe_ctlr.c:1781: warning: Function parameter or member 't' not described in 'fcoe_ctlr_timeout'
 drivers/scsi/fcoe/fcoe_ctlr.c:1781: warning: Excess function parameter 'arg' description in 'fcoe_ctlr_timeout'
 drivers/scsi/fcoe/fcoe_ctlr.c:1904: warning: Function parameter or member 'lport' not described in 'fcoe_ctlr_recv_flogi'
 drivers/scsi/fcoe/fcoe_ctlr.c:2166: warning: Function parameter or member 'lport' not described in 'fcoe_ctlr_disc_stop_locked'
 drivers/scsi/fcoe/fcoe_ctlr.c:2166: warning: Excess function parameter 'fip' description in 'fcoe_ctlr_disc_stop_locked'
 drivers/scsi/fcoe/fcoe_ctlr.c:2188: warning: Function parameter or member 'lport' not described in 'fcoe_ctlr_disc_stop'
 drivers/scsi/fcoe/fcoe_ctlr.c:2188: warning: Excess function parameter 'fip' description in 'fcoe_ctlr_disc_stop'
 drivers/scsi/fcoe/fcoe_ctlr.c:2204: warning: Function parameter or member 'lport' not described in 'fcoe_ctlr_disc_stop_final'
 drivers/scsi/fcoe/fcoe_ctlr.c:2204: warning: Excess function parameter 'fip' description in 'fcoe_ctlr_disc_stop_final'
 drivers/scsi/fcoe/fcoe_ctlr.c:2273: warning: Function parameter or member 'frport' not described in 'fcoe_ctlr_vn_parse'
 drivers/scsi/fcoe/fcoe_ctlr.c:2273: warning: Excess function parameter 'rdata' description in 'fcoe_ctlr_vn_parse'
 drivers/scsi/fcoe/fcoe_ctlr.c:2804: warning: Function parameter or member 'frport' not described in 'fcoe_ctlr_vlan_parse'
 drivers/scsi/fcoe/fcoe_ctlr.c:2804: warning: Excess function parameter 'rdata' description in 'fcoe_ctlr_vlan_parse'
 drivers/scsi/fcoe/fcoe_ctlr.c:2900: warning: Excess function parameter 'min_len' description in 'fcoe_ctlr_vlan_send'
 drivers/scsi/fcoe/fcoe_ctlr.c:2977: warning: Function parameter or member 'fip' not described in 'fcoe_ctlr_vlan_recv'
 drivers/scsi/fcoe/fcoe_ctlr.c:2977: warning: Function parameter or member 'skb' not described in 'fcoe_ctlr_vlan_recv'
 drivers/scsi/fcoe/fcoe_ctlr.c:2977: warning: Excess function parameter 'lport' description in 'fcoe_ctlr_vlan_recv'
 drivers/scsi/fcoe/fcoe_ctlr.c:2977: warning: Excess function parameter 'fp' description in 'fcoe_ctlr_vlan_recv'
 drivers/scsi/fcoe/fcoe_ctlr.c:3033: warning: Function parameter or member 'callback' not described in 'fcoe_ctlr_disc_start'
 drivers/scsi/fcoe/fcoe_ctlr.c:3033: warning: Function parameter or member 'lport' not described in 'fcoe_ctlr_disc_start'
 drivers/scsi/fcoe/fcoe_ctlr.c:3033: warning: Excess function parameter 'fip' description in 'fcoe_ctlr_disc_start'

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

diff --git a/drivers/scsi/fcoe/fcoe_ctlr.c b/drivers/scsi/fcoe/fcoe_ctlr.c
index 1791a393795da..99242f9856708 100644
--- a/drivers/scsi/fcoe/fcoe_ctlr.c
+++ b/drivers/scsi/fcoe/fcoe_ctlr.c
@@ -134,6 +134,7 @@ static void fcoe_ctlr_map_dest(struct fcoe_ctlr *fip)
 /**
  * fcoe_ctlr_init() - Initialize the FCoE Controller instance
  * @fip: The FCoE controller to initialize
+ * @mode: FIP mode to set
  */
 void fcoe_ctlr_init(struct fcoe_ctlr *fip, enum fip_mode mode)
 {
@@ -587,6 +588,7 @@ static void fcoe_ctlr_send_keep_alive(struct fcoe_ctlr *fip,
 /**
  * fcoe_ctlr_encaps() - Encapsulate an ELS frame for FIP, without sending it
  * @fip:   The FCoE controller for the ELS frame
+ * @lport: The local port
  * @dtype: The FIP descriptor type for the frame
  * @skb:   The FCoE ELS frame including FC header but no FCoE headers
  * @d_id:  The destination port ID.
@@ -1302,7 +1304,7 @@ static void fcoe_ctlr_recv_els(struct fcoe_ctlr *fip, struct sk_buff *skb)
 /**
  * fcoe_ctlr_recv_els() - Handle an incoming link reset frame
  * @fip: The FCoE controller that received the frame
- * @fh:	 The received FIP header
+ * @skb: The received FIP packet
  *
  * There may be multiple VN_Port descriptors.
  * The overall length has already been checked.
@@ -1775,7 +1777,7 @@ static void fcoe_ctlr_flogi_send(struct fcoe_ctlr *fip)
 
 /**
  * fcoe_ctlr_timeout() - FIP timeout handler
- * @arg: The FCoE controller that timed out
+ * @t: Timer context use to obtain the controller reference
  */
 static void fcoe_ctlr_timeout(struct timer_list *t)
 {
@@ -1887,6 +1889,7 @@ static void fcoe_ctlr_recv_work(struct work_struct *recv_work)
 /**
  * fcoe_ctlr_recv_flogi() - Snoop pre-FIP receipt of FLOGI response
  * @fip: The FCoE controller
+ * @lport: The local port
  * @fp:	 The FC frame to snoop
  *
  * Snoop potential response to FLOGI or even incoming FLOGI.
@@ -2158,7 +2161,7 @@ static struct fc_rport_operations fcoe_ctlr_vn_rport_ops = {
 
 /**
  * fcoe_ctlr_disc_stop_locked() - stop discovery in VN2VN mode
- * @fip: The FCoE controller
+ * @lport: The local port
  *
  * Called with ctlr_mutex held.
  */
@@ -2179,7 +2182,7 @@ static void fcoe_ctlr_disc_stop_locked(struct fc_lport *lport)
 
 /**
  * fcoe_ctlr_disc_stop() - stop discovery in VN2VN mode
- * @fip: The FCoE controller
+ * @lport: The local port
  *
  * Called through the local port template for discovery.
  * Called without the ctlr_mutex held.
@@ -2195,7 +2198,7 @@ static void fcoe_ctlr_disc_stop(struct fc_lport *lport)
 
 /**
  * fcoe_ctlr_disc_stop_final() - stop discovery for shutdown in VN2VN mode
- * @fip: The FCoE controller
+ * @lport: The local port
  *
  * Called through the local port template for discovery.
  * Called without the ctlr_mutex held.
@@ -2262,7 +2265,7 @@ static void fcoe_ctlr_vn_start(struct fcoe_ctlr *fip)
  * fcoe_ctlr_vn_parse - parse probe request or response
  * @fip: The FCoE controller
  * @skb: incoming packet
- * @rdata: buffer for resulting parsed VN entry plus fcoe_rport
+ * @frport: parsed FCoE rport from the probe request
  *
  * Returns non-zero error number on error.
  * Does not consume the packet.
@@ -2793,7 +2796,7 @@ static int fcoe_ctlr_vn_recv(struct fcoe_ctlr *fip, struct sk_buff *skb)
  * fcoe_ctlr_vlan_parse - parse vlan discovery request or response
  * @fip: The FCoE controller
  * @skb: incoming packet
- * @rdata: buffer for resulting parsed VLAN entry plus fcoe_rport
+ * @frport: parsed FCoE rport from the probe request
  *
  * Returns non-zero error number on error.
  * Does not consume the packet.
@@ -2892,7 +2895,6 @@ static int fcoe_ctlr_vlan_parse(struct fcoe_ctlr *fip,
  * @fip: The FCoE controller
  * @sub: sub-opcode for vlan notification or vn2vn vlan notification
  * @dest: The destination Ethernet MAC address
- * @min_len: minimum size of the Ethernet payload to be sent
  */
 static void fcoe_ctlr_vlan_send(struct fcoe_ctlr *fip,
 			      enum fip_vlan_subcode sub,
@@ -2969,9 +2971,8 @@ static void fcoe_ctlr_vlan_disc_reply(struct fcoe_ctlr *fip,
 
 /**
  * fcoe_ctlr_vlan_recv - vlan request receive handler for VN2VN mode.
- * @lport: The local port
- * @fp: The received frame
- *
+ * @fip: The FCoE controller
+ * @skb: The received FIP packet
  */
 static int fcoe_ctlr_vlan_recv(struct fcoe_ctlr *fip, struct sk_buff *skb)
 {
@@ -3015,9 +3016,8 @@ static void fcoe_ctlr_disc_recv(struct fc_lport *lport, struct fc_frame *fp)
 	fc_frame_free(fp);
 }
 
-/**
+/*
  * fcoe_ctlr_disc_recv - start discovery for VN2VN mode.
- * @fip: The FCoE controller
  *
  * This sets a flag indicating that remote ports should be created
  * and started for the peers we discover.  We use the disc_callback
-- 
2.25.1


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

* [PATCH v2 06/29] scsi: fcoe: fcoe_transport: Correct some kernel-doc issues
  2020-07-13  7:46 [PATCH v2 00/29] Fix a bunch more SCSI related W=1 warnings Lee Jones
                   ` (4 preceding siblings ...)
  2020-07-13  7:46 ` [PATCH v2 05/29] scsi: fcoe: fcoe_ctlr: Fix a myriad of documentation issues Lee Jones
@ 2020-07-13  7:46 ` Lee Jones
  2020-07-14  7:01   ` Hannes Reinecke
  2020-07-13  7:46 ` [PATCH v2 07/29] scsi: bnx2fc: bnx2fc_fcoe: Repair a range of kerneldoc issues Lee Jones
                   ` (23 subsequent siblings)
  29 siblings, 1 reply; 53+ messages in thread
From: Lee Jones @ 2020-07-13  7:46 UTC (permalink / raw)
  To: jejb, martin.petersen
  Cc: linux-kernel, linux-scsi, Lee Jones, Hannes Reinecke

Mainly due to misdocumentation or bitrotted descriptions.

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

 drivers/scsi/fcoe/fcoe_transport.c:396: warning: Function parameter or member 'skb' not described in 'fcoe_check_wait_queue'
 drivers/scsi/fcoe/fcoe_transport.c:447: warning: Function parameter or member 't' not described in 'fcoe_queue_timer'
 drivers/scsi/fcoe/fcoe_transport.c:447: warning: Excess function parameter 'lport' description in 'fcoe_queue_timer'
 drivers/scsi/fcoe/fcoe_transport.c:682: warning: Function parameter or member 'netdev' not described in 'fcoe_netdev_map_lookup'

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

diff --git a/drivers/scsi/fcoe/fcoe_transport.c b/drivers/scsi/fcoe/fcoe_transport.c
index a20ddc301c89e..6e187d0e71fd2 100644
--- a/drivers/scsi/fcoe/fcoe_transport.c
+++ b/drivers/scsi/fcoe/fcoe_transport.c
@@ -382,6 +382,7 @@ EXPORT_SYMBOL_GPL(fcoe_clean_pending_queue);
 /**
  * fcoe_check_wait_queue() - Attempt to clear the transmit backlog
  * @lport: The local port whose backlog is to be cleared
+ * @skb: The received FIP packet
  *
  * This empties the wait_queue, dequeues the head of the wait_queue queue
  * and calls fcoe_start_io() for each packet. If all skb have been
@@ -439,7 +440,7 @@ EXPORT_SYMBOL_GPL(fcoe_check_wait_queue);
 
 /**
  * fcoe_queue_timer() - The fcoe queue timer
- * @lport: The local port
+ * @t: Timer context use to obtain the FCoE port
  *
  * Calls fcoe_check_wait_queue on timeout
  */
@@ -672,6 +673,7 @@ static void fcoe_del_netdev_mapping(struct net_device *netdev)
 /**
  * fcoe_netdev_map_lookup - find the fcoe transport that matches the netdev on which
  * it was created
+ * @netdev: The net device that the FCoE interface is on
  *
  * Returns : ptr to the fcoe transport that supports this netdev or NULL
  * if not found.
-- 
2.25.1


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

* [PATCH v2 07/29] scsi: bnx2fc: bnx2fc_fcoe: Repair a range of kerneldoc issues
  2020-07-13  7:46 [PATCH v2 00/29] Fix a bunch more SCSI related W=1 warnings Lee Jones
                   ` (5 preceding siblings ...)
  2020-07-13  7:46 ` [PATCH v2 06/29] scsi: fcoe: fcoe_transport: Correct some kernel-doc issues Lee Jones
@ 2020-07-13  7:46 ` Lee Jones
  2020-07-13  7:46 ` [PATCH v2 08/29] scsi: qedf: qedf_main: Demote obvious misuse of kerneldoc to standard comment blocks Lee Jones
                   ` (22 subsequent siblings)
  29 siblings, 0 replies; 53+ messages in thread
From: Lee Jones @ 2020-07-13  7:46 UTC (permalink / raw)
  To: jejb, martin.petersen
  Cc: linux-kernel, linux-scsi, Lee Jones, QLogic-Storage-Upstream,
	Prakash Gollapudi

From bitrotted and missing function parameters to misuse of kerneldoc format.

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

 drivers/scsi/bnx2fc/bnx2fc_fcoe.c:1082: warning: Function parameter or member 'lport' not described in 'bnx2fc_update_src_mac'
 drivers/scsi/bnx2fc/bnx2fc_fcoe.c:1082: warning: Function parameter or member 'addr' not described in 'bnx2fc_update_src_mac'
 drivers/scsi/bnx2fc/bnx2fc_fcoe.c:1082: warning: Excess function parameter 'fip' description in 'bnx2fc_update_src_mac'
 drivers/scsi/bnx2fc/bnx2fc_fcoe.c:1082: warning: Excess function parameter 'old' description in 'bnx2fc_update_src_mac'
 drivers/scsi/bnx2fc/bnx2fc_fcoe.c:1082: warning: Excess function parameter 'new' description in 'bnx2fc_update_src_mac'
 drivers/scsi/bnx2fc/bnx2fc_fcoe.c:1670: warning: Function parameter or member 'netdev' not described in 'bnx2fc_destroy'
 drivers/scsi/bnx2fc/bnx2fc_fcoe.c:1670: warning: Excess function parameter 'buffer' description in 'bnx2fc_destroy'
 drivers/scsi/bnx2fc/bnx2fc_fcoe.c:1670: warning: Excess function parameter 'kp' description in 'bnx2fc_destroy'
 drivers/scsi/bnx2fc/bnx2fc_fcoe.c:2108: warning: Function parameter or member 'netdev' not described in 'bnx2fc_disable'
 drivers/scsi/bnx2fc/bnx2fc_fcoe.c:2236: warning: Function parameter or member 'netdev' not described in 'bnx2fc_enable'
 drivers/scsi/bnx2fc/bnx2fc_fcoe.c:2529: warning: Function parameter or member 'dev' not described in 'bnx2fc_ulp_exit'
 drivers/scsi/bnx2fc/bnx2fc_fcoe.c:2962: warning: cannot understand function prototype: 'struct scsi_host_template bnx2fc_shost_template = '
 drivers/scsi/bnx2fc/bnx2fc_fcoe.c:2996: warning: cannot understand function prototype: 'struct cnic_ulp_ops bnx2fc_cnic_cb = '

Cc: QLogic-Storage-Upstream@qlogic.com
Cc: Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)

diff --git a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
index 0e33324e16f51..5cdeeb3539fdc 100644
--- a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
+++ b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
@@ -1071,9 +1071,8 @@ static int bnx2fc_fip_recv(struct sk_buff *skb, struct net_device *dev,
 /**
  * bnx2fc_update_src_mac - Update Ethernet MAC filters.
  *
- * @fip: FCoE controller.
- * @old: Unicast MAC address to delete if the MAC is non-zero.
- * @new: Unicast MAC address to add.
+ * @lport: The local port
+ * @addr: Location of data to copy
  *
  * Remove any previously-set unicast MAC filter.
  * Add secondary FCoE MAC address filter for our OUI.
@@ -1659,8 +1658,7 @@ static void __bnx2fc_destroy(struct bnx2fc_interface *interface)
 /**
  * bnx2fc_destroy - Destroy a bnx2fc FCoE interface
  *
- * @buffer: The name of the Ethernet interface to be destroyed
- * @kp:     The associated kernel parameter
+ * @netdev: The net device that the FCoE interface is on
  *
  * Called from sysfs.
  *
@@ -2101,7 +2099,7 @@ static int __bnx2fc_disable(struct fcoe_ctlr *ctlr)
 	return 0;
 }
 
-/**
+/*
  * Deperecated: Use bnx2fc_enabled()
  */
 static int bnx2fc_disable(struct net_device *netdev)
@@ -2229,7 +2227,7 @@ static int __bnx2fc_enable(struct fcoe_ctlr *ctlr)
 	return 0;
 }
 
-/**
+/*
  * Deprecated: Use bnx2fc_enabled()
  */
 static int bnx2fc_enable(struct net_device *netdev)
@@ -2523,7 +2521,7 @@ static struct bnx2fc_hba *bnx2fc_hba_lookup(struct net_device
 /**
  * bnx2fc_ulp_exit - shuts down adapter instance and frees all resources
  *
- * @dev		cnic device handle
+ * @dev:	cnic device handle
  */
 static void bnx2fc_ulp_exit(struct cnic_dev *dev)
 {
@@ -2956,7 +2954,7 @@ static struct device_attribute *bnx2fc_host_attrs[] = {
 	NULL,
 };
 
-/**
+/*
  * scsi_host_template structure used while registering with SCSI-ml
  */
 static struct scsi_host_template bnx2fc_shost_template = {
@@ -2989,7 +2987,7 @@ static struct libfc_function_template bnx2fc_libfc_fcn_templ = {
 	.rport_event_callback	= bnx2fc_rport_event_handler,
 };
 
-/**
+/*
  * bnx2fc_cnic_cb - global template of bnx2fc - cnic driver interface
  *			structure carrying callback function pointers
  */
-- 
2.25.1


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

* [PATCH v2 08/29] scsi: qedf: qedf_main: Demote obvious misuse of kerneldoc to standard comment blocks
  2020-07-13  7:46 [PATCH v2 00/29] Fix a bunch more SCSI related W=1 warnings Lee Jones
                   ` (6 preceding siblings ...)
  2020-07-13  7:46 ` [PATCH v2 07/29] scsi: bnx2fc: bnx2fc_fcoe: Repair a range of kerneldoc issues Lee Jones
@ 2020-07-13  7:46 ` Lee Jones
  2020-07-13  7:46 ` [PATCH v2 09/29] scsi: qedf: qedf_main: Remove set but not checked variable 'tmp' Lee Jones
                   ` (21 subsequent siblings)
  29 siblings, 0 replies; 53+ messages in thread
From: Lee Jones @ 2020-07-13  7:46 UTC (permalink / raw)
  To: jejb, martin.petersen
  Cc: linux-kernel, linux-scsi, Lee Jones, QLogic-Storage-Upstream

No attempt has been made to document either of the demoted functions here.

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

 drivers/scsi/qedf/qedf_main.c:1027: warning: Function parameter or member 'lport' not described in 'qedf_xmit'
 drivers/scsi/qedf/qedf_main.c:1027: warning: Function parameter or member 'fp' not described in 'qedf_xmit'
 drivers/scsi/qedf/qedf_main.c:1426: warning: Function parameter or member 'lport' not described in 'qedf_rport_event_handler'
 drivers/scsi/qedf/qedf_main.c:1426: warning: Function parameter or member 'rdata' not described in 'qedf_rport_event_handler'
 drivers/scsi/qedf/qedf_main.c:1426: warning: Function parameter or member 'event' not described in 'qedf_rport_event_handler'

Cc: QLogic-Storage-Upstream@cavium.com
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/scsi/qedf/qedf_main.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/scsi/qedf/qedf_main.c b/drivers/scsi/qedf/qedf_main.c
index 36b1ca2dadbb5..a77a74fad6a7e 100644
--- a/drivers/scsi/qedf/qedf_main.c
+++ b/drivers/scsi/qedf/qedf_main.c
@@ -1019,9 +1019,8 @@ static int qedf_xmit_l2_frame(struct qedf_rport *fcport, struct fc_frame *fp)
 	return rc;
 }
 
-/**
+/*
  * qedf_xmit - qedf FCoE frame transmit function
- *
  */
 static int qedf_xmit(struct fc_lport *lport, struct fc_frame *fp)
 {
@@ -1415,7 +1414,7 @@ static void qedf_cleanup_fcport(struct qedf_ctx *qedf,
 	kref_put(&rdata->kref, fc_rport_destroy);
 }
 
-/**
+/*
  * This event_callback is called after successful completion of libfc
  * initiated target login. qedf can proceed with initiating the session
  * establishment.
-- 
2.25.1


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

* [PATCH v2 09/29] scsi: qedf: qedf_main: Remove set but not checked variable 'tmp'
  2020-07-13  7:46 [PATCH v2 00/29] Fix a bunch more SCSI related W=1 warnings Lee Jones
                   ` (7 preceding siblings ...)
  2020-07-13  7:46 ` [PATCH v2 08/29] scsi: qedf: qedf_main: Demote obvious misuse of kerneldoc to standard comment blocks Lee Jones
@ 2020-07-13  7:46 ` Lee Jones
  2020-07-13  7:46 ` [PATCH v2 10/29] scsi: libfc: fc_lport: Repair function parameter documentation Lee Jones
                   ` (20 subsequent siblings)
  29 siblings, 0 replies; 53+ messages in thread
From: Lee Jones @ 2020-07-13  7:46 UTC (permalink / raw)
  To: jejb, martin.petersen
  Cc: linux-kernel, linux-scsi, Lee Jones, QLogic-Storage-Upstream

Looks like the return value of readw() has never been checked.

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

 drivers/scsi/qedf/qedf_main.c: In function ‘__qedf_probe’:
 drivers/scsi/qedf/qedf_main.c:3203:6: warning: variable ‘tmp’ set but not used [-Wunused-but-set-variable]

Cc: QLogic-Storage-Upstream@cavium.com
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/scsi/qedf/qedf_main.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/scsi/qedf/qedf_main.c b/drivers/scsi/qedf/qedf_main.c
index a77a74fad6a7e..47fc14f5ed9d7 100644
--- a/drivers/scsi/qedf/qedf_main.c
+++ b/drivers/scsi/qedf/qedf_main.c
@@ -3199,7 +3199,6 @@ static int __qedf_probe(struct pci_dev *pdev, int mode)
 	void *task_start, *task_end;
 	struct qed_slowpath_params slowpath_params;
 	struct qed_probe_params qed_params;
-	u16 tmp;
 
 	/*
 	 * When doing error recovery we didn't reap the lport so don't try
@@ -3393,9 +3392,9 @@ static int __qedf_probe(struct pci_dev *pdev, int mode)
 	    "Writing %d to primary and secondary BDQ doorbell registers.\n",
 	    qedf->bdq_prod_idx);
 	writew(qedf->bdq_prod_idx, qedf->bdq_primary_prod);
-	tmp = readw(qedf->bdq_primary_prod);
+	readw(qedf->bdq_primary_prod);
 	writew(qedf->bdq_prod_idx, qedf->bdq_secondary_prod);
-	tmp = readw(qedf->bdq_secondary_prod);
+	readw(qedf->bdq_secondary_prod);
 
 	qed_ops->common->set_power_state(qedf->cdev, PCI_D0);
 
-- 
2.25.1


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

* [PATCH v2 10/29] scsi: libfc: fc_lport: Repair function parameter documentation
  2020-07-13  7:46 [PATCH v2 00/29] Fix a bunch more SCSI related W=1 warnings Lee Jones
                   ` (8 preceding siblings ...)
  2020-07-13  7:46 ` [PATCH v2 09/29] scsi: qedf: qedf_main: Remove set but not checked variable 'tmp' Lee Jones
@ 2020-07-13  7:46 ` Lee Jones
  2020-07-14  7:04   ` Hannes Reinecke
  2020-07-13  7:46 ` [PATCH v2 11/29] scsi: libfc: fc_rport: Fix a couple of misdocumented function parameters Lee Jones
                   ` (19 subsequent siblings)
  29 siblings, 1 reply; 53+ messages in thread
From: Lee Jones @ 2020-07-13  7:46 UTC (permalink / raw)
  To: jejb, martin.petersen
  Cc: linux-kernel, linux-scsi, Lee Jones, Hannes Reinecke

Either misdocumentation and/or bitrot.

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

 drivers/scsi/libfc/fc_lport.c:412: warning: Function parameter or member 'in_fp' not described in 'fc_lport_recv_echo_req'
 drivers/scsi/libfc/fc_lport.c:412: warning: Excess function parameter 'fp' description in 'fc_lport_recv_echo_req'
 drivers/scsi/libfc/fc_lport.c:447: warning: Function parameter or member 'in_fp' not described in 'fc_lport_recv_rnid_req'
 drivers/scsi/libfc/fc_lport.c:447: warning: Excess function parameter 'fp' description in 'fc_lport_recv_rnid_req'
 drivers/scsi/libfc/fc_lport.c:1330: warning: Function parameter or member 'state' not described in 'fc_lport_enter_ns'
 drivers/scsi/libfc/fc_lport.c:1428: warning: Function parameter or member 'state' not described in 'fc_lport_enter_ms'
 drivers/scsi/libfc/fc_lport.c:1939: warning: Function parameter or member 'tov' not described in 'fc_lport_els_request'

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

diff --git a/drivers/scsi/libfc/fc_lport.c b/drivers/scsi/libfc/fc_lport.c
index 684c5e361a286..b84dbc316df15 100644
--- a/drivers/scsi/libfc/fc_lport.c
+++ b/drivers/scsi/libfc/fc_lport.c
@@ -405,7 +405,7 @@ static void fc_lport_recv_rlir_req(struct fc_lport *lport, struct fc_frame *fp)
 /**
  * fc_lport_recv_echo_req() - Handle received ECHO request
  * @lport: The local port receiving the ECHO
- * @fp:	   ECHO request frame
+ * @in_fp: ECHO request frame
  */
 static void fc_lport_recv_echo_req(struct fc_lport *lport,
 				   struct fc_frame *in_fp)
@@ -440,7 +440,7 @@ static void fc_lport_recv_echo_req(struct fc_lport *lport,
 /**
  * fc_lport_recv_rnid_req() - Handle received Request Node ID data request
  * @lport: The local port receiving the RNID
- * @fp:	   The RNID request frame
+ * @in_fp: The RNID request frame
  */
 static void fc_lport_recv_rnid_req(struct fc_lport *lport,
 				   struct fc_frame *in_fp)
@@ -1325,6 +1325,7 @@ static void fc_lport_enter_scr(struct fc_lport *lport)
 /**
  * fc_lport_enter_ns() - register some object with the name server
  * @lport: Fibre Channel local port to register
+ * @state: Local port state
  */
 static void fc_lport_enter_ns(struct fc_lport *lport, enum fc_lport_state state)
 {
@@ -1423,6 +1424,7 @@ static void fc_lport_enter_dns(struct fc_lport *lport)
 /**
  * fc_lport_enter_ms() - management server commands
  * @lport: Fibre Channel local port to register
+ * @state: Local port state
  */
 static void fc_lport_enter_ms(struct fc_lport *lport, enum fc_lport_state state)
 {
@@ -1932,6 +1934,7 @@ static void fc_lport_bsg_resp(struct fc_seq *sp, struct fc_frame *fp,
  * @job:   The BSG Passthrough job
  * @lport: The local port sending the request
  * @did:   The destination port id
+ * @tov:   The timeout period (in ms)
  */
 static int fc_lport_els_request(struct bsg_job *job,
 				struct fc_lport *lport,
-- 
2.25.1


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

* [PATCH v2 11/29] scsi: libfc: fc_rport: Fix a couple of misdocumented function parameters
  2020-07-13  7:46 [PATCH v2 00/29] Fix a bunch more SCSI related W=1 warnings Lee Jones
                   ` (9 preceding siblings ...)
  2020-07-13  7:46 ` [PATCH v2 10/29] scsi: libfc: fc_lport: Repair function parameter documentation Lee Jones
@ 2020-07-13  7:46 ` Lee Jones
  2020-07-14  7:04   ` Hannes Reinecke
  2020-07-13  7:46 ` [PATCH v2 12/29] scsi: libfc: fc_fcp: Provide missing and repair existing function documentation Lee Jones
                   ` (18 subsequent siblings)
  29 siblings, 1 reply; 53+ messages in thread
From: Lee Jones @ 2020-07-13  7:46 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_rport.c:129: warning: Function parameter or member 'port_id' not described in 'fc_rport_create'
 drivers/scsi/libfc/fc_rport.c:129: warning: Excess function parameter 'ids' description in 'fc_rport_create'
 drivers/scsi/libfc/fc_rport.c:1452: warning: Function parameter or member 'rdata_arg' not described in 'fc_rport_logo_resp'
 drivers/scsi/libfc/fc_rport.c:1452: warning: Excess function parameter 'lport_arg' description in 'fc_rport_logo_resp'

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

diff --git a/drivers/scsi/libfc/fc_rport.c b/drivers/scsi/libfc/fc_rport.c
index 278d15ff1c5ae..18663a82865f9 100644
--- a/drivers/scsi/libfc/fc_rport.c
+++ b/drivers/scsi/libfc/fc_rport.c
@@ -121,7 +121,7 @@ EXPORT_SYMBOL(fc_rport_lookup);
 /**
  * fc_rport_create() - Create a new remote port
  * @lport: The local port this remote port will be associated with
- * @ids:   The identifiers for the new remote port
+ * @port_id:   The identifiers for the new remote port
  *
  * The remote port will start in the INIT state.
  */
@@ -1445,7 +1445,7 @@ static void fc_rport_recv_rtv_req(struct fc_rport_priv *rdata,
  * fc_rport_logo_resp() - Handler for logout (LOGO) responses
  * @sp:	       The sequence the LOGO was on
  * @fp:	       The LOGO response frame
- * @lport_arg: The local port
+ * @rdata_arg: The remote port
  */
 static void fc_rport_logo_resp(struct fc_seq *sp, struct fc_frame *fp,
 			       void *rdata_arg)
-- 
2.25.1


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

* [PATCH v2 12/29] scsi: libfc: fc_fcp: Provide missing and repair existing function documentation
  2020-07-13  7:46 [PATCH v2 00/29] Fix a bunch more SCSI related W=1 warnings Lee Jones
                   ` (10 preceding siblings ...)
  2020-07-13  7:46 ` [PATCH v2 11/29] scsi: libfc: fc_rport: Fix a couple of misdocumented function parameters Lee Jones
@ 2020-07-13  7:46 ` Lee Jones
  2020-07-14  7:05   ` Hannes Reinecke
  2020-07-13  7:46 ` [PATCH v2 13/29] scsi: bnx2fc: bnx2fc_hwi: Fix a couple of bitrotted function documentation headers Lee Jones
                   ` (17 subsequent siblings)
  29 siblings, 1 reply; 53+ messages in thread
From: Lee Jones @ 2020-07-13  7:46 UTC (permalink / raw)
  To: jejb, martin.petersen
  Cc: linux-kernel, linux-scsi, Lee Jones, Hannes Reinecke

Mostly due to descriptions not keeping up with API changes.

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

 drivers/scsi/libfc/fc_fcp.c:299: warning: Function parameter or member 'status_code' not described in 'fc_fcp_retry_cmd'
 drivers/scsi/libfc/fc_fcp.c:595: warning: Function parameter or member 'seq' not described in 'fc_fcp_send_data'
 drivers/scsi/libfc/fc_fcp.c:595: warning: Excess function parameter 'sp' description in 'fc_fcp_send_data'
 drivers/scsi/libfc/fc_fcp.c:1289: warning: Function parameter or member 't' not described in 'fc_lun_reset_send'
 drivers/scsi/libfc/fc_fcp.c:1289: warning: Excess function parameter 'data' description in 'fc_lun_reset_send'
 drivers/scsi/libfc/fc_fcp.c:1422: warning: Function parameter or member 't' not described in 'fc_fcp_timeout'
 drivers/scsi/libfc/fc_fcp.c:1422: warning: Excess function parameter 'data' description in 'fc_fcp_timeout'
 drivers/scsi/libfc/fc_fcp.c:1696: warning: Function parameter or member 'code' not described in 'fc_fcp_recovery'
 drivers/scsi/libfc/fc_fcp.c:1716: warning: Function parameter or member 'offset' not described in 'fc_fcp_srr'
 drivers/scsi/libfc/fc_fcp.c:1859: warning: Function parameter or member 'sc_cmd' not described in 'fc_queuecommand'
 drivers/scsi/libfc/fc_fcp.c:1859: warning: Excess function parameter 'cmd' description in 'fc_queuecommand'

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

diff --git a/drivers/scsi/libfc/fc_fcp.c b/drivers/scsi/libfc/fc_fcp.c
index bf2cc9656e191..e11d4f002bd49 100644
--- a/drivers/scsi/libfc/fc_fcp.c
+++ b/drivers/scsi/libfc/fc_fcp.c
@@ -289,6 +289,7 @@ static int fc_fcp_send_abort(struct fc_fcp_pkt *fsp)
 /**
  * fc_fcp_retry_cmd() - Retry a fcp_pkt
  * @fsp: The FCP packet to be retried
+ * @status_code: The FCP status code to set
  *
  * Sets the status code to be FC_ERROR and then calls
  * fc_fcp_complete_locked() which in turn calls fc_io_compl().
@@ -580,7 +581,7 @@ static void fc_fcp_recv_data(struct fc_fcp_pkt *fsp, struct fc_frame *fp)
 /**
  * fc_fcp_send_data() - Send SCSI data to a target
  * @fsp:      The FCP packet the data is on
- * @sp:	      The sequence the data is to be sent on
+ * @seq:      The sequence the data is to be sent on
  * @offset:   The starting offset for this data request
  * @seq_blen: The burst length for this data request
  *
@@ -1283,7 +1284,7 @@ static int fc_fcp_pkt_abort(struct fc_fcp_pkt *fsp)
 
 /**
  * fc_lun_reset_send() - Send LUN reset command
- * @data: The FCP packet that identifies the LUN to be reset
+ * @t: Timer context used to fetch the FSP packet
  */
 static void fc_lun_reset_send(struct timer_list *t)
 {
@@ -1409,7 +1410,7 @@ static void fc_fcp_cleanup(struct fc_lport *lport)
 
 /**
  * fc_fcp_timeout() - Handler for fcp_pkt timeouts
- * @data: The FCP packet that has timed out
+ * @t: Timer context used to fetch the FSP packet
  *
  * If REC is supported then just issue it and return. The REC exchange will
  * complete or time out and recovery can continue at that point. Otherwise,
@@ -1691,6 +1692,7 @@ static void fc_fcp_rec_error(struct fc_fcp_pkt *fsp, struct fc_frame *fp)
 /**
  * fc_fcp_recovery() - Handler for fcp_pkt recovery
  * @fsp: The FCP pkt that needs to be aborted
+ * @code: The FCP status code to set
  */
 static void fc_fcp_recovery(struct fc_fcp_pkt *fsp, u8 code)
 {
@@ -1709,6 +1711,7 @@ static void fc_fcp_recovery(struct fc_fcp_pkt *fsp, u8 code)
  * fc_fcp_srr() - Send a SRR request (Sequence Retransmission Request)
  * @fsp:   The FCP packet the SRR is to be sent on
  * @r_ctl: The R_CTL field for the SRR request
+ * @offset: The SRR relative offset
  * This is called after receiving status but insufficient data, or
  * when expecting status but the request has timed out.
  */
@@ -1851,7 +1854,7 @@ static inline int fc_fcp_lport_queue_ready(struct fc_lport *lport)
 /**
  * fc_queuecommand() - The queuecommand function of the SCSI template
  * @shost: The Scsi_Host that the command was issued to
- * @cmd:   The scsi_cmnd to be executed
+ * @sc_cmd:   The scsi_cmnd to be executed
  *
  * This is the i/o strategy routine, called by the SCSI layer.
  */
-- 
2.25.1


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

* [PATCH v2 13/29] scsi: bnx2fc: bnx2fc_hwi: Fix a couple  of bitrotted function documentation headers
  2020-07-13  7:46 [PATCH v2 00/29] Fix a bunch more SCSI related W=1 warnings Lee Jones
                   ` (11 preceding siblings ...)
  2020-07-13  7:46 ` [PATCH v2 12/29] scsi: libfc: fc_fcp: Provide missing and repair existing function documentation Lee Jones
@ 2020-07-13  7:46 ` Lee Jones
  2020-07-13  7:46 ` [PATCH v2 14/29] scsi: arcmsr: arcmsr_hba: Remove some set but unused variables Lee Jones
                   ` (16 subsequent siblings)
  29 siblings, 0 replies; 53+ messages in thread
From: Lee Jones @ 2020-07-13  7:46 UTC (permalink / raw)
  To: jejb, martin.petersen
  Cc: linux-kernel, linux-scsi, Lee Jones, QLogic-Storage-Upstream,
	Prakash Gollapudi

Likely a result of documentation not keeping up with API updates (a.k.a. bitrot).

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

 drivers/scsi/bnx2fc/bnx2fc_hwi.c:493: warning: Function parameter or member 'hba' not described in 'bnx2fc_send_session_destroy_req'
 drivers/scsi/bnx2fc/bnx2fc_hwi.c:493: warning: Excess function parameter 'port' description in 'bnx2fc_send_session_destroy_req'
 drivers/scsi/bnx2fc/bnx2fc_hwi.c:1345: warning: Function parameter or member 'context' not described in 'bnx2fc_indicate_kcqe'
 drivers/scsi/bnx2fc/bnx2fc_hwi.c:1345: warning: Function parameter or member 'kcq' not described in 'bnx2fc_indicate_kcqe'
 drivers/scsi/bnx2fc/bnx2fc_hwi.c:1345: warning: Excess function parameter 'hba' description in 'bnx2fc_indicate_kcqe'
 drivers/scsi/bnx2fc/bnx2fc_hwi.c:1345: warning: Excess function parameter 'kcqe' description in 'bnx2fc_indicate_kcqe'

Cc: QLogic-Storage-Upstream@qlogic.com
Cc: Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/scsi/bnx2fc/bnx2fc_hwi.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/scsi/bnx2fc/bnx2fc_hwi.c b/drivers/scsi/bnx2fc/bnx2fc_hwi.c
index 8c0d6866cf3b8..e72d7bb7f4f42 100644
--- a/drivers/scsi/bnx2fc/bnx2fc_hwi.c
+++ b/drivers/scsi/bnx2fc/bnx2fc_hwi.c
@@ -485,7 +485,7 @@ int bnx2fc_send_session_disable_req(struct fcoe_port *port,
 /**
  * bnx2fc_send_session_destroy_req - initiates FCoE Session destroy
  *
- * @port:		port structure pointer
+ * @hba:		adapter structure pointer
  * @tgt:		bnx2fc_rport structure pointer
  */
 int bnx2fc_send_session_destroy_req(struct bnx2fc_hba *hba,
@@ -1334,8 +1334,8 @@ static void bnx2fc_init_failure(struct bnx2fc_hba *hba, u32 err_code)
 /**
  * bnx2fc_indicae_kcqe - process KCQE
  *
- * @hba:	adapter structure pointer
- * @kcqe:	kcqe pointer
+ * @context:	adapter structure pointer
+ * @kcq:	kcqe pointer
  * @num_cqe:	Number of completion queue elements
  *
  * Generic KCQ event handler
-- 
2.25.1


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

* [PATCH v2 14/29] scsi: arcmsr: arcmsr_hba: Remove some set but unused variables
  2020-07-13  7:46 [PATCH v2 00/29] Fix a bunch more SCSI related W=1 warnings Lee Jones
                   ` (12 preceding siblings ...)
  2020-07-13  7:46 ` [PATCH v2 13/29] scsi: bnx2fc: bnx2fc_hwi: Fix a couple of bitrotted function documentation headers Lee Jones
@ 2020-07-13  7:46 ` Lee Jones
  2020-07-13  7:46 ` [PATCH v2 15/29] scsi: arcmsr: arcmsr_hba: Make room for the trailing NULL, even if it is over-written Lee Jones
                   ` (15 subsequent siblings)
  29 siblings, 0 replies; 53+ messages in thread
From: Lee Jones @ 2020-07-13  7:46 UTC (permalink / raw)
  To: jejb, martin.petersen; +Cc: linux-kernel, linux-scsi, Lee Jones, support

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

 drivers/scsi/arcmsr/arcmsr_hba.c: In function ‘arcmsr_remap_pciregion’:
 drivers/scsi/arcmsr/arcmsr_hba.c:286:30: warning: variable ‘flags’ set but not used [-Wunused-but-set-variable]
 286 | unsigned long addr, range, flags;
 | ^~~~~
 drivers/scsi/arcmsr/arcmsr_hba.c: In function ‘arcmsr_suspend’:
 drivers/scsi/arcmsr/arcmsr_hba.c:1070:11: warning: variable ‘intmask_org’ set but not used [-Wunused-but-set-variable]
 1070 | uint32_t intmask_org;
 | ^~~~~~~~~~~
 drivers/scsi/arcmsr/arcmsr_hba.c: In function ‘arcmsr_done4abort_postqueue’:
 drivers/scsi/arcmsr/arcmsr_hba.c:1410:29: warning: variable ‘cdb_phy_hipart’ set but not used [-Wunused-but-set-variable]
 1410 | unsigned long ccb_cdb_phy, cdb_phy_hipart;
 | ^~~~~~~~~~~~~~
 drivers/scsi/arcmsr/arcmsr_hba.c: In function ‘arcmsr_hbaD_postqueue_isr’:
 drivers/scsi/arcmsr/arcmsr_hba.c:2448:36: warning: variable ‘cdb_phy_hipart’ set but not used [-Wunused-but-set-variable]
 2448 | unsigned long flags, ccb_cdb_phy, cdb_phy_hipart;
 | ^~~~~~~~~~~~~~
 drivers/scsi/arcmsr/arcmsr_hba.c: In function ‘arcmsr_hbaD_polling_ccbdone’:
 drivers/scsi/arcmsr/arcmsr_hba.c:3498:36: warning: variable ‘cdb_phy_hipart’ set but not used [-Wunused-but-set-variable]
 3498 | unsigned long flags, ccb_cdb_phy, cdb_phy_hipart;
 | ^~~~~~~~~~~~~~

Cc: support@areca.com.tw
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/scsi/arcmsr/arcmsr_hba.c | 21 ++++++++-------------
 1 file changed, 8 insertions(+), 13 deletions(-)

diff --git a/drivers/scsi/arcmsr/arcmsr_hba.c b/drivers/scsi/arcmsr/arcmsr_hba.c
index 30914c8f29cc2..1c252934409c7 100644
--- a/drivers/scsi/arcmsr/arcmsr_hba.c
+++ b/drivers/scsi/arcmsr/arcmsr_hba.c
@@ -283,11 +283,10 @@ static bool arcmsr_remap_pciregion(struct AdapterControlBlock *acb)
 	}
 	case ACB_ADAPTER_TYPE_D: {
 		void __iomem *mem_base0;
-		unsigned long addr, range, flags;
+		unsigned long addr, range;
 
 		addr = (unsigned long)pci_resource_start(pdev, 0);
 		range = pci_resource_len(pdev, 0);
-		flags = pci_resource_flags(pdev, 0);
 		mem_base0 = ioremap(addr, range);
 		if (!mem_base0) {
 			pr_notice("arcmsr%d: memory mapping region fail\n",
@@ -1067,12 +1066,11 @@ static void arcmsr_free_irq(struct pci_dev *pdev,
 
 static int arcmsr_suspend(struct pci_dev *pdev, pm_message_t state)
 {
-	uint32_t intmask_org;
 	struct Scsi_Host *host = pci_get_drvdata(pdev);
 	struct AdapterControlBlock *acb =
 		(struct AdapterControlBlock *)host->hostdata;
 
-	intmask_org = arcmsr_disable_outbound_ints(acb);
+	arcmsr_disable_outbound_ints(acb);
 	arcmsr_free_irq(pdev, acb);
 	del_timer_sync(&acb->eternal_timer);
 	if (set_date_time)
@@ -1407,7 +1405,7 @@ static void arcmsr_done4abort_postqueue(struct AdapterControlBlock *acb)
 	struct ARCMSR_CDB *pARCMSR_CDB;
 	bool error;
 	struct CommandControlBlock *pCCB;
-	unsigned long ccb_cdb_phy, cdb_phy_hipart;
+	unsigned long ccb_cdb_phy;
 
 	switch (acb->adapter_type) {
 
@@ -1489,8 +1487,7 @@ static void arcmsr_done4abort_postqueue(struct AdapterControlBlock *acb)
 					((toggle ^ 0x4000) + 1);
 				doneq_index = pmu->doneq_index;
 				spin_unlock_irqrestore(&acb->doneq_lock, flags);
-				cdb_phy_hipart = pmu->done_qbuffer[doneq_index &
-					0xFFF].addressHigh;
+				pmu->done_qbuffer[doneq_index & 0xFFF].addressHigh;
 				addressLow = pmu->done_qbuffer[doneq_index &
 					0xFFF].addressLow;
 				ccb_cdb_phy = (addressLow & 0xFFFFFFF0);
@@ -2445,7 +2442,7 @@ static void arcmsr_hbaD_postqueue_isr(struct AdapterControlBlock *acb)
 	struct MessageUnit_D  *pmu;
 	struct ARCMSR_CDB *arcmsr_cdb;
 	struct CommandControlBlock *ccb;
-	unsigned long flags, ccb_cdb_phy, cdb_phy_hipart;
+	unsigned long flags, ccb_cdb_phy;
 
 	spin_lock_irqsave(&acb->doneq_lock, flags);
 	pmu = acb->pmuD;
@@ -2459,8 +2456,7 @@ static void arcmsr_hbaD_postqueue_isr(struct AdapterControlBlock *acb)
 			pmu->doneq_index = index_stripped ? (index_stripped | toggle) :
 				((toggle ^ 0x4000) + 1);
 			doneq_index = pmu->doneq_index;
-			cdb_phy_hipart = pmu->done_qbuffer[doneq_index &
-				0xFFF].addressHigh;
+			pmu->done_qbuffer[doneq_index & 0xFFF].addressHigh;
 			addressLow = pmu->done_qbuffer[doneq_index &
 				0xFFF].addressLow;
 			ccb_cdb_phy = (addressLow & 0xFFFFFFF0);
@@ -3495,7 +3491,7 @@ static int arcmsr_hbaD_polling_ccbdone(struct AdapterControlBlock *acb,
 	bool error;
 	uint32_t poll_ccb_done = 0, poll_count = 0, flag_ccb;
 	int rtn, doneq_index, index_stripped, outbound_write_pointer, toggle;
-	unsigned long flags, ccb_cdb_phy, cdb_phy_hipart;
+	unsigned long flags, ccb_cdb_phy;
 	struct ARCMSR_CDB *arcmsr_cdb;
 	struct CommandControlBlock *pCCB;
 	struct MessageUnit_D *pmu = acb->pmuD;
@@ -3527,8 +3523,7 @@ static int arcmsr_hbaD_polling_ccbdone(struct AdapterControlBlock *acb,
 				((toggle ^ 0x4000) + 1);
 		doneq_index = pmu->doneq_index;
 		spin_unlock_irqrestore(&acb->doneq_lock, flags);
-		cdb_phy_hipart = pmu->done_qbuffer[doneq_index &
-				0xFFF].addressHigh;
+		pmu->done_qbuffer[doneq_index & 0xFFF].addressHigh;
 		flag_ccb = pmu->done_qbuffer[doneq_index & 0xFFF].addressLow;
 		ccb_cdb_phy = (flag_ccb & 0xFFFFFFF0);
 		if (acb->cdb_phyadd_hipart)
-- 
2.25.1


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

* [PATCH v2 15/29] scsi: arcmsr: arcmsr_hba: Make room for the trailing NULL, even if it is over-written
  2020-07-13  7:46 [PATCH v2 00/29] Fix a bunch more SCSI related W=1 warnings Lee Jones
                   ` (13 preceding siblings ...)
  2020-07-13  7:46 ` [PATCH v2 14/29] scsi: arcmsr: arcmsr_hba: Remove some set but unused variables Lee Jones
@ 2020-07-13  7:46 ` Lee Jones
  2020-07-13  7:46 ` [PATCH v2 16/29] scsi: qedf: qedf_io: Remove a whole host of unused variables Lee Jones
                   ` (14 subsequent siblings)
  29 siblings, 0 replies; 53+ messages in thread
From: Lee Jones @ 2020-07-13  7:46 UTC (permalink / raw)
  To: jejb, martin.petersen; +Cc: linux-kernel, linux-scsi, Lee Jones, support

Ensure we do not copy the final one (which is not overwitten).

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

 In file included from include/linux/bitmap.h:9,
 from include/linux/nodemask.h:95,
 from include/linux/mmzone.h:17,
 from include/linux/gfp.h:6,
 from include/linux/umh.h:4,
 from include/linux/kmod.h:9,
 from include/linux/module.h:16,
 from drivers/scsi/arcmsr/arcmsr_hba.c:47:
 In function ‘strncpy’,
 inlined from ‘arcmsr_handle_virtual_command’ at drivers/scsi/arcmsr/arcmsr_hba.c:3055:3:
 include/linux/string.h:297:30: warning: ‘__builtin_strncpy’ output truncated before terminating nul copying 4 bytes from a string of the same length [-Wstringop-truncation]
 297 | #define __underlying_strncpy __builtin_strncpy
 | ^
 include/linux/string.h:307:9: note: in expansion of macro ‘__underlying_strncpy’
 307 | return __underlying_strncpy(p, q, size);
 | ^~~~~~~~~~~~~~~~~~~~
 In function ‘strncpy’,
 inlined from ‘arcmsr_handle_virtual_command’ at drivers/scsi/arcmsr/arcmsr_hba.c:3053:3:
 include/linux/string.h:297:30: warning: ‘__builtin_strncpy’ output truncated before terminating nul copying 16 bytes from a string of the same length [-Wstringop-truncation]
 297 | #define __underlying_strncpy __builtin_strncpy
 | ^
 include/linux/string.h:307:9: note: in expansion of macro ‘__underlying_strncpy’
 307 | return __underlying_strncpy(p, q, size);
 | ^~~~~~~~~~~~~~~~~~~~
 In function ‘strncpy’,
 inlined from ‘arcmsr_handle_virtual_command’ at drivers/scsi/arcmsr/arcmsr_hba.c:3051:3:
 include/linux/string.h:297:30: warning: ‘__builtin_strncpy’ output truncated before terminating nul copying 8 bytes from a string of the same length [-Wstringop-truncation]
 297 | #define __underlying_strncpy __builtin_strncpy
 | ^
 include/linux/string.h:307:9: note: in expansion of macro ‘__underlying_strncpy’
 307 | return __underlying_strncpy(p, q, size);
 | ^~~~~~~~~~~~~~~~~~~~

Cc: support@areca.com.tw
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/scsi/arcmsr/arcmsr_hba.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/scsi/arcmsr/arcmsr_hba.c b/drivers/scsi/arcmsr/arcmsr_hba.c
index 1c252934409c7..5feed135eb26c 100644
--- a/drivers/scsi/arcmsr/arcmsr_hba.c
+++ b/drivers/scsi/arcmsr/arcmsr_hba.c
@@ -3031,7 +3031,7 @@ static void arcmsr_handle_virtual_command(struct AdapterControlBlock *acb,
 {
 	switch (cmd->cmnd[0]) {
 	case INQUIRY: {
-		unsigned char inqdata[36];
+		unsigned char inqdata[37];
 		char *buffer;
 		struct scatterlist *sg;
 
@@ -3048,16 +3048,16 @@ static void arcmsr_handle_virtual_command(struct AdapterControlBlock *acb,
 		/* ISO, ECMA, & ANSI versions */
 		inqdata[4] = 31;
 		/* length of additional data */
-		strncpy(&inqdata[8], "Areca   ", 8);
+		strncpy(&inqdata[8], "Areca   ", 9);
 		/* Vendor Identification */
-		strncpy(&inqdata[16], "RAID controller ", 16);
+		strncpy(&inqdata[16], "RAID controller ", 17);
 		/* Product Identification */
-		strncpy(&inqdata[32], "R001", 4); /* Product Revision */
+		strncpy(&inqdata[32], "R001", 5); /* Product Revision */
 
 		sg = scsi_sglist(cmd);
 		buffer = kmap_atomic(sg_page(sg)) + sg->offset;
 
-		memcpy(buffer, inqdata, sizeof(inqdata));
+		memcpy(buffer, inqdata, sizeof(inqdata) - 1);
 		sg = scsi_sglist(cmd);
 		kunmap_atomic(buffer - sg->offset);
 
-- 
2.25.1


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

* [PATCH v2 16/29] scsi: qedf: qedf_io: Remove a whole host of unused variables
  2020-07-13  7:46 [PATCH v2 00/29] Fix a bunch more SCSI related W=1 warnings Lee Jones
                   ` (14 preceding siblings ...)
  2020-07-13  7:46 ` [PATCH v2 15/29] scsi: arcmsr: arcmsr_hba: Make room for the trailing NULL, even if it is over-written Lee Jones
@ 2020-07-13  7:46 ` Lee Jones
  2020-07-13  7:46 ` [PATCH v2 17/29] scsi: bnx2fc: bnx2fc_tgt: Demote obvious misuse of kerneldoc to standard comment blocks Lee Jones
                   ` (13 subsequent siblings)
  29 siblings, 0 replies; 53+ messages in thread
From: Lee Jones @ 2020-07-13  7:46 UTC (permalink / raw)
  To: jejb, martin.petersen
  Cc: linux-kernel, linux-scsi, Lee Jones, QLogic-Storage-Upstream

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

 drivers/scsi/qedf/qedf_io.c: In function ‘qedf_cmd_timeout’:
 drivers/scsi/qedf/qedf_io.c:25:5: warning: variable ‘op’ set but not used [-Wunused-but-set-variable]
 25 | u8 op = 0;
 | ^~
 drivers/scsi/qedf/qedf_io.c: In function ‘qedf_map_sg’:
 drivers/scsi/qedf/qedf_io.c:490:12: warning: variable ‘end_addr’ set but not used [-Wunused-but-set-variable]
 490 | u64 addr, end_addr;
 | ^~~~~~~~
 drivers/scsi/qedf/qedf_io.c: In function ‘qedf_post_io_req’:
 drivers/scsi/qedf/qedf_io.c:863:22: warning: variable ‘req_type’ set but not used [-Wunused-but-set-variable]
 863 | enum fcoe_task_type req_type = 0;
 | ^~~~~~~~
 drivers/scsi/qedf/qedf_io.c: In function ‘qedf_scsi_completion’:
 drivers/scsi/qedf/qedf_io.c:1134:31: warning: variable ‘task_ctx’ set but not used [-Wunused-but-set-variable]
 1134 | struct e4_fcoe_task_context *task_ctx;
 | ^~~~~~~~
 drivers/scsi/qedf/qedf_io.c: In function ‘qedf_scsi_done’:
 drivers/scsi/qedf/qedf_io.c:1345:6: warning: variable ‘xid’ set but not used [-Wunused-but-set-variable]
 1345 | u16 xid;
 | ^~~
 drivers/scsi/qedf/qedf_io.c: In function ‘qedf_initiate_abts’:
 drivers/scsi/qedf/qedf_io.c:1866:6: warning: variable ‘r_a_tov’ set but not used [-Wunused-but-set-variable]
 1866 | u32 r_a_tov = 0;
 | ^~~~~~~
 drivers/scsi/qedf/qedf_io.c: In function ‘qedf_process_abts_compl’:
 drivers/scsi/qedf/qedf_io.c:1967:11: warning: variable ‘xid’ set but not used [-Wunused-but-set-variable]
 1967 | uint16_t xid;
 | ^~~
 drivers/scsi/qedf/qedf_io.c: In function ‘qedf_initiate_cleanup’:
 drivers/scsi/qedf/qedf_io.c:2163:31: warning: variable ‘task’ set but not used [-Wunused-but-set-variable]
 2163 | struct e4_fcoe_task_context *task;
 | ^~~~
 drivers/scsi/qedf/qedf_io.c: In function ‘qedf_process_unsol_compl’:
 drivers/scsi/qedf/qedf_io.c:2534:11: warning: variable ‘tmp’ set but not used [-Wunused-but-set-variable]
 2534 | uint16_t tmp;
 | ^~~

Cc: QLogic-Storage-Upstream@cavium.com
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/scsi/qedf/qedf_io.c | 30 ++++--------------------------
 1 file changed, 4 insertions(+), 26 deletions(-)

diff --git a/drivers/scsi/qedf/qedf_io.c b/drivers/scsi/qedf/qedf_io.c
index 0f6a15c1a04b3..acd9774a9387c 100644
--- a/drivers/scsi/qedf/qedf_io.c
+++ b/drivers/scsi/qedf/qedf_io.c
@@ -22,7 +22,6 @@ static void qedf_cmd_timeout(struct work_struct *work)
 	    container_of(work, struct qedf_ioreq, timeout_work.work);
 	struct qedf_ctx *qedf;
 	struct qedf_rport *fcport;
-	u8 op = 0;
 
 	if (io_req == NULL) {
 		QEDF_INFO(NULL, QEDF_LOG_IO, "io_req is NULL.\n");
@@ -89,7 +88,6 @@ static void qedf_cmd_timeout(struct work_struct *work)
 		io_req->event = QEDF_IOREQ_EV_ELS_TMO;
 		/* Call callback function to complete command */
 		if (io_req->cb_func && io_req->cb_arg) {
-			op = io_req->cb_arg->op;
 			io_req->cb_func(io_req->cb_arg);
 			io_req->cb_arg = NULL;
 		}
@@ -487,7 +485,7 @@ static int qedf_map_sg(struct qedf_ioreq *io_req)
 	int sg_count = 0;
 	int bd_count = 0;
 	u32 sg_len;
-	u64 addr, end_addr;
+	u64 addr;
 	int i = 0;
 
 	sg_count = dma_map_sg(&qedf->pdev->dev, scsi_sglist(sc),
@@ -502,10 +500,9 @@ static int qedf_map_sg(struct qedf_ioreq *io_req)
 	scsi_for_each_sg(sc, sg, sg_count, i) {
 		sg_len = (u32)sg_dma_len(sg);
 		addr = (u64)sg_dma_address(sg);
-		end_addr = (u64)(addr + sg_len);
 
 		/*
-		 * Intermediate s/g element so check if start and end address
+		 * Intermediate s/g element so check if start address
 		 * is page aligned.  Only required for writes and only if the
 		 * number of scatter/gather elements is 8 or more.
 		 */
@@ -860,7 +857,6 @@ int qedf_post_io_req(struct qedf_rport *fcport, struct qedf_ioreq *io_req)
 	struct qedf_ctx *qedf = lport_priv(lport);
 	struct e4_fcoe_task_context *task_ctx;
 	u16 xid;
-	enum fcoe_task_type req_type = 0;
 	struct fcoe_wqe *sqe;
 	u16 sqe_idx;
 
@@ -873,11 +869,9 @@ int qedf_post_io_req(struct qedf_rport *fcport, struct qedf_ioreq *io_req)
 	io_req->cpu = smp_processor_id();
 
 	if (sc_cmd->sc_data_direction == DMA_FROM_DEVICE) {
-		req_type = FCOE_TASK_TYPE_READ_INITIATOR;
 		io_req->io_req_flags = QEDF_READ;
 		qedf->input_requests++;
 	} else if (sc_cmd->sc_data_direction == DMA_TO_DEVICE) {
-		req_type = FCOE_TASK_TYPE_WRITE_INITIATOR;
 		io_req->io_req_flags = QEDF_WRITE;
 		qedf->output_requests++;
 	} else {
@@ -1130,8 +1124,6 @@ static void qedf_unmap_sg_list(struct qedf_ctx *qedf, struct qedf_ioreq *io_req)
 void qedf_scsi_completion(struct qedf_ctx *qedf, struct fcoe_cqe *cqe,
 	struct qedf_ioreq *io_req)
 {
-	u16 xid;
-	struct e4_fcoe_task_context *task_ctx;
 	struct scsi_cmnd *sc_cmd;
 	struct fcoe_cqe_rsp_info *fcp_rsp;
 	struct qedf_rport *fcport;
@@ -1155,8 +1147,6 @@ void qedf_scsi_completion(struct qedf_ctx *qedf, struct fcoe_cqe *cqe,
 		return;
 	}
 
-	xid = io_req->xid;
-	task_ctx = qedf_get_task_mem(&qedf->tasks, xid);
 	sc_cmd = io_req->sc_cmd;
 	fcp_rsp = &cqe->cqe_info.rsp_info;
 
@@ -1342,7 +1332,6 @@ void qedf_scsi_completion(struct qedf_ctx *qedf, struct fcoe_cqe *cqe,
 void qedf_scsi_done(struct qedf_ctx *qedf, struct qedf_ioreq *io_req,
 	int result)
 {
-	u16 xid;
 	struct scsi_cmnd *sc_cmd;
 	int refcount;
 
@@ -1364,7 +1353,6 @@ void qedf_scsi_done(struct qedf_ctx *qedf, struct qedf_ioreq *io_req,
 	 */
 	clear_bit(QEDF_CMD_OUTSTANDING, &io_req->flags);
 
-	xid = io_req->xid;
 	sc_cmd = io_req->sc_cmd;
 
 	if (!sc_cmd) {
@@ -1863,7 +1851,6 @@ int qedf_initiate_abts(struct qedf_ioreq *io_req, bool return_scsi_cmd_on_abts)
 	struct fc_rport_priv *rdata;
 	struct qedf_ctx *qedf;
 	u16 xid;
-	u32 r_a_tov = 0;
 	int rc = 0;
 	unsigned long flags;
 	struct fcoe_wqe *sqe;
@@ -1886,7 +1873,6 @@ int qedf_initiate_abts(struct qedf_ioreq *io_req, bool return_scsi_cmd_on_abts)
 		goto out;
 	}
 
-	r_a_tov = rdata->r_a_tov;
 	lport = qedf->lport;
 
 	if (lport->state != LPORT_ST_READY || !(lport->link_up)) {
@@ -1964,14 +1950,12 @@ void qedf_process_abts_compl(struct qedf_ctx *qedf, struct fcoe_cqe *cqe,
 	struct qedf_ioreq *io_req)
 {
 	uint32_t r_ctl;
-	uint16_t xid;
 	int rc;
 	struct qedf_rport *fcport = io_req->fcport;
 
 	QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_SCSI_TM, "Entered with xid = "
 		   "0x%x cmd_type = %d\n", io_req->xid, io_req->cmd_type);
 
-	xid = io_req->xid;
 	r_ctl = cqe->cqe_info.abts_info.r_ctl;
 
 	/* This was added at a point when we were scheduling abts_compl &
@@ -2159,8 +2143,6 @@ int qedf_initiate_cleanup(struct qedf_ioreq *io_req,
 {
 	struct qedf_rport *fcport;
 	struct qedf_ctx *qedf;
-	uint16_t xid;
-	struct e4_fcoe_task_context *task;
 	int tmo = 0;
 	int rc = SUCCESS;
 	unsigned long flags;
@@ -2220,12 +2202,9 @@ int qedf_initiate_cleanup(struct qedf_ioreq *io_req,
 		  refcount, fcport, fcport->rdata->ids.port_id);
 
 	/* Cleanup cmds re-use the same TID as the original I/O */
-	xid = io_req->xid;
 	io_req->cmd_type = QEDF_CLEANUP;
 	io_req->return_scsi_cmd_on_abts = return_scsi_cmd_on_abts;
 
-	task = qedf_get_task_mem(&qedf->tasks, xid);
-
 	init_completion(&io_req->cleanup_done);
 
 	spin_lock_irqsave(&fcport->rport_lock, flags);
@@ -2531,7 +2510,6 @@ void qedf_process_unsol_compl(struct qedf_ctx *qedf, uint16_t que_idx,
 	struct fcoe_cqe *cqe)
 {
 	unsigned long flags;
-	uint16_t tmp;
 	uint16_t pktlen = cqe->cqe_info.unsolic_info.pkt_len;
 	u32 payload_len, crc;
 	struct fc_frame_header *fh;
@@ -2629,9 +2607,9 @@ void qedf_process_unsol_compl(struct qedf_ctx *qedf, uint16_t que_idx,
 		qedf->bdq_prod_idx = 0;
 
 	writew(qedf->bdq_prod_idx, qedf->bdq_primary_prod);
-	tmp = readw(qedf->bdq_primary_prod);
+	readw(qedf->bdq_primary_prod);
 	writew(qedf->bdq_prod_idx, qedf->bdq_secondary_prod);
-	tmp = readw(qedf->bdq_secondary_prod);
+	readw(qedf->bdq_secondary_prod);
 
 	spin_unlock_irqrestore(&qedf->hba_lock, flags);
 }
-- 
2.25.1


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

* [PATCH v2 17/29] scsi: bnx2fc: bnx2fc_tgt: Demote obvious misuse of kerneldoc to standard comment blocks
  2020-07-13  7:46 [PATCH v2 00/29] Fix a bunch more SCSI related W=1 warnings Lee Jones
                   ` (15 preceding siblings ...)
  2020-07-13  7:46 ` [PATCH v2 16/29] scsi: qedf: qedf_io: Remove a whole host of unused variables Lee Jones
@ 2020-07-13  7:46 ` Lee Jones
  2020-07-13  7:46 ` [PATCH v2 18/29] scsi: aic7xxx: aic7xxx_osm: Remove unused variable 'tinfo' Lee Jones
                   ` (12 subsequent siblings)
  29 siblings, 0 replies; 53+ messages in thread
From: Lee Jones @ 2020-07-13  7:46 UTC (permalink / raw)
  To: jejb, martin.petersen
  Cc: linux-kernel, linux-scsi, Lee Jones, QLogic-Storage-Upstream,
	Prakash Gollapudi

No attempt has been made to document either of the demoted functions here.

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

 drivers/scsi/bnx2fc/bnx2fc_tgt.c:442: warning: Function parameter or member 'lport' not described in 'bnx2fc_rport_event_handler'
 drivers/scsi/bnx2fc/bnx2fc_tgt.c:442: warning: Function parameter or member 'rdata' not described in 'bnx2fc_rport_event_handler'
 drivers/scsi/bnx2fc/bnx2fc_tgt.c:442: warning: Function parameter or member 'event' not described in 'bnx2fc_rport_event_handler'
 drivers/scsi/bnx2fc/bnx2fc_tgt.c:665: warning: Function parameter or member 'hba' not described in 'bnx2fc_alloc_session_resc'
 drivers/scsi/bnx2fc/bnx2fc_tgt.c:665: warning: Function parameter or member 'tgt' not described in 'bnx2fc_alloc_session_resc'

Cc: QLogic-Storage-Upstream@qlogic.com
Cc: Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/scsi/bnx2fc/bnx2fc_tgt.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/scsi/bnx2fc/bnx2fc_tgt.c b/drivers/scsi/bnx2fc/bnx2fc_tgt.c
index 50384b4a817c8..a3e2a38aabf2f 100644
--- a/drivers/scsi/bnx2fc/bnx2fc_tgt.c
+++ b/drivers/scsi/bnx2fc/bnx2fc_tgt.c
@@ -431,7 +431,7 @@ static int bnx2fc_init_tgt(struct bnx2fc_rport *tgt,
 	return 0;
 }
 
-/**
+/*
  * This event_callback is called after successful completion of libfc
  * initiated target login. bnx2fc can proceed with initiating the session
  * establishment.
@@ -656,9 +656,8 @@ static void bnx2fc_free_conn_id(struct bnx2fc_hba *hba, u32 conn_id)
 	spin_unlock_bh(&hba->hba_lock);
 }
 
-/**
- *bnx2fc_alloc_session_resc - Allocate qp resources for the session
- *
+/*
+ * bnx2fc_alloc_session_resc - Allocate qp resources for the session
  */
 static int bnx2fc_alloc_session_resc(struct bnx2fc_hba *hba,
 					struct bnx2fc_rport *tgt)
-- 
2.25.1


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

* [PATCH v2 18/29] scsi: aic7xxx: aic7xxx_osm: Remove unused variable 'tinfo'
  2020-07-13  7:46 [PATCH v2 00/29] Fix a bunch more SCSI related W=1 warnings Lee Jones
                   ` (16 preceding siblings ...)
  2020-07-13  7:46 ` [PATCH v2 17/29] scsi: bnx2fc: bnx2fc_tgt: Demote obvious misuse of kerneldoc to standard comment blocks Lee Jones
@ 2020-07-13  7:46 ` Lee Jones
  2020-07-14 16:24   ` Doug Ledford
  2020-07-13  7:46 ` [PATCH v2 19/29] scsi: aic7xxx: aic7xxx_osm: Remove unused variable 'ahc' Lee Jones
                   ` (11 subsequent siblings)
  29 siblings, 1 reply; 53+ messages in thread
From: Lee Jones @ 2020-07-13  7:46 UTC (permalink / raw)
  To: jejb, martin.petersen
  Cc: linux-kernel, linux-scsi, Lee Jones, Hannes Reinecke,
	Daniel M. Eischen, Doug Ledford

Looks like none of the artifact from  ahc_fetch_transinfo() are used anymore.

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

 drivers/scsi/aic7xxx/aic7xxx_osm.c: In function ‘ahc_linux_target_alloc’:
 drivers/scsi/aic7xxx/aic7xxx_osm.c:567:30: warning: variable ‘tinfo’ set but not used [-Wunused-but-set-variable]
 567 | struct ahc_initiator_tinfo *tinfo;
 | ^~~~~

Cc: Hannes Reinecke <hare@suse.com>
Cc: "Daniel M. Eischen" <deischen@iworks.InterWorks.org>
Cc: Doug Ledford <dledford@redhat.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/scsi/aic7xxx/aic7xxx_osm.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm.c b/drivers/scsi/aic7xxx/aic7xxx_osm.c
index 2edfa0594f183..32bfe20d79cc1 100644
--- a/drivers/scsi/aic7xxx/aic7xxx_osm.c
+++ b/drivers/scsi/aic7xxx/aic7xxx_osm.c
@@ -564,8 +564,6 @@ ahc_linux_target_alloc(struct scsi_target *starget)
 	struct scsi_target **ahc_targp = ahc_linux_target_in_softc(starget);
 	unsigned short scsirate;
 	struct ahc_devinfo devinfo;
-	struct ahc_initiator_tinfo *tinfo;
-	struct ahc_tmode_tstate *tstate;
 	char channel = starget->channel + 'A';
 	unsigned int our_id = ahc->our_id;
 	unsigned int target_offset;
@@ -612,9 +610,6 @@ ahc_linux_target_alloc(struct scsi_target *starget)
 			spi_max_offset(starget) = 0;
 		spi_min_period(starget) = 
 			ahc_find_period(ahc, scsirate, maxsync);
-
-		tinfo = ahc_fetch_transinfo(ahc, channel, ahc->our_id,
-					    starget->id, &tstate);
 	}
 	ahc_compile_devinfo(&devinfo, our_id, starget->id,
 			    CAM_LUN_WILDCARD, channel,
-- 
2.25.1


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

* [PATCH v2 19/29] scsi: aic7xxx: aic7xxx_osm: Remove unused variable 'ahc'
  2020-07-13  7:46 [PATCH v2 00/29] Fix a bunch more SCSI related W=1 warnings Lee Jones
                   ` (17 preceding siblings ...)
  2020-07-13  7:46 ` [PATCH v2 18/29] scsi: aic7xxx: aic7xxx_osm: Remove unused variable 'tinfo' Lee Jones
@ 2020-07-13  7:46 ` Lee Jones
  2020-07-14  7:07   ` Hannes Reinecke
  2020-07-13  7:46 ` [PATCH v2 20/29] scsi: aic7xxx: aic7xxx_osm: Remove unused variable 'targ' Lee Jones
                   ` (10 subsequent siblings)
  29 siblings, 1 reply; 53+ messages in thread
From: Lee Jones @ 2020-07-13  7:46 UTC (permalink / raw)
  To: jejb, martin.petersen
  Cc: linux-kernel, linux-scsi, Lee Jones, Hannes Reinecke,
	Daniel M. Eischen, Doug Ledford

Looks as though 'ahc' hasn't been used since 2005.

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

 drivers/scsi/aic7xxx/aic7xxx_osm.c: In function ‘ahc_linux_slave_configure’:
 drivers/scsi/aic7xxx/aic7xxx_osm.c:674:20: warning: variable ‘ahc’ set but not used [-Wunused-but-set-variable]
 674 | struct ahc_softc *ahc;
 | ^~~

Cc: Hannes Reinecke <hare@suse.com>
Cc: "Daniel M. Eischen" <deischen@iworks.InterWorks.org>
Cc: Doug Ledford <dledford@redhat.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/scsi/aic7xxx/aic7xxx_osm.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm.c b/drivers/scsi/aic7xxx/aic7xxx_osm.c
index 32bfe20d79cc1..cc4c7b1781466 100644
--- a/drivers/scsi/aic7xxx/aic7xxx_osm.c
+++ b/drivers/scsi/aic7xxx/aic7xxx_osm.c
@@ -666,10 +666,6 @@ ahc_linux_slave_alloc(struct scsi_device *sdev)
 static int
 ahc_linux_slave_configure(struct scsi_device *sdev)
 {
-	struct	ahc_softc *ahc;
-
-	ahc = *((struct ahc_softc **)sdev->host->hostdata);
-
 	if (bootverbose)
 		sdev_printk(KERN_INFO, sdev, "Slave Configure\n");
 
-- 
2.25.1


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

* [PATCH v2 20/29] scsi: aic7xxx: aic7xxx_osm: Remove unused variable 'targ'
  2020-07-13  7:46 [PATCH v2 00/29] Fix a bunch more SCSI related W=1 warnings Lee Jones
                   ` (18 preceding siblings ...)
  2020-07-13  7:46 ` [PATCH v2 19/29] scsi: aic7xxx: aic7xxx_osm: Remove unused variable 'ahc' Lee Jones
@ 2020-07-13  7:46 ` Lee Jones
  2020-07-14  7:07   ` Hannes Reinecke
  2020-07-13  7:46 ` [PATCH v2 21/29] scsi: aic7xxx: aic7xxx_osm: Fix 'amount_xferred' set but not used issue Lee Jones
                   ` (9 subsequent siblings)
  29 siblings, 1 reply; 53+ messages in thread
From: Lee Jones @ 2020-07-13  7:46 UTC (permalink / raw)
  To: jejb, martin.petersen
  Cc: linux-kernel, linux-scsi, Lee Jones, Hannes Reinecke,
	Daniel M. Eischen, Doug Ledford

Looks like checking the 'targ' was removed in 2005.

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

 drivers/scsi/aic7xxx/aic7xxx_osm.c: In function ‘ahc_send_async’:
 drivers/scsi/aic7xxx/aic7xxx_osm.c:1604:28: warning: variable ‘targ’ set but not used [-Wunused-but-set-variable]
 1604 | struct ahc_linux_target *targ;
 | ^~~~

Cc: Hannes Reinecke <hare@suse.com>
Cc: "Daniel M. Eischen" <deischen@iworks.InterWorks.org>
Cc: Doug Ledford <dledford@redhat.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/scsi/aic7xxx/aic7xxx_osm.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm.c b/drivers/scsi/aic7xxx/aic7xxx_osm.c
index cc4c7b1781466..ed437c16de881 100644
--- a/drivers/scsi/aic7xxx/aic7xxx_osm.c
+++ b/drivers/scsi/aic7xxx/aic7xxx_osm.c
@@ -1592,7 +1592,6 @@ ahc_send_async(struct ahc_softc *ahc, char channel,
 	case AC_TRANSFER_NEG:
 	{
 		struct	scsi_target *starget;
-		struct	ahc_linux_target *targ;
 		struct	ahc_initiator_tinfo *tinfo;
 		struct	ahc_tmode_tstate *tstate;
 		int	target_offset;
@@ -1626,7 +1625,6 @@ ahc_send_async(struct ahc_softc *ahc, char channel,
 		starget = ahc->platform_data->starget[target_offset];
 		if (starget == NULL)
 			break;
-		targ = scsi_transport_target_data(starget);
 
 		target_ppr_options =
 			(spi_dt(starget) ? MSG_EXT_PPR_DT_REQ : 0)
-- 
2.25.1


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

* [PATCH v2 21/29] scsi: aic7xxx: aic7xxx_osm: Fix 'amount_xferred' set but not used issue
  2020-07-13  7:46 [PATCH v2 00/29] Fix a bunch more SCSI related W=1 warnings Lee Jones
                   ` (19 preceding siblings ...)
  2020-07-13  7:46 ` [PATCH v2 20/29] scsi: aic7xxx: aic7xxx_osm: Remove unused variable 'targ' Lee Jones
@ 2020-07-13  7:46 ` Lee Jones
  2020-07-14  7:08   ` Hannes Reinecke
  2020-07-13  7:46 ` [PATCH v2 22/29] scsi: qedf: qedf_debugfs: Demote obvious misuse of kerneldoc to standard comment blocks Lee Jones
                   ` (8 subsequent siblings)
  29 siblings, 1 reply; 53+ messages in thread
From: Lee Jones @ 2020-07-13  7:46 UTC (permalink / raw)
  To: jejb, martin.petersen
  Cc: linux-kernel, linux-scsi, Lee Jones, Hannes Reinecke,
	Daniel M. Eischen, Doug Ledford

'amount_xferred' is used, but only in certain circumstances.  Place
the same stipulations on the defining/allocating of 'amount_xferred'
as is placed when using it.

We've been careful not to change any of the ordering semantics here.

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

 drivers/scsi/aic7xxx/aic7xxx_osm.c: In function ‘ahc_done’:
 drivers/scsi/aic7xxx/aic7xxx_osm.c:1725:12: warning: variable ‘amount_xferred’ set but not used [-Wunused-but-set-variable]
 1725 | uint32_t amount_xferred;
 | ^~~~~~~~~~~~~~

Cc: Hannes Reinecke <hare@suse.com>
Cc: "Daniel M. Eischen" <deischen@iworks.InterWorks.org>
Cc: Doug Ledford <dledford@redhat.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/scsi/aic7xxx/aic7xxx_osm.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm.c b/drivers/scsi/aic7xxx/aic7xxx_osm.c
index ed437c16de881..e7ccb8b80fc19 100644
--- a/drivers/scsi/aic7xxx/aic7xxx_osm.c
+++ b/drivers/scsi/aic7xxx/aic7xxx_osm.c
@@ -1711,10 +1711,12 @@ ahc_done(struct ahc_softc *ahc, struct scb *scb)
 	 */
 	cmd->sense_buffer[0] = 0;
 	if (ahc_get_transaction_status(scb) == CAM_REQ_INPROG) {
+#ifdef AHC_REPORT_UNDERFLOWS
 		uint32_t amount_xferred;
 
 		amount_xferred =
 		    ahc_get_transfer_length(scb) - ahc_get_residual(scb);
+#endif
 		if ((scb->flags & SCB_TRANSMISSION_ERROR) != 0) {
 #ifdef AHC_DEBUG
 			if ((ahc_debug & AHC_SHOW_MISC) != 0) {
-- 
2.25.1


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

* [PATCH v2 22/29] scsi: qedf: qedf_debugfs: Demote obvious misuse of kerneldoc to standard comment blocks
  2020-07-13  7:46 [PATCH v2 00/29] Fix a bunch more SCSI related W=1 warnings Lee Jones
                   ` (20 preceding siblings ...)
  2020-07-13  7:46 ` [PATCH v2 21/29] scsi: aic7xxx: aic7xxx_osm: Fix 'amount_xferred' set but not used issue Lee Jones
@ 2020-07-13  7:46 ` Lee Jones
  2020-07-13  7:46 ` [PATCH v2 23/29] scsi: aacraid: linit: Provide suggested curly braces around empty body of if() Lee Jones
                   ` (7 subsequent siblings)
  29 siblings, 0 replies; 53+ messages in thread
From: Lee Jones @ 2020-07-13  7:46 UTC (permalink / raw)
  To: jejb, martin.petersen
  Cc: linux-kernel, linux-scsi, Lee Jones, QLogic-Storage-Upstream

No attempt has been made to document any of the demoted functions here.

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

 drivers/scsi/qedf/qedf_debugfs.c:25: warning: Function parameter or member 'qedf' not described in 'qedf_dbg_host_init'
 drivers/scsi/qedf/qedf_debugfs.c:25: warning: Function parameter or member 'dops' not described in 'qedf_dbg_host_init'
 drivers/scsi/qedf/qedf_debugfs.c:25: warning: Function parameter or member 'fops' not described in 'qedf_dbg_host_init'
 drivers/scsi/qedf/qedf_debugfs.c:25: warning: Excess function parameter 'pf' description in 'qedf_dbg_host_init'
 drivers/scsi/qedf/qedf_debugfs.c:51: warning: Function parameter or member 'qedf_dbg' not described in 'qedf_dbg_host_exit'
 drivers/scsi/qedf/qedf_debugfs.c:51: warning: Excess function parameter 'pf' description in 'qedf_dbg_host_exit'
 drivers/scsi/qedf/qedf_debugfs.c:64: warning: Function parameter or member 'drv_name' not described in 'qedf_dbg_init'

Cc: QLogic-Storage-Upstream@cavium.com
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/scsi/qedf/qedf_debugfs.c | 18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)

diff --git a/drivers/scsi/qedf/qedf_debugfs.c b/drivers/scsi/qedf/qedf_debugfs.c
index b88bed9bb1338..a3ed681c8ce3f 100644
--- a/drivers/scsi/qedf/qedf_debugfs.c
+++ b/drivers/scsi/qedf/qedf_debugfs.c
@@ -14,10 +14,9 @@
 
 static struct dentry *qedf_dbg_root;
 
-/**
+/*
  * qedf_dbg_host_init - setup the debugfs file for the pf
- * @pf: the pf that is starting up
- **/
+ */
 void
 qedf_dbg_host_init(struct qedf_dbg_ctx *qedf,
 		    const struct qedf_debugfs_ops *dops,
@@ -42,10 +41,9 @@ qedf_dbg_host_init(struct qedf_dbg_ctx *qedf,
 	}
 }
 
-/**
+/*
  * qedf_dbg_host_exit - clear out the pf's debugfs entries
- * @pf: the pf that is stopping
- **/
+ */
 void
 qedf_dbg_host_exit(struct qedf_dbg_ctx *qedf_dbg)
 {
@@ -56,9 +54,9 @@ qedf_dbg_host_exit(struct qedf_dbg_ctx *qedf_dbg)
 	qedf_dbg->bdf_dentry = NULL;
 }
 
-/**
+/*
  * qedf_dbg_init - start up debugfs for the driver
- **/
+ */
 void
 qedf_dbg_init(char *drv_name)
 {
@@ -68,9 +66,9 @@ qedf_dbg_init(char *drv_name)
 	qedf_dbg_root = debugfs_create_dir(drv_name, NULL);
 }
 
-/**
+/*
  * qedf_dbg_exit - clean out the driver's debugfs entries
- **/
+ */
 void
 qedf_dbg_exit(void)
 {
-- 
2.25.1


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

* [PATCH v2 23/29] scsi: aacraid: linit: Provide suggested curly braces around empty body of if()
  2020-07-13  7:46 [PATCH v2 00/29] Fix a bunch more SCSI related W=1 warnings Lee Jones
                   ` (21 preceding siblings ...)
  2020-07-13  7:46 ` [PATCH v2 22/29] scsi: qedf: qedf_debugfs: Demote obvious misuse of kerneldoc to standard comment blocks Lee Jones
@ 2020-07-13  7:46 ` Lee Jones
  2020-07-13  7:46 ` [PATCH v2 24/29] scsi: aacraid: linit: Fix a couple of small kerneldoc issues Lee Jones
                   ` (6 subsequent siblings)
  29 siblings, 0 replies; 53+ messages in thread
From: Lee Jones @ 2020-07-13  7:46 UTC (permalink / raw)
  To: jejb, martin.petersen
  Cc: linux-kernel, linux-scsi, Lee Jones, Adaptec OEM Raid Solutions,
	PMC-Sierra, Inc

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

 drivers/scsi/aacraid/linit.c: In function ‘aac_biosparm’:
 drivers/scsi/aacraid/linit.c:368:41: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]
 368 | param->heads, param->sectors, num));
 | ^

Cc: Adaptec OEM Raid Solutions <aacraid@microsemi.com>
Cc: "PMC-Sierra, Inc" <aacraid@pmc-sierra.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/scsi/aacraid/linit.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c
index a308e86a97f19..734dd6e67246d 100644
--- a/drivers/scsi/aacraid/linit.c
+++ b/drivers/scsi/aacraid/linit.c
@@ -363,9 +363,10 @@ static int aac_biosparm(struct scsi_device *sdev, struct block_device *bdev,
 
 		param->cylinders = cap_to_cyls(capacity, param->heads * param->sectors);
 		if (num < 4 && end_sec == param->sectors) {
-			if (param->cylinders != saved_cylinders)
+			if (param->cylinders != saved_cylinders) {
 				dprintk((KERN_DEBUG "Adopting geometry: heads=%d, sectors=%d from partition table %d.\n",
 					param->heads, param->sectors, num));
+			}
 		} else if (end_head > 0 || end_sec > 0) {
 			dprintk((KERN_DEBUG "Strange geometry: heads=%d, sectors=%d in partition table %d.\n",
 				end_head + 1, end_sec, num));
-- 
2.25.1


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

* [PATCH v2 24/29] scsi: aacraid: linit: Fix a couple of small kerneldoc issues
  2020-07-13  7:46 [PATCH v2 00/29] Fix a bunch more SCSI related W=1 warnings Lee Jones
                   ` (22 preceding siblings ...)
  2020-07-13  7:46 ` [PATCH v2 23/29] scsi: aacraid: linit: Provide suggested curly braces around empty body of if() Lee Jones
@ 2020-07-13  7:46 ` Lee Jones
  2020-07-13  7:46 ` [PATCH v2 25/29] scsi: aic94xx: aic94xx_init: Demote seemingly unintentional kerneldoc header Lee Jones
                   ` (5 subsequent siblings)
  29 siblings, 0 replies; 53+ messages in thread
From: Lee Jones @ 2020-07-13  7:46 UTC (permalink / raw)
  To: jejb, martin.petersen
  Cc: linux-kernel, linux-scsi, Lee Jones, Adaptec OEM Raid Solutions,
	PMC-Sierra, Inc

Most likely caused by bitrot (docs not keeping in sync with API).

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

 drivers/scsi/aacraid/linit.c: In function ‘aac_biosparm’:
 drivers/scsi/aacraid/linit.c:368:41: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]
 drivers/scsi/aacraid/linit.c:243: warning: Function parameter or member 'shost' not described in 'aac_queuecommand'
 drivers/scsi/aacraid/linit.c:243: warning: Excess function parameter 'done' description in 'aac_queuecommand'
 drivers/scsi/aacraid/linit.c:1176: warning: Excess function parameter 'inode' description in 'aac_cfg_ioctl'

Cc: Adaptec OEM Raid Solutions <aacraid@microsemi.com>
Cc: "PMC-Sierra, Inc" <aacraid@pmc-sierra.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/scsi/aacraid/linit.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c
index 734dd6e67246d..f043e378652c1 100644
--- a/drivers/scsi/aacraid/linit.c
+++ b/drivers/scsi/aacraid/linit.c
@@ -230,8 +230,8 @@ static struct aac_driver_ident aac_drivers[] = {
 
 /**
  *	aac_queuecommand	-	queue a SCSI command
+ *	@shost:		Scsi host to queue command on
  *	@cmd:		SCSI command to queue
- *	@done:		Function to call on command completion
  *
  *	Queues a command for execution by the associated Host Adapter.
  *
@@ -1160,7 +1160,6 @@ static int aac_cfg_open(struct inode *inode, struct file *file)
 
 /**
  *	aac_cfg_ioctl		-	AAC configuration request
- *	@inode: inode of device
  *	@file: file handle
  *	@cmd: ioctl command code
  *	@arg: argument
-- 
2.25.1


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

* [PATCH v2 25/29] scsi: aic94xx: aic94xx_init: Demote seemingly unintentional kerneldoc header
  2020-07-13  7:46 [PATCH v2 00/29] Fix a bunch more SCSI related W=1 warnings Lee Jones
                   ` (23 preceding siblings ...)
  2020-07-13  7:46 ` [PATCH v2 24/29] scsi: aacraid: linit: Fix a couple of small kerneldoc issues Lee Jones
@ 2020-07-13  7:46 ` Lee Jones
  2020-07-13  7:46 ` [PATCH v2 26/29] scsi: pm8001: pm8001_init: Demote obvious misuse of kerneldoc and update others Lee Jones
                   ` (4 subsequent siblings)
  29 siblings, 0 replies; 53+ messages in thread
From: Lee Jones @ 2020-07-13  7:46 UTC (permalink / raw)
  To: jejb, martin.petersen
  Cc: linux-kernel, linux-scsi, Lee Jones, YueHaibing, Luben Tuikov

This is the only use of kerneldoc in the sourcefile and no
descriptions are provided.

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

 drivers/scsi/aic94xx/aic94xx_init.c:538: warning: Function parameter or member 'asd_ha' not described in 'asd_free_edbs'

Cc: YueHaibing <yuehaibing@huawei.com>
Cc: Luben Tuikov <luben_tuikov@adaptec.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/scsi/aic94xx/aic94xx_init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/aic94xx/aic94xx_init.c b/drivers/scsi/aic94xx/aic94xx_init.c
index bef47f38dd0db..a195bfe9eccc0 100644
--- a/drivers/scsi/aic94xx/aic94xx_init.c
+++ b/drivers/scsi/aic94xx/aic94xx_init.c
@@ -530,7 +530,7 @@ static int asd_create_ha_caches(struct asd_ha_struct *asd_ha)
 	return 0;
 }
 
-/**
+/*
  * asd_free_edbs -- free empty data buffers
  * asd_ha: pointer to host adapter structure
  */
-- 
2.25.1


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

* [PATCH v2 26/29] scsi: pm8001: pm8001_init: Demote obvious misuse of kerneldoc and update others
  2020-07-13  7:46 [PATCH v2 00/29] Fix a bunch more SCSI related W=1 warnings Lee Jones
                   ` (24 preceding siblings ...)
  2020-07-13  7:46 ` [PATCH v2 25/29] scsi: aic94xx: aic94xx_init: Demote seemingly unintentional kerneldoc header Lee Jones
@ 2020-07-13  7:46 ` Lee Jones
  2020-07-13  7:46 ` [PATCH v2 27/29] scsi: aic94xx: aic94xx_hwi: Repair kerneldoc formatting error and remove extra param Lee Jones
                   ` (3 subsequent siblings)
  29 siblings, 0 replies; 53+ messages in thread
From: Lee Jones @ 2020-07-13  7:46 UTC (permalink / raw)
  To: jejb, martin.petersen
  Cc: linux-kernel, linux-scsi, Lee Jones, Kumar Santhanam,
	Sangeetha Gnanasekaran, Nikith Ganigarakoppal, Jack Wang

More bitrot issues with function documentation not keeping up with API changes.

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

 drivers/scsi/pm8001/pm8001_init.c:64: warning: cannot understand function prototype: 'const struct pm8001_chip_info pm8001_chips[] = '
 drivers/scsi/pm8001/pm8001_init.c:86: warning: cannot understand function prototype: 'struct scsi_host_template pm8001_sht = '
 drivers/scsi/pm8001/pm8001_init.c:115: warning: cannot understand function prototype: 'struct sas_domain_function_template pm8001_transport_ops = '
 drivers/scsi/pm8001/pm8001_init.c:212: warning: Function parameter or member 'irq' not described in 'pm8001_interrupt_handler_msix'
 drivers/scsi/pm8001/pm8001_init.c:237: warning: Function parameter or member 'irq' not described in 'pm8001_interrupt_handler_intx'
 drivers/scsi/pm8001/pm8001_init.c:265: warning: Function parameter or member 'ent' not described in 'pm8001_alloc'
 drivers/scsi/pm8001/pm8001_init.c:624: warning: Function parameter or member 'pm8001_ha' not described in 'pm8001_init_sas_add'
 drivers/scsi/pm8001/pm8001_init.c:624: warning: Excess function parameter 'chip_info' description in 'pm8001_init_sas_add'
 drivers/scsi/pm8001/pm8001_init.c:900: warning: Function parameter or member 'pm8001_ha' not described in 'pm8001_setup_msix'
 drivers/scsi/pm8001/pm8001_init.c:900: warning: Excess function parameter 'chip_info' description in 'pm8001_setup_msix'
 drivers/scsi/pm8001/pm8001_init.c:900: warning: Excess function parameter 'irq_handler' description in 'pm8001_setup_msix'
 drivers/scsi/pm8001/pm8001_init.c:981: warning: Function parameter or member 'pm8001_ha' not described in 'pm8001_request_irq'
 drivers/scsi/pm8001/pm8001_init.c:981: warning: Excess function parameter 'chip_info' description in 'pm8001_request_irq'

Cc: Kumar Santhanam <AnandKumar.Santhanam@pmcs.com>
Cc: Sangeetha Gnanasekaran <Sangeetha.Gnanasekaran@pmcs.com>
Cc: Nikith Ganigarakoppal <Nikith.Ganigarakoppal@pmcs.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Jack Wang <jinpu.wang@cloud.ionos.com>
---
 drivers/scsi/pm8001/pm8001_init.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/drivers/scsi/pm8001/pm8001_init.c b/drivers/scsi/pm8001/pm8001_init.c
index 9e99262a2b9dd..20fa96cbc9d3d 100644
--- a/drivers/scsi/pm8001/pm8001_init.c
+++ b/drivers/scsi/pm8001/pm8001_init.c
@@ -57,7 +57,7 @@ MODULE_PARM_DESC(link_rate, "Enable link rate.\n"
 
 static struct scsi_transport_template *pm8001_stt;
 
-/**
+/*
  * chip info structure to identify chip key functionality as
  * encryption available/not, no of ports, hw specific function ref
  */
@@ -80,7 +80,7 @@ LIST_HEAD(hba_list);
 
 struct workqueue_struct *pm8001_wq;
 
-/**
+/*
  * The main structure which LLDD must register for scsi core.
  */
 static struct scsi_host_template pm8001_sht = {
@@ -109,7 +109,7 @@ static struct scsi_host_template pm8001_sht = {
 	.track_queue_depth	= 1,
 };
 
-/**
+/*
  * Sas layer call this function to execute specific task.
  */
 static struct sas_domain_function_template pm8001_transport_ops = {
@@ -129,9 +129,9 @@ static struct sas_domain_function_template pm8001_transport_ops = {
 };
 
 /**
- *pm8001_phy_init - initiate our adapter phys
- *@pm8001_ha: our hba structure.
- *@phy_id: phy id.
+ * pm8001_phy_init - initiate our adapter phys
+ * @pm8001_ha: our hba structure.
+ * @phy_id: phy id.
  */
 static void pm8001_phy_init(struct pm8001_hba_info *pm8001_ha, int phy_id)
 {
@@ -155,9 +155,8 @@ static void pm8001_phy_init(struct pm8001_hba_info *pm8001_ha, int phy_id)
 }
 
 /**
- *pm8001_free - free hba
- *@pm8001_ha:	our hba structure.
- *
+ * pm8001_free - free hba
+ * @pm8001_ha:	our hba structure.
  */
 static void pm8001_free(struct pm8001_hba_info *pm8001_ha)
 {
@@ -205,6 +204,7 @@ static void pm8001_tasklet(unsigned long opaque)
  * pm8001_interrupt_handler_msix - main MSIX interrupt handler.
  * It obtains the vector number and calls the equivalent bottom
  * half or services directly.
+ * @irq: interrupt number
  * @opaque: the passed outbound queue/vector. Host structure is
  * retrieved from the same.
  */
@@ -230,6 +230,7 @@ static irqreturn_t pm8001_interrupt_handler_msix(int irq, void *opaque)
 
 /**
  * pm8001_interrupt_handler_intx - main INTx interrupt handler.
+ * @irq: interrupt number
  * @dev_id: sas_ha structure. The HBA is retrieved from sas_has structure.
  */
 
@@ -257,8 +258,8 @@ static u32 pm8001_request_irq(struct pm8001_hba_info *pm8001_ha);
 
 /**
  * pm8001_alloc - initiate our hba structure and 6 DMAs area.
- * @pm8001_ha:our hba structure.
- *
+ * @pm8001_ha: our hba structure.
+ * @ent: PCI device ID structure to match on
  */
 static int pm8001_alloc(struct pm8001_hba_info *pm8001_ha,
 			const struct pci_device_id *ent)
@@ -615,7 +616,7 @@ static void  pm8001_post_sas_ha_init(struct Scsi_Host *shost,
 
 /**
  * pm8001_init_sas_add - initialize sas address
- * @chip_info: our ha struct.
+ * @pm8001_ha: our ha struct.
  *
  * Currently we just set the fixed SAS address to our HBA,for manufacture,
  * it should read from the EEPROM
@@ -893,8 +894,7 @@ static int pm8001_configure_phy_settings(struct pm8001_hba_info *pm8001_ha)
 #ifdef PM8001_USE_MSIX
 /**
  * pm8001_setup_msix - enable MSI-X interrupt
- * @chip_info: our ha struct.
- * @irq_handler: irq_handler
+ * @pm8001_ha: our ha struct.
  */
 static u32 pm8001_setup_msix(struct pm8001_hba_info *pm8001_ha)
 {
@@ -975,7 +975,7 @@ static u32 pm8001_setup_irq(struct pm8001_hba_info *pm8001_ha)
 
 /**
  * pm8001_request_irq - register interrupt
- * @chip_info: our ha struct.
+ * @pm8001_ha: our ha struct.
  */
 static u32 pm8001_request_irq(struct pm8001_hba_info *pm8001_ha)
 {
-- 
2.25.1


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

* [PATCH v2 27/29] scsi: aic94xx: aic94xx_hwi: Repair kerneldoc formatting error and remove extra param
  2020-07-13  7:46 [PATCH v2 00/29] Fix a bunch more SCSI related W=1 warnings Lee Jones
                   ` (25 preceding siblings ...)
  2020-07-13  7:46 ` [PATCH v2 26/29] scsi: pm8001: pm8001_init: Demote obvious misuse of kerneldoc and update others Lee Jones
@ 2020-07-13  7:46 ` Lee Jones
  2020-07-13  7:46 ` [PATCH v2 28/29] scsi: aacraid: aachba: Fix a bunch of function doc formatting errors Lee Jones
                   ` (2 subsequent siblings)
  29 siblings, 0 replies; 53+ messages in thread
From: Lee Jones @ 2020-07-13  7:46 UTC (permalink / raw)
  To: jejb, martin.petersen; +Cc: linux-kernel, linux-scsi, Lee Jones, Luben Tuikov

Function parameters need to be documented with format '@.*: '.

'to' is not longer asd_start_timers()'s function parameter.

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

 drivers/scsi/aic94xx/aic94xx_hwi.c:589: warning: Function parameter or member 'asd_ha' not described in 'asd_init_ctxmem'
 drivers/scsi/aic94xx/aic94xx_hwi.c:1157: warning: Excess function parameter 'to' description in 'asd_start_scb_timers'

Cc: Luben Tuikov <luben_tuikov@adaptec.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/scsi/aic94xx/aic94xx_hwi.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/scsi/aic94xx/aic94xx_hwi.c b/drivers/scsi/aic94xx/aic94xx_hwi.c
index c5a46c59d4f80..9256ab7b25227 100644
--- a/drivers/scsi/aic94xx/aic94xx_hwi.c
+++ b/drivers/scsi/aic94xx/aic94xx_hwi.c
@@ -575,7 +575,7 @@ static int asd_extend_cmdctx(struct asd_ha_struct *asd_ha)
 
 /**
  * asd_init_ctxmem -- initialize context memory
- * asd_ha: pointer to host adapter structure
+ * @asd_ha: pointer to host adapter structure
  *
  * This function sets the maximum number of SCBs and
  * DDBs which can be used by the sequencer.  This is normally
@@ -1146,7 +1146,6 @@ static void asd_swap_head_scb(struct asd_ha_struct *asd_ha,
 /**
  * asd_start_timers -- (add and) start timers of SCBs
  * @list: pointer to struct list_head of the scbs
- * @to: timeout in jiffies
  *
  * If an SCB in the @list has no timer function, assign the default
  * one,  then start the timer of the SCB.  This function is
-- 
2.25.1


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

* [PATCH v2 28/29] scsi: aacraid: aachba: Fix a bunch of function doc formatting errors
  2020-07-13  7:46 [PATCH v2 00/29] Fix a bunch more SCSI related W=1 warnings Lee Jones
                   ` (26 preceding siblings ...)
  2020-07-13  7:46 ` [PATCH v2 27/29] scsi: aic94xx: aic94xx_hwi: Repair kerneldoc formatting error and remove extra param Lee Jones
@ 2020-07-13  7:46 ` Lee Jones
  2020-07-13  7:46 ` [PATCH v2 29/29] scsi: qla4xxx: ql4_init: Provide a missing function param description and fix formatting Lee Jones
  2020-07-15 22:14 ` [PATCH v2 00/29] Fix a bunch more SCSI related W=1 warnings Martin K. Petersen
  29 siblings, 0 replies; 53+ messages in thread
From: Lee Jones @ 2020-07-13  7:46 UTC (permalink / raw)
  To: jejb, martin.petersen
  Cc: linux-kernel, linux-scsi, Lee Jones, Adaptec OEM Raid Solutions,
	PMC-Sierra, Inc

And a few missing/excessive parameter descriptions.

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

 drivers/scsi/aacraid/aachba.c:358: warning: Function parameter or member 'dev' not described in 'aac_get_config_status'
 drivers/scsi/aacraid/aachba.c:358: warning: Function parameter or member 'commit_flag' not described in 'aac_get_config_status'
 drivers/scsi/aacraid/aachba.c:358: warning: Excess function parameter 'common' description in 'aac_get_config_status'
 drivers/scsi/aacraid/aachba.c:450: warning: Function parameter or member 'dev' not described in 'aac_get_containers'
 drivers/scsi/aacraid/aachba.c:450: warning: Excess function parameter 'common' description in 'aac_get_containers'
 drivers/scsi/aacraid/aachba.c:568: warning: Function parameter or member 'scsicmd' not described in 'aac_get_container_name'
 drivers/scsi/aacraid/aachba.c:796: warning: Function parameter or member 'scsicmd' not described in 'aac_probe_container_callback1'
 drivers/scsi/aacraid/aachba.c:796: warning: Excess function parameter 'dev' description in 'aac_probe_container_callback1'
 drivers/scsi/aacraid/aachba.c:796: warning: Excess function parameter 'cid' description in 'aac_probe_container_callback1'
 drivers/scsi/aacraid/aachba.c:1105: warning: Function parameter or member 'scsicmd' not described in 'aac_get_container_serial'
 drivers/scsi/aacraid/aachba.c:1961: warning: Excess function parameter 'phys_luns' description in 'aac_set_safw_attr_all_targets'
 drivers/scsi/aacraid/aachba.c:1961: warning: Excess function parameter 'rescan' description in 'aac_set_safw_attr_all_targets'
 drivers/scsi/aacraid/aachba.c:3394: warning: Cannot understand  *
 on line 3394 - I thought it was a doc line
 drivers/scsi/aacraid/aachba.c:3687: warning: Cannot understand  *
 on line 3687 - I thought it was a doc line
 drivers/scsi/aacraid/aachba.c:3752: warning: Cannot understand  *
 on line 3752 - I thought it was a doc line
 drivers/scsi/aacraid/aachba.c:3795: warning: Cannot understand  *
 on line 3795 - I thought it was a doc line

Cc: Adaptec OEM Raid Solutions <aacraid@microsemi.com>
Cc: "PMC-Sierra, Inc" <aacraid@pmc-sierra.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/scsi/aacraid/aachba.c | 17 +++--------------
 1 file changed, 3 insertions(+), 14 deletions(-)

diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c
index 2b868f8db8ffe..7ae1e545a255c 100644
--- a/drivers/scsi/aacraid/aachba.c
+++ b/drivers/scsi/aacraid/aachba.c
@@ -561,7 +561,7 @@ static void get_container_name_callback(void *context, struct fib * fibptr)
 	scsicmd->scsi_done(scsicmd);
 }
 
-/**
+/*
  *	aac_get_container_name	-	get container name, none blocking.
  */
 static int aac_get_container_name(struct scsi_cmnd * scsicmd)
@@ -786,8 +786,7 @@ static int _aac_probe_container(struct scsi_cmnd * scsicmd, int (*callback)(stru
 
 /**
  *	aac_probe_container		-	query a logical volume
- *	@dev: device to query
- *	@cid: container identifier
+ * @scsicmd: the scsi command block
  *
  *	Queries the controller about the given volume. The volume information
  *	is updated in the struct fsa_dev_info structure rather than returned.
@@ -1098,7 +1097,7 @@ static void get_container_serial_callback(void *context, struct fib * fibptr)
 	scsicmd->scsi_done(scsicmd);
 }
 
-/**
+/*
  *	aac_get_container_serial - get container serial, none blocking.
  */
 static int aac_get_container_serial(struct scsi_cmnd * scsicmd)
@@ -1952,8 +1951,6 @@ static int aac_get_safw_attr_all_targets(struct aac_dev *dev)
 /**
  *	aac_set_safw_attr_all_targets-	update current hba map with data from FW
  *	@dev:	aac_dev structure
- *	@phys_luns: FW information from report phys luns
- *	@rescan: Indicates scan type
  *
  *	Update our hba map with the information gathered from the FW
  */
@@ -3391,15 +3388,12 @@ int aac_dev_ioctl(struct aac_dev *dev, unsigned int cmd, void __user *arg)
 }
 
 /**
- *
  * aac_srb_callback
  * @context: the context set in the fib - here it is scsi cmd
  * @fibptr: pointer to the fib
  *
  * Handles the completion of a scsi command to a non dasd device
- *
  */
-
 static void aac_srb_callback(void *context, struct fib * fibptr)
 {
 	struct aac_srb_reply *srbreply;
@@ -3684,13 +3678,11 @@ static void hba_resp_task_failure(struct aac_dev *dev,
 }
 
 /**
- *
  * aac_hba_callback
  * @context: the context set in the fib - here it is scsi cmd
  * @fibptr: pointer to the fib
  *
  * Handles the completion of a native HBA scsi command
- *
  */
 void aac_hba_callback(void *context, struct fib *fibptr)
 {
@@ -3749,14 +3741,12 @@ void aac_hba_callback(void *context, struct fib *fibptr)
 }
 
 /**
- *
  * aac_send_srb_fib
  * @scsicmd: the scsi command block
  *
  * This routine will form a FIB and fill in the aac_srb from the
  * scsicmd passed in.
  */
-
 static int aac_send_srb_fib(struct scsi_cmnd* scsicmd)
 {
 	struct fib* cmd_fibcontext;
@@ -3792,7 +3782,6 @@ static int aac_send_srb_fib(struct scsi_cmnd* scsicmd)
 }
 
 /**
- *
  * aac_send_hba_fib
  * @scsicmd: the scsi command block
  *
-- 
2.25.1


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

* [PATCH v2 29/29] scsi: qla4xxx: ql4_init: Provide a missing function param description and fix formatting
  2020-07-13  7:46 [PATCH v2 00/29] Fix a bunch more SCSI related W=1 warnings Lee Jones
                   ` (27 preceding siblings ...)
  2020-07-13  7:46 ` [PATCH v2 28/29] scsi: aacraid: aachba: Fix a bunch of function doc formatting errors Lee Jones
@ 2020-07-13  7:46 ` Lee Jones
  2020-07-15 22:14 ` [PATCH v2 00/29] Fix a bunch more SCSI related W=1 warnings Martin K. Petersen
  29 siblings, 0 replies; 53+ messages in thread
From: Lee Jones @ 2020-07-13  7:46 UTC (permalink / raw)
  To: jejb, martin.petersen
  Cc: linux-kernel, linux-scsi, Lee Jones, QLogic-Storage-Upstream

Kerneldoc function parameter references need to be in the format '@.*: ',
else the kerneldoc checker gets confused.

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

 drivers/scsi/qla4xxx/ql4_init.c: In function ‘ql4xxx_set_mac_number’:
 drivers/scsi/qla4xxx/ql4_init.c:17:10: warning: variable ‘func_number’ set but not used [-Wunused-but-set-variable]
 drivers/scsi/qla4xxx/ql4_init.c: In function ‘qla4xxx_pci_config’:
 drivers/scsi/qla4xxx/ql4_init.c:664:6: warning: variable ‘status’ set but not used [-Wunused-but-set-variable]
from  drivers/scsi/qla4xxx/ql4_init.c:9:
from  drivers/scsi/qla4xxx/ql4_init.c:9:
 drivers/scsi/qla4xxx/ql4_init.c:953: warning: Function parameter or member 'is_reset' not described in 'qla4xxx_initialize_adapter'
 drivers/scsi/qla4xxx/ql4_init.c:1168: warning: Function parameter or member 'ha' not described in 'qla4xxx_process_ddb_changed'
 drivers/scsi/qla4xxx/ql4_init.c:1168: warning: Function parameter or member 'fw_ddb_index' not described in 'qla4xxx_process_ddb_changed'
 drivers/scsi/qla4xxx/ql4_init.c:1168: warning: Function parameter or member 'state' not described in 'qla4xxx_process_ddb_changed'
 drivers/scsi/qla4xxx/ql4_init.c:1168: warning: Function parameter or member 'conn_err' not described in 'qla4xxx_process_ddb_changed'

Cc: QLogic-Storage-Upstream@qlogic.com
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/scsi/qla4xxx/ql4_init.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/scsi/qla4xxx/ql4_init.c b/drivers/scsi/qla4xxx/ql4_init.c
index 2bf5e3e639e1a..5963127f7d2ef 100644
--- a/drivers/scsi/qla4xxx/ql4_init.c
+++ b/drivers/scsi/qla4xxx/ql4_init.c
@@ -945,6 +945,7 @@ void qla4xxx_free_ddb_index(struct scsi_qla_host *ha)
 /**
  * qla4xxx_initialize_adapter - initiailizes hba
  * @ha: Pointer to host adapter structure.
+ * @is_reset: Is this init path or reset path
  *
  * This routine parforms all of the steps necessary to initialize the adapter.
  *
@@ -1156,9 +1157,9 @@ int qla4xxx_flash_ddb_change(struct scsi_qla_host *ha, uint32_t fw_ddb_index,
 
 /**
  * qla4xxx_process_ddb_changed - process ddb state change
- * @ha - Pointer to host adapter structure.
- * @fw_ddb_index - Firmware's device database index
- * @state - Device state
+ * @ha: Pointer to host adapter structure.
+ * @fw_ddb_index: Firmware's device database index
+ * @state: Device state
  *
  * This routine processes a Decive Database Changed AEN Event.
  **/
-- 
2.25.1


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

* Re: [PATCH v2 01/29] scsi: libfc: fc_exch: Supply some missing kerneldoc struct/function attributes/params
  2020-07-13  7:46 ` [PATCH v2 01/29] scsi: libfc: fc_exch: Supply some missing kerneldoc struct/function attributes/params Lee Jones
@ 2020-07-14  6:47   ` Hannes Reinecke
  0 siblings, 0 replies; 53+ messages in thread
From: Hannes Reinecke @ 2020-07-14  6:47 UTC (permalink / raw)
  To: Lee Jones, jejb, martin.petersen; +Cc: linux-kernel, linux-scsi

On 7/13/20 9:46 AM, Lee Jones wrote:
> Fixes the following W=1 kernel build warning(s):
> 
>   drivers/scsi/libfc/fc_exch.c:66: warning: Function parameter or member 'left' not described in 'fc_exch_pool'
>   drivers/scsi/libfc/fc_exch.c:66: warning: Function parameter or member 'right' not described in 'fc_exch_pool'
>   drivers/scsi/libfc/fc_exch.c:100: warning: Function parameter or member 'lport' not described in 'fc_exch_mgr'
>   drivers/scsi/libfc/fc_exch.c:727: warning: Function parameter or member 'ep' not described in 'fc_invoke_resp'
>   drivers/scsi/libfc/fc_exch.c:727: warning: Function parameter or member 'sp' not described in 'fc_invoke_resp'
>   drivers/scsi/libfc/fc_exch.c:727: warning: Function parameter or member 'fp' not described in 'fc_invoke_resp'
> 
> Cc: Hannes Reinecke <hare@suse.de>
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
>   drivers/scsi/libfc/fc_exch.c | 7 ++++++-
>   1 file changed, 6 insertions(+), 1 deletion(-)
> 
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] 53+ messages in thread

* Re: [PATCH v2 02/29] include: scsi: scsi_transport_fc: Match HBA Attribute Length with HBAAPI V2.0 definitions
  2020-07-13  7:46 ` [PATCH v2 02/29] include: scsi: scsi_transport_fc: Match HBA Attribute Length with HBAAPI V2.0 definitions Lee Jones
@ 2020-07-14  6:49   ` Hannes Reinecke
  0 siblings, 0 replies; 53+ messages in thread
From: Hannes Reinecke @ 2020-07-14  6:49 UTC (permalink / raw)
  To: Lee Jones, jejb, martin.petersen; +Cc: linux-kernel, linux-scsi

On 7/13/20 9:46 AM, Lee Jones wrote:
> According to 'include/scsi/scsi_transport_fc.h':
> 
>   "Attributes are based on HBAAPI V2.0 definitions"
> 
> ... so it seems sane to match the 'HBA Attribute Length' to them.
> 
> If we don't, the compiler complains that the copied data will be truncated.
> 
> Fixes the following W=1 kernel build warning(s):
> 
>   In file included from include/linux/bitmap.h:9,
>   from include/linux/cpumask.h:12,
>   from include/linux/smp.h:13,
>   from include/linux/percpu.h:7,
>   from include/scsi/libfc.h:13,
>   from drivers/scsi/libfc/fc_elsct.c:17:
>   In function ‘strncpy’,
>   inlined from ‘fc_ct_ms_fill.constprop’ at include/scsi/fc_encode.h:263:3:
>   include/linux/string.h:297:30: warning: ‘__builtin_strncpy’ output may be truncated copying 64 bytes from a string of length  79 [-Wstringop-truncation]
>   297 | #define __underlying_strncpy __builtin_strncpy
>   | ^
>   include/linux/string.h:307:9: note: in expansion of macro ‘__underlying_strncpy’
>   307 | return __underlying_strncpy(p, q, size);
>   | ^~~~~~~~~~~~~~~~~~~~
>   In function ‘strncpy’,
>   inlined from ‘fc_ct_ms_fill.constprop’ at include/scsi/fc_encode.h:275:3:
>   include/linux/string.h:297:30: warning: ‘__builtin_strncpy’ output may be truncated copying 64 bytes from a string of length 79 [-Wstringop-truncation]
>   297 | #define __underlying_strncpy __builtin_strncpy
>   | ^
>   include/linux/string.h:307:9: note: in expansion of macro ‘__underlying_strncpy’
>   307 | return __underlying_strncpy(p, q, size);
>   | ^~~~~~~~~~~~~~~~~~~~
> 
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
>   include/scsi/fc/fc_ms.h | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/include/scsi/fc/fc_ms.h b/include/scsi/fc/fc_ms.h
> index 800d53dc94705..9e273fed0a85f 100644
> --- a/include/scsi/fc/fc_ms.h
> +++ b/include/scsi/fc/fc_ms.h
> @@ -63,8 +63,8 @@ enum fc_fdmi_hba_attr_type {
>    * HBA Attribute Length
>    */
>   #define FC_FDMI_HBA_ATTR_NODENAME_LEN		8
> -#define FC_FDMI_HBA_ATTR_MANUFACTURER_LEN	64
> -#define FC_FDMI_HBA_ATTR_SERIALNUMBER_LEN	64
> +#define FC_FDMI_HBA_ATTR_MANUFACTURER_LEN	80
> +#define FC_FDMI_HBA_ATTR_SERIALNUMBER_LEN	80
>   #define FC_FDMI_HBA_ATTR_MODEL_LEN		256
>   #define FC_FDMI_HBA_ATTR_MODELDESCR_LEN		256
>   #define FC_FDMI_HBA_ATTR_HARDWAREVERSION_LEN	256
> 
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] 53+ messages in thread

* Re: [PATCH v2 03/29] scsi: libfc: fc_disc: trivial: Fix spelling mistake of 'discovery'
  2020-07-13  7:46 ` [PATCH v2 03/29] scsi: libfc: fc_disc: trivial: Fix spelling mistake of 'discovery' Lee Jones
@ 2020-07-14  6:50   ` Hannes Reinecke
  0 siblings, 0 replies; 53+ messages in thread
From: Hannes Reinecke @ 2020-07-14  6:50 UTC (permalink / raw)
  To: Lee Jones, jejb, martin.petersen
  Cc: linux-kernel, linux-scsi, Johannes Thumshirn

On 7/13/20 9:46 AM, Lee Jones wrote:
> This is my fault (can't even blame copy/paste).
> 
> Cc: Hannes Reinecke <hare@suse.de>
> Reported-by: Johannes Thumshirn <Johannes.Thumshirn@wdc.com>
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
>   drivers/scsi/libfc/fc_disc.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/scsi/libfc/fc_disc.c b/drivers/scsi/libfc/fc_disc.c
> index 428f40cfd1c36..19721db232839 100644
> --- a/drivers/scsi/libfc/fc_disc.c
> +++ b/drivers/scsi/libfc/fc_disc.c
> @@ -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.
> - * @disc:  The descovery context
> + * @disc:  The discovery context
>    * @buf:   The GPN_FT response buffer
>    * @len:   The size of response buffer
>    *
> 
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] 53+ messages in thread

* Re: [PATCH v2 04/29] scsi: fcoe: fcoe: Fix various kernel-doc infringements
  2020-07-13  7:46 ` [PATCH v2 04/29] scsi: fcoe: fcoe: Fix various kernel-doc infringements Lee Jones
@ 2020-07-14  6:58   ` Hannes Reinecke
  2020-07-14  7:58     ` Lee Jones
  0 siblings, 1 reply; 53+ messages in thread
From: Hannes Reinecke @ 2020-07-14  6:58 UTC (permalink / raw)
  To: Lee Jones, jejb, martin.petersen; +Cc: linux-kernel, linux-scsi

On 7/13/20 9:46 AM, Lee Jones wrote:
> A couple of headers make no attempt to document their associated function
> parameters.  Others looks as if they are suffering with a little bitrot.
> 
> Fixes the following W=1 kernel build warning(s):
> 
>   drivers/scsi/fcoe/fcoe.c:654: warning: Function parameter or member 'lport' not described in 'fcoe_netdev_features_change'
>   drivers/scsi/fcoe/fcoe.c:654: warning: Function parameter or member 'netdev' not described in 'fcoe_netdev_features_change'
>   drivers/scsi/fcoe/fcoe.c:2039: warning: Function parameter or member 'ctlr_dev' not described in 'fcoe_ctlr_mode'
>   drivers/scsi/fcoe/fcoe.c:2039: warning: Excess function parameter 'cdev' description in 'fcoe_ctlr_mode'
>   drivers/scsi/fcoe/fcoe.c:2144: warning: Function parameter or member 'fcoe' not described in 'fcoe_dcb_create'
>   drivers/scsi/fcoe/fcoe.c:2144: warning: Excess function parameter 'netdev' description in 'fcoe_dcb_create'
>   drivers/scsi/fcoe/fcoe.c:2144: warning: Excess function parameter 'port' description in 'fcoe_dcb_create'
>   drivers/scsi/fcoe/fcoe.c:2627: warning: Function parameter or member 'lport' not described in 'fcoe_elsct_send'
>   drivers/scsi/fcoe/fcoe.c:2627: warning: Function parameter or member 'did' not described in 'fcoe_elsct_send'
>   drivers/scsi/fcoe/fcoe.c:2627: warning: Function parameter or member 'fp' not described in 'fcoe_elsct_send'
>   drivers/scsi/fcoe/fcoe.c:2627: warning: Function parameter or member 'op' not described in 'fcoe_elsct_send'
>   drivers/scsi/fcoe/fcoe.c:2627: warning: Function parameter or member 'resp' not described in 'fcoe_elsct_send'
>   drivers/scsi/fcoe/fcoe.c:2627: warning: Function parameter or member 'arg' not described in 'fcoe_elsct_send'
>   drivers/scsi/fcoe/fcoe.c:2627: warning: Function parameter or member 'timeout' not described in 'fcoe_elsct_send'
> 
> Cc: Hannes Reinecke <hare@suse.de>
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
>   drivers/scsi/fcoe/fcoe.c | 10 ++++------
>   1 file changed, 4 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c
> index cb41d166e0c0f..0f9274960dc6b 100644
> --- a/drivers/scsi/fcoe/fcoe.c
> +++ b/drivers/scsi/fcoe/fcoe.c
> @@ -645,7 +645,7 @@ static int fcoe_lport_config(struct fc_lport *lport)
>   	return 0;
>   }
>   
> -/**
> +/*
>    * fcoe_netdev_features_change - Updates the lport's offload flags based
>    * on the LLD netdev's FCoE feature flags
>    */
> @@ -2029,7 +2029,7 @@ static int fcoe_ctlr_enabled(struct fcoe_ctlr_device *cdev)
>   
>   /**
>    * fcoe_ctlr_mode() - Switch FIP mode
> - * @cdev: The FCoE Controller that is being modified
> + * @ctlr_dev: The FCoE Controller that is being modified
>    *
>    * When the FIP mode has been changed we need to update
>    * the multicast addresses to ensure we get the correct
> @@ -2136,9 +2136,7 @@ static bool fcoe_match(struct net_device *netdev)
>   
>   /**
>    * fcoe_dcb_create() - Initialize DCB attributes and hooks
> - * @netdev: The net_device object of the L2 link that should be queried
> - * @port: The fcoe_port to bind FCoE APP priority with
> - * @
> + * @fcoe:   The new FCoE interface
>    */
>   static void fcoe_dcb_create(struct fcoe_interface *fcoe)
>   {
> @@ -2609,7 +2607,7 @@ static void fcoe_logo_resp(struct fc_seq *seq, struct fc_frame *fp, void *arg)
>   	fc_lport_logo_resp(seq, fp, lport);
>   }
>   
> -/**
> +/*
>    * fcoe_elsct_send - FCoE specific ELS handler
>    *
>    * This does special case handling of FIP encapsualted ELS exchanges for FCoE,
> 
I'd rather convert this and the fcoe_netdev_features_change to proper 
kerneldocs:

diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c
index cb41d166e0c0..151fe4c53b07 100644
--- a/drivers/scsi/fcoe/fcoe.c
+++ b/drivers/scsi/fcoe/fcoe.c
@@ -646,8 +646,12 @@ static int fcoe_lport_config(struct fc_lport *lport)
  }

  /**
- * fcoe_netdev_features_change - Updates the lport's offload flags based
- * on the LLD netdev's FCoE feature flags
+ * fcoe_netdev_features_change - Updates the lport's offload flags
+ * @lport:  The local port that is associated with the net device
+ * @netdev: The associated net device
+ *
+ * Update the @lport offload flags based on the FCoE feature flags
+ * from the LLD @netdev.
   */
  static void fcoe_netdev_features_change(struct fc_lport *lport,
                                         struct net_device *netdev)
@@ -2611,6 +2615,13 @@ static void fcoe_logo_resp(struct fc_seq *seq, 
struct fc_frame *fp, void *arg)

  /**
   * fcoe_elsct_send - FCoE specific ELS handler
+ * @lport: Local port
+ * @did: Destination ID
+ * @fp: FCoE frame
+ * @op: ELS operation
+ * @resp: Response callback
+ * @arg: Argument for the response callback
+ * @timeout: Timeout for the ELS response
   *
   * This does special case handling of FIP encapsualted ELS exchanges 
for FCoE,
   * using FCoE specific response handlers and passing the FIP controller as


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 related	[flat|nested] 53+ messages in thread

* Re: [PATCH v2 05/29] scsi: fcoe: fcoe_ctlr: Fix a myriad of documentation issues
  2020-07-13  7:46 ` [PATCH v2 05/29] scsi: fcoe: fcoe_ctlr: Fix a myriad of documentation issues Lee Jones
@ 2020-07-14  7:00   ` Hannes Reinecke
  2020-07-14  7:53     ` Lee Jones
  2020-07-14 14:08   ` Martin K. Petersen
  2020-07-14 15:07   ` [PATCH v2.1 " Lee Jones
  2 siblings, 1 reply; 53+ messages in thread
From: Hannes Reinecke @ 2020-07-14  7:00 UTC (permalink / raw)
  To: Lee Jones, jejb, martin.petersen; +Cc: linux-kernel, linux-scsi

On 7/13/20 9:46 AM, Lee Jones wrote:
> Mostly missing or incorrect (bitrotted) function parameters.
> 
> Fixes the following W=1 kernel build warning(s):
> 
>   drivers/scsi/fcoe/fcoe_ctlr.c:139: warning: Function parameter or member 'mode' not described in 'fcoe_ctlr_init'
>   drivers/scsi/fcoe/fcoe_ctlr.c:604: warning: Function parameter or member 'lport' not described in 'fcoe_ctlr_encaps'
>   drivers/scsi/fcoe/fcoe_ctlr.c:1312: warning: Function parameter or member 'skb' not described in 'fcoe_ctlr_recv_clr_vlink'
>   drivers/scsi/fcoe/fcoe_ctlr.c:1312: warning: Excess function parameter 'fh' description in 'fcoe_ctlr_recv_clr_vlink'
>   drivers/scsi/fcoe/fcoe_ctlr.c:1781: warning: Function parameter or member 't' not described in 'fcoe_ctlr_timeout'
>   drivers/scsi/fcoe/fcoe_ctlr.c:1781: warning: Excess function parameter 'arg' description in 'fcoe_ctlr_timeout'
>   drivers/scsi/fcoe/fcoe_ctlr.c:1904: warning: Function parameter or member 'lport' not described in 'fcoe_ctlr_recv_flogi'
>   drivers/scsi/fcoe/fcoe_ctlr.c:2166: warning: Function parameter or member 'lport' not described in 'fcoe_ctlr_disc_stop_locked'
>   drivers/scsi/fcoe/fcoe_ctlr.c:2166: warning: Excess function parameter 'fip' description in 'fcoe_ctlr_disc_stop_locked'
>   drivers/scsi/fcoe/fcoe_ctlr.c:2188: warning: Function parameter or member 'lport' not described in 'fcoe_ctlr_disc_stop'
>   drivers/scsi/fcoe/fcoe_ctlr.c:2188: warning: Excess function parameter 'fip' description in 'fcoe_ctlr_disc_stop'
>   drivers/scsi/fcoe/fcoe_ctlr.c:2204: warning: Function parameter or member 'lport' not described in 'fcoe_ctlr_disc_stop_final'
>   drivers/scsi/fcoe/fcoe_ctlr.c:2204: warning: Excess function parameter 'fip' description in 'fcoe_ctlr_disc_stop_final'
>   drivers/scsi/fcoe/fcoe_ctlr.c:2273: warning: Function parameter or member 'frport' not described in 'fcoe_ctlr_vn_parse'
>   drivers/scsi/fcoe/fcoe_ctlr.c:2273: warning: Excess function parameter 'rdata' description in 'fcoe_ctlr_vn_parse'
>   drivers/scsi/fcoe/fcoe_ctlr.c:2804: warning: Function parameter or member 'frport' not described in 'fcoe_ctlr_vlan_parse'
>   drivers/scsi/fcoe/fcoe_ctlr.c:2804: warning: Excess function parameter 'rdata' description in 'fcoe_ctlr_vlan_parse'
>   drivers/scsi/fcoe/fcoe_ctlr.c:2900: warning: Excess function parameter 'min_len' description in 'fcoe_ctlr_vlan_send'
>   drivers/scsi/fcoe/fcoe_ctlr.c:2977: warning: Function parameter or member 'fip' not described in 'fcoe_ctlr_vlan_recv'
>   drivers/scsi/fcoe/fcoe_ctlr.c:2977: warning: Function parameter or member 'skb' not described in 'fcoe_ctlr_vlan_recv'
>   drivers/scsi/fcoe/fcoe_ctlr.c:2977: warning: Excess function parameter 'lport' description in 'fcoe_ctlr_vlan_recv'
>   drivers/scsi/fcoe/fcoe_ctlr.c:2977: warning: Excess function parameter 'fp' description in 'fcoe_ctlr_vlan_recv'
>   drivers/scsi/fcoe/fcoe_ctlr.c:3033: warning: Function parameter or member 'callback' not described in 'fcoe_ctlr_disc_start'
>   drivers/scsi/fcoe/fcoe_ctlr.c:3033: warning: Function parameter or member 'lport' not described in 'fcoe_ctlr_disc_start'
>   drivers/scsi/fcoe/fcoe_ctlr.c:3033: warning: Excess function parameter 'fip' description in 'fcoe_ctlr_disc_start'
> 
> Cc: Hannes Reinecke <hare@suse.de>
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
>   drivers/scsi/fcoe/fcoe_ctlr.c | 26 +++++++++++++-------------
>   1 file changed, 13 insertions(+), 13 deletions(-)
> 
> diff --git a/drivers/scsi/fcoe/fcoe_ctlr.c b/drivers/scsi/fcoe/fcoe_ctlr.c
> index 1791a393795da..99242f9856708 100644
> --- a/drivers/scsi/fcoe/fcoe_ctlr.c
> +++ b/drivers/scsi/fcoe/fcoe_ctlr.c
> @@ -134,6 +134,7 @@ static void fcoe_ctlr_map_dest(struct fcoe_ctlr *fip)
>   /**
>    * fcoe_ctlr_init() - Initialize the FCoE Controller instance
>    * @fip: The FCoE controller to initialize
> + * @mode: FIP mode to set
>    */
>   void fcoe_ctlr_init(struct fcoe_ctlr *fip, enum fip_mode mode)
>   {
> @@ -587,6 +588,7 @@ static void fcoe_ctlr_send_keep_alive(struct fcoe_ctlr *fip,
>   /**
>    * fcoe_ctlr_encaps() - Encapsulate an ELS frame for FIP, without sending it
>    * @fip:   The FCoE controller for the ELS frame
> + * @lport: The local port
>    * @dtype: The FIP descriptor type for the frame
>    * @skb:   The FCoE ELS frame including FC header but no FCoE headers
>    * @d_id:  The destination port ID.
> @@ -1302,7 +1304,7 @@ static void fcoe_ctlr_recv_els(struct fcoe_ctlr *fip, struct sk_buff *skb)
>   /**
>    * fcoe_ctlr_recv_els() - Handle an incoming link reset frame
>    * @fip: The FCoE controller that received the frame
> - * @fh:	 The received FIP header
> + * @skb: The received FIP packet
>    *
>    * There may be multiple VN_Port descriptors.
>    * The overall length has already been checked.
> @@ -1775,7 +1777,7 @@ static void fcoe_ctlr_flogi_send(struct fcoe_ctlr *fip)
>   
>   /**
>    * fcoe_ctlr_timeout() - FIP timeout handler
> - * @arg: The FCoE controller that timed out
> + * @t: Timer context use to obtain the controller reference
>    */
>   static void fcoe_ctlr_timeout(struct timer_list *t)
>   {
> @@ -1887,6 +1889,7 @@ static void fcoe_ctlr_recv_work(struct work_struct *recv_work)
>   /**
>    * fcoe_ctlr_recv_flogi() - Snoop pre-FIP receipt of FLOGI response
>    * @fip: The FCoE controller
> + * @lport: The local port
>    * @fp:	 The FC frame to snoop
>    *
>    * Snoop potential response to FLOGI or even incoming FLOGI.
> @@ -2158,7 +2161,7 @@ static struct fc_rport_operations fcoe_ctlr_vn_rport_ops = {
>   
>   /**
>    * fcoe_ctlr_disc_stop_locked() - stop discovery in VN2VN mode
> - * @fip: The FCoE controller
> + * @lport: The local port
>    *
>    * Called with ctlr_mutex held.
>    */
> @@ -2179,7 +2182,7 @@ static void fcoe_ctlr_disc_stop_locked(struct fc_lport *lport)
>   
>   /**
>    * fcoe_ctlr_disc_stop() - stop discovery in VN2VN mode
> - * @fip: The FCoE controller
> + * @lport: The local port
>    *
>    * Called through the local port template for discovery.
>    * Called without the ctlr_mutex held.
> @@ -2195,7 +2198,7 @@ static void fcoe_ctlr_disc_stop(struct fc_lport *lport)
>   
>   /**
>    * fcoe_ctlr_disc_stop_final() - stop discovery for shutdown in VN2VN mode
> - * @fip: The FCoE controller
> + * @lport: The local port
>    *
>    * Called through the local port template for discovery.
>    * Called without the ctlr_mutex held.
> @@ -2262,7 +2265,7 @@ static void fcoe_ctlr_vn_start(struct fcoe_ctlr *fip)
>    * fcoe_ctlr_vn_parse - parse probe request or response
>    * @fip: The FCoE controller
>    * @skb: incoming packet
> - * @rdata: buffer for resulting parsed VN entry plus fcoe_rport
> + * @frport: parsed FCoE rport from the probe request
>    *
>    * Returns non-zero error number on error.
>    * Does not consume the packet.
> @@ -2793,7 +2796,7 @@ static int fcoe_ctlr_vn_recv(struct fcoe_ctlr *fip, struct sk_buff *skb)
>    * fcoe_ctlr_vlan_parse - parse vlan discovery request or response
>    * @fip: The FCoE controller
>    * @skb: incoming packet
> - * @rdata: buffer for resulting parsed VLAN entry plus fcoe_rport
> + * @frport: parsed FCoE rport from the probe request
>    *
>    * Returns non-zero error number on error.
>    * Does not consume the packet.
> @@ -2892,7 +2895,6 @@ static int fcoe_ctlr_vlan_parse(struct fcoe_ctlr *fip,
>    * @fip: The FCoE controller
>    * @sub: sub-opcode for vlan notification or vn2vn vlan notification
>    * @dest: The destination Ethernet MAC address
> - * @min_len: minimum size of the Ethernet payload to be sent
>    */
>   static void fcoe_ctlr_vlan_send(struct fcoe_ctlr *fip,
>   			      enum fip_vlan_subcode sub,
> @@ -2969,9 +2971,8 @@ static void fcoe_ctlr_vlan_disc_reply(struct fcoe_ctlr *fip,
>   
>   /**
>    * fcoe_ctlr_vlan_recv - vlan request receive handler for VN2VN mode.
> - * @lport: The local port
> - * @fp: The received frame
> - *
> + * @fip: The FCoE controller
> + * @skb: The received FIP packet
>    */
>   static int fcoe_ctlr_vlan_recv(struct fcoe_ctlr *fip, struct sk_buff *skb)
>   {
> @@ -3015,9 +3016,8 @@ static void fcoe_ctlr_disc_recv(struct fc_lport *lport, struct fc_frame *fp)
>   	fc_frame_free(fp);
>   }
>   
> -/**
> +/*
>    * fcoe_ctlr_disc_recv - start discovery for VN2VN mode.
> - * @fip: The FCoE controller
>    *
>    * This sets a flag indicating that remote ports should be created
>    * and started for the peers we discover.  We use the disc_callback
> 
Please, this should continue to be a kernel-doc comment; my copy still 
has this header:

/**
  * fcoe_ctlr_disc_recv - discovery receive handler for VN2VN mode.
  * @lport: The local port
  * @fp: The received frame
  *

What happened to it?

Cheers,

Hannes

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

* Re: [PATCH v2 06/29] scsi: fcoe: fcoe_transport: Correct some kernel-doc issues
  2020-07-13  7:46 ` [PATCH v2 06/29] scsi: fcoe: fcoe_transport: Correct some kernel-doc issues Lee Jones
@ 2020-07-14  7:01   ` Hannes Reinecke
  0 siblings, 0 replies; 53+ messages in thread
From: Hannes Reinecke @ 2020-07-14  7:01 UTC (permalink / raw)
  To: Lee Jones, jejb, martin.petersen; +Cc: linux-kernel, linux-scsi

On 7/13/20 9:46 AM, Lee Jones wrote:
> Mainly due to misdocumentation or bitrotted descriptions.
> 
> Fixes the following W=1 kernel build warning(s):
> 
>   drivers/scsi/fcoe/fcoe_transport.c:396: warning: Function parameter or member 'skb' not described in 'fcoe_check_wait_queue'
>   drivers/scsi/fcoe/fcoe_transport.c:447: warning: Function parameter or member 't' not described in 'fcoe_queue_timer'
>   drivers/scsi/fcoe/fcoe_transport.c:447: warning: Excess function parameter 'lport' description in 'fcoe_queue_timer'
>   drivers/scsi/fcoe/fcoe_transport.c:682: warning: Function parameter or member 'netdev' not described in 'fcoe_netdev_map_lookup'
> 
> Cc: Hannes Reinecke <hare@suse.de>
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
>   drivers/scsi/fcoe/fcoe_transport.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/scsi/fcoe/fcoe_transport.c b/drivers/scsi/fcoe/fcoe_transport.c
> index a20ddc301c89e..6e187d0e71fd2 100644
> --- a/drivers/scsi/fcoe/fcoe_transport.c
> +++ b/drivers/scsi/fcoe/fcoe_transport.c
> @@ -382,6 +382,7 @@ EXPORT_SYMBOL_GPL(fcoe_clean_pending_queue);
>   /**
>    * fcoe_check_wait_queue() - Attempt to clear the transmit backlog
>    * @lport: The local port whose backlog is to be cleared
> + * @skb: The received FIP packet
>    *
>    * This empties the wait_queue, dequeues the head of the wait_queue queue
>    * and calls fcoe_start_io() for each packet. If all skb have been
> @@ -439,7 +440,7 @@ EXPORT_SYMBOL_GPL(fcoe_check_wait_queue);
>   
>   /**
>    * fcoe_queue_timer() - The fcoe queue timer
> - * @lport: The local port
> + * @t: Timer context use to obtain the FCoE port
>    *
>    * Calls fcoe_check_wait_queue on timeout
>    */
> @@ -672,6 +673,7 @@ static void fcoe_del_netdev_mapping(struct net_device *netdev)
>   /**
>    * fcoe_netdev_map_lookup - find the fcoe transport that matches the netdev on which
>    * it was created
> + * @netdev: The net device that the FCoE interface is on
>    *
>    * Returns : ptr to the fcoe transport that supports this netdev or NULL
>    * if not found.
> 
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] 53+ messages in thread

* Re: [PATCH v2 10/29] scsi: libfc: fc_lport: Repair function parameter documentation
  2020-07-13  7:46 ` [PATCH v2 10/29] scsi: libfc: fc_lport: Repair function parameter documentation Lee Jones
@ 2020-07-14  7:04   ` Hannes Reinecke
  0 siblings, 0 replies; 53+ messages in thread
From: Hannes Reinecke @ 2020-07-14  7:04 UTC (permalink / raw)
  To: Lee Jones, jejb, martin.petersen; +Cc: linux-kernel, linux-scsi

On 7/13/20 9:46 AM, Lee Jones wrote:
> Either misdocumentation and/or bitrot.
> 
> Fixes the following W=1 kernel build warning(s):
> 
>   drivers/scsi/libfc/fc_lport.c:412: warning: Function parameter or member 'in_fp' not described in 'fc_lport_recv_echo_req'
>   drivers/scsi/libfc/fc_lport.c:412: warning: Excess function parameter 'fp' description in 'fc_lport_recv_echo_req'
>   drivers/scsi/libfc/fc_lport.c:447: warning: Function parameter or member 'in_fp' not described in 'fc_lport_recv_rnid_req'
>   drivers/scsi/libfc/fc_lport.c:447: warning: Excess function parameter 'fp' description in 'fc_lport_recv_rnid_req'
>   drivers/scsi/libfc/fc_lport.c:1330: warning: Function parameter or member 'state' not described in 'fc_lport_enter_ns'
>   drivers/scsi/libfc/fc_lport.c:1428: warning: Function parameter or member 'state' not described in 'fc_lport_enter_ms'
>   drivers/scsi/libfc/fc_lport.c:1939: warning: Function parameter or member 'tov' not described in 'fc_lport_els_request'
> 
> Cc: Hannes Reinecke <hare@suse.de>
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
>   drivers/scsi/libfc/fc_lport.c | 7 +++++--
>   1 file changed, 5 insertions(+), 2 deletions(-)
> 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] 53+ messages in thread

* Re: [PATCH v2 11/29] scsi: libfc: fc_rport: Fix a couple of misdocumented function parameters
  2020-07-13  7:46 ` [PATCH v2 11/29] scsi: libfc: fc_rport: Fix a couple of misdocumented function parameters Lee Jones
@ 2020-07-14  7:04   ` Hannes Reinecke
  0 siblings, 0 replies; 53+ messages in thread
From: Hannes Reinecke @ 2020-07-14  7:04 UTC (permalink / raw)
  To: Lee Jones, jejb, martin.petersen; +Cc: linux-kernel, linux-scsi

On 7/13/20 9:46 AM, Lee Jones wrote:
> Fixes the following W=1 kernel build warning(s):
> 
>   drivers/scsi/libfc/fc_rport.c:129: warning: Function parameter or member 'port_id' not described in 'fc_rport_create'
>   drivers/scsi/libfc/fc_rport.c:129: warning: Excess function parameter 'ids' description in 'fc_rport_create'
>   drivers/scsi/libfc/fc_rport.c:1452: warning: Function parameter or member 'rdata_arg' not described in 'fc_rport_logo_resp'
>   drivers/scsi/libfc/fc_rport.c:1452: warning: Excess function parameter 'lport_arg' description in 'fc_rport_logo_resp'
> 
> Cc: Hannes Reinecke <hare@suse.de>
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
>   drivers/scsi/libfc/fc_rport.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/scsi/libfc/fc_rport.c b/drivers/scsi/libfc/fc_rport.c
> index 278d15ff1c5ae..18663a82865f9 100644
> --- a/drivers/scsi/libfc/fc_rport.c
> +++ b/drivers/scsi/libfc/fc_rport.c
> @@ -121,7 +121,7 @@ EXPORT_SYMBOL(fc_rport_lookup);
>   /**
>    * fc_rport_create() - Create a new remote port
>    * @lport: The local port this remote port will be associated with
> - * @ids:   The identifiers for the new remote port
> + * @port_id:   The identifiers for the new remote port
>    *
>    * The remote port will start in the INIT state.
>    */
> @@ -1445,7 +1445,7 @@ static void fc_rport_recv_rtv_req(struct fc_rport_priv *rdata,
>    * fc_rport_logo_resp() - Handler for logout (LOGO) responses
>    * @sp:	       The sequence the LOGO was on
>    * @fp:	       The LOGO response frame
> - * @lport_arg: The local port
> + * @rdata_arg: The remote port
>    */
>   static void fc_rport_logo_resp(struct fc_seq *sp, struct fc_frame *fp,
>   			       void *rdata_arg)
> 
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] 53+ messages in thread

* Re: [PATCH v2 12/29] scsi: libfc: fc_fcp: Provide missing and repair existing function documentation
  2020-07-13  7:46 ` [PATCH v2 12/29] scsi: libfc: fc_fcp: Provide missing and repair existing function documentation Lee Jones
@ 2020-07-14  7:05   ` Hannes Reinecke
  0 siblings, 0 replies; 53+ messages in thread
From: Hannes Reinecke @ 2020-07-14  7:05 UTC (permalink / raw)
  To: Lee Jones, jejb, martin.petersen; +Cc: linux-kernel, linux-scsi

On 7/13/20 9:46 AM, Lee Jones wrote:
> Mostly due to descriptions not keeping up with API changes.
> 
> Fixes the following W=1 kernel build warning(s):
> 
>   drivers/scsi/libfc/fc_fcp.c:299: warning: Function parameter or member 'status_code' not described in 'fc_fcp_retry_cmd'
>   drivers/scsi/libfc/fc_fcp.c:595: warning: Function parameter or member 'seq' not described in 'fc_fcp_send_data'
>   drivers/scsi/libfc/fc_fcp.c:595: warning: Excess function parameter 'sp' description in 'fc_fcp_send_data'
>   drivers/scsi/libfc/fc_fcp.c:1289: warning: Function parameter or member 't' not described in 'fc_lun_reset_send'
>   drivers/scsi/libfc/fc_fcp.c:1289: warning: Excess function parameter 'data' description in 'fc_lun_reset_send'
>   drivers/scsi/libfc/fc_fcp.c:1422: warning: Function parameter or member 't' not described in 'fc_fcp_timeout'
>   drivers/scsi/libfc/fc_fcp.c:1422: warning: Excess function parameter 'data' description in 'fc_fcp_timeout'
>   drivers/scsi/libfc/fc_fcp.c:1696: warning: Function parameter or member 'code' not described in 'fc_fcp_recovery'
>   drivers/scsi/libfc/fc_fcp.c:1716: warning: Function parameter or member 'offset' not described in 'fc_fcp_srr'
>   drivers/scsi/libfc/fc_fcp.c:1859: warning: Function parameter or member 'sc_cmd' not described in 'fc_queuecommand'
>   drivers/scsi/libfc/fc_fcp.c:1859: warning: Excess function parameter 'cmd' description in 'fc_queuecommand'
> 
> Cc: Hannes Reinecke <hare@suse.de>
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
>   drivers/scsi/libfc/fc_fcp.c | 11 +++++++----
>   1 file changed, 7 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/scsi/libfc/fc_fcp.c b/drivers/scsi/libfc/fc_fcp.c
> index bf2cc9656e191..e11d4f002bd49 100644
> --- a/drivers/scsi/libfc/fc_fcp.c
> +++ b/drivers/scsi/libfc/fc_fcp.c
> @@ -289,6 +289,7 @@ static int fc_fcp_send_abort(struct fc_fcp_pkt *fsp)
>   /**
>    * fc_fcp_retry_cmd() - Retry a fcp_pkt
>    * @fsp: The FCP packet to be retried
> + * @status_code: The FCP status code to set
>    *
>    * Sets the status code to be FC_ERROR and then calls
>    * fc_fcp_complete_locked() which in turn calls fc_io_compl().
> @@ -580,7 +581,7 @@ static void fc_fcp_recv_data(struct fc_fcp_pkt *fsp, struct fc_frame *fp)
>   /**
>    * fc_fcp_send_data() - Send SCSI data to a target
>    * @fsp:      The FCP packet the data is on
> - * @sp:	      The sequence the data is to be sent on
> + * @seq:      The sequence the data is to be sent on
>    * @offset:   The starting offset for this data request
>    * @seq_blen: The burst length for this data request
>    *
> @@ -1283,7 +1284,7 @@ static int fc_fcp_pkt_abort(struct fc_fcp_pkt *fsp)
>   
>   /**
>    * fc_lun_reset_send() - Send LUN reset command
> - * @data: The FCP packet that identifies the LUN to be reset
> + * @t: Timer context used to fetch the FSP packet
>    */
>   static void fc_lun_reset_send(struct timer_list *t)
>   {
> @@ -1409,7 +1410,7 @@ static void fc_fcp_cleanup(struct fc_lport *lport)
>   
>   /**
>    * fc_fcp_timeout() - Handler for fcp_pkt timeouts
> - * @data: The FCP packet that has timed out
> + * @t: Timer context used to fetch the FSP packet
>    *
>    * If REC is supported then just issue it and return. The REC exchange will
>    * complete or time out and recovery can continue at that point. Otherwise,
> @@ -1691,6 +1692,7 @@ static void fc_fcp_rec_error(struct fc_fcp_pkt *fsp, struct fc_frame *fp)
>   /**
>    * fc_fcp_recovery() - Handler for fcp_pkt recovery
>    * @fsp: The FCP pkt that needs to be aborted
> + * @code: The FCP status code to set
>    */
>   static void fc_fcp_recovery(struct fc_fcp_pkt *fsp, u8 code)
>   {
> @@ -1709,6 +1711,7 @@ static void fc_fcp_recovery(struct fc_fcp_pkt *fsp, u8 code)
>    * fc_fcp_srr() - Send a SRR request (Sequence Retransmission Request)
>    * @fsp:   The FCP packet the SRR is to be sent on
>    * @r_ctl: The R_CTL field for the SRR request
> + * @offset: The SRR relative offset
>    * This is called after receiving status but insufficient data, or
>    * when expecting status but the request has timed out.
>    */
> @@ -1851,7 +1854,7 @@ static inline int fc_fcp_lport_queue_ready(struct fc_lport *lport)
>   /**
>    * fc_queuecommand() - The queuecommand function of the SCSI template
>    * @shost: The Scsi_Host that the command was issued to
> - * @cmd:   The scsi_cmnd to be executed
> + * @sc_cmd:   The scsi_cmnd to be executed
>    *
>    * This is the i/o strategy routine, called by the SCSI layer.
>    */
> 
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] 53+ messages in thread

* Re: [PATCH v2 19/29] scsi: aic7xxx: aic7xxx_osm: Remove unused variable 'ahc'
  2020-07-13  7:46 ` [PATCH v2 19/29] scsi: aic7xxx: aic7xxx_osm: Remove unused variable 'ahc' Lee Jones
@ 2020-07-14  7:07   ` Hannes Reinecke
  0 siblings, 0 replies; 53+ messages in thread
From: Hannes Reinecke @ 2020-07-14  7:07 UTC (permalink / raw)
  To: Lee Jones, jejb, martin.petersen
  Cc: linux-kernel, linux-scsi, Hannes Reinecke, Daniel M. Eischen,
	Doug Ledford

On 7/13/20 9:46 AM, Lee Jones wrote:
> Looks as though 'ahc' hasn't been used since 2005.
> 
> Fixes the following W=1 kernel build warning(s):
> 
>   drivers/scsi/aic7xxx/aic7xxx_osm.c: In function ‘ahc_linux_slave_configure’:
>   drivers/scsi/aic7xxx/aic7xxx_osm.c:674:20: warning: variable ‘ahc’ set but not used [-Wunused-but-set-variable]
>   674 | struct ahc_softc *ahc;
>   | ^~~
> 
> Cc: Hannes Reinecke <hare@suse.com>
> Cc: "Daniel M. Eischen" <deischen@iworks.InterWorks.org>
> Cc: Doug Ledford <dledford@redhat.com>
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
>   drivers/scsi/aic7xxx/aic7xxx_osm.c | 4 ----
>   1 file changed, 4 deletions(-)
> 
> diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm.c b/drivers/scsi/aic7xxx/aic7xxx_osm.c
> index 32bfe20d79cc1..cc4c7b1781466 100644
> --- a/drivers/scsi/aic7xxx/aic7xxx_osm.c
> +++ b/drivers/scsi/aic7xxx/aic7xxx_osm.c
> @@ -666,10 +666,6 @@ ahc_linux_slave_alloc(struct scsi_device *sdev)
>   static int
>   ahc_linux_slave_configure(struct scsi_device *sdev)
>   {
> -	struct	ahc_softc *ahc;
> -
> -	ahc = *((struct ahc_softc **)sdev->host->hostdata);
> -
>   	if (bootverbose)
>   		sdev_printk(KERN_INFO, sdev, "Slave Configure\n");
>   
> 
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] 53+ messages in thread

* Re: [PATCH v2 20/29] scsi: aic7xxx: aic7xxx_osm: Remove unused variable 'targ'
  2020-07-13  7:46 ` [PATCH v2 20/29] scsi: aic7xxx: aic7xxx_osm: Remove unused variable 'targ' Lee Jones
@ 2020-07-14  7:07   ` Hannes Reinecke
  0 siblings, 0 replies; 53+ messages in thread
From: Hannes Reinecke @ 2020-07-14  7:07 UTC (permalink / raw)
  To: Lee Jones, jejb, martin.petersen
  Cc: linux-kernel, linux-scsi, Hannes Reinecke, Daniel M. Eischen,
	Doug Ledford

On 7/13/20 9:46 AM, Lee Jones wrote:
> Looks like checking the 'targ' was removed in 2005.
> 
> Fixes the following W=1 kernel build warning(s):
> 
>   drivers/scsi/aic7xxx/aic7xxx_osm.c: In function ‘ahc_send_async’:
>   drivers/scsi/aic7xxx/aic7xxx_osm.c:1604:28: warning: variable ‘targ’ set but not used [-Wunused-but-set-variable]
>   1604 | struct ahc_linux_target *targ;
>   | ^~~~
> 
> Cc: Hannes Reinecke <hare@suse.com>
> Cc: "Daniel M. Eischen" <deischen@iworks.InterWorks.org>
> Cc: Doug Ledford <dledford@redhat.com>
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
>   drivers/scsi/aic7xxx/aic7xxx_osm.c | 2 --
>   1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm.c b/drivers/scsi/aic7xxx/aic7xxx_osm.c
> index cc4c7b1781466..ed437c16de881 100644
> --- a/drivers/scsi/aic7xxx/aic7xxx_osm.c
> +++ b/drivers/scsi/aic7xxx/aic7xxx_osm.c
> @@ -1592,7 +1592,6 @@ ahc_send_async(struct ahc_softc *ahc, char channel,
>   	case AC_TRANSFER_NEG:
>   	{
>   		struct	scsi_target *starget;
> -		struct	ahc_linux_target *targ;
>   		struct	ahc_initiator_tinfo *tinfo;
>   		struct	ahc_tmode_tstate *tstate;
>   		int	target_offset;
> @@ -1626,7 +1625,6 @@ ahc_send_async(struct ahc_softc *ahc, char channel,
>   		starget = ahc->platform_data->starget[target_offset];
>   		if (starget == NULL)
>   			break;
> -		targ = scsi_transport_target_data(starget);
>   
>   		target_ppr_options =
>   			(spi_dt(starget) ? MSG_EXT_PPR_DT_REQ : 0)
> 
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] 53+ messages in thread

* Re: [PATCH v2 21/29] scsi: aic7xxx: aic7xxx_osm: Fix 'amount_xferred' set but not used issue
  2020-07-13  7:46 ` [PATCH v2 21/29] scsi: aic7xxx: aic7xxx_osm: Fix 'amount_xferred' set but not used issue Lee Jones
@ 2020-07-14  7:08   ` Hannes Reinecke
  0 siblings, 0 replies; 53+ messages in thread
From: Hannes Reinecke @ 2020-07-14  7:08 UTC (permalink / raw)
  To: Lee Jones, jejb, martin.petersen
  Cc: linux-kernel, linux-scsi, Hannes Reinecke, Daniel M. Eischen,
	Doug Ledford

On 7/13/20 9:46 AM, Lee Jones wrote:
> 'amount_xferred' is used, but only in certain circumstances.  Place
> the same stipulations on the defining/allocating of 'amount_xferred'
> as is placed when using it.
> 
> We've been careful not to change any of the ordering semantics here.
> 
> Fixes the following W=1 kernel build warning(s):
> 
>   drivers/scsi/aic7xxx/aic7xxx_osm.c: In function ‘ahc_done’:
>   drivers/scsi/aic7xxx/aic7xxx_osm.c:1725:12: warning: variable ‘amount_xferred’ set but not used [-Wunused-but-set-variable]
>   1725 | uint32_t amount_xferred;
>   | ^~~~~~~~~~~~~~
> 
> Cc: Hannes Reinecke <hare@suse.com>
> Cc: "Daniel M. Eischen" <deischen@iworks.InterWorks.org>
> Cc: Doug Ledford <dledford@redhat.com>
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
>   drivers/scsi/aic7xxx/aic7xxx_osm.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm.c b/drivers/scsi/aic7xxx/aic7xxx_osm.c
> index ed437c16de881..e7ccb8b80fc19 100644
> --- a/drivers/scsi/aic7xxx/aic7xxx_osm.c
> +++ b/drivers/scsi/aic7xxx/aic7xxx_osm.c
> @@ -1711,10 +1711,12 @@ ahc_done(struct ahc_softc *ahc, struct scb *scb)
>   	 */
>   	cmd->sense_buffer[0] = 0;
>   	if (ahc_get_transaction_status(scb) == CAM_REQ_INPROG) {
> +#ifdef AHC_REPORT_UNDERFLOWS
>   		uint32_t amount_xferred;
>   
>   		amount_xferred =
>   		    ahc_get_transfer_length(scb) - ahc_get_residual(scb);
> +#endif
>   		if ((scb->flags & SCB_TRANSMISSION_ERROR) != 0) {
>   #ifdef AHC_DEBUG
>   			if ((ahc_debug & AHC_SHOW_MISC) != 0) {
> 
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] 53+ messages in thread

* Re: [PATCH v2 05/29] scsi: fcoe: fcoe_ctlr: Fix a myriad of documentation issues
  2020-07-14  7:00   ` Hannes Reinecke
@ 2020-07-14  7:53     ` Lee Jones
  0 siblings, 0 replies; 53+ messages in thread
From: Lee Jones @ 2020-07-14  7:53 UTC (permalink / raw)
  To: Hannes Reinecke; +Cc: jejb, martin.petersen, linux-kernel, linux-scsi

On Tue, 14 Jul 2020, Hannes Reinecke wrote:

> On 7/13/20 9:46 AM, Lee Jones wrote:
> > Mostly missing or incorrect (bitrotted) function parameters.
> > 
> > Fixes the following W=1 kernel build warning(s):
> > 
> >   drivers/scsi/fcoe/fcoe_ctlr.c:139: warning: Function parameter or member 'mode' not described in 'fcoe_ctlr_init'
> >   drivers/scsi/fcoe/fcoe_ctlr.c:604: warning: Function parameter or member 'lport' not described in 'fcoe_ctlr_encaps'
> >   drivers/scsi/fcoe/fcoe_ctlr.c:1312: warning: Function parameter or member 'skb' not described in 'fcoe_ctlr_recv_clr_vlink'
> >   drivers/scsi/fcoe/fcoe_ctlr.c:1312: warning: Excess function parameter 'fh' description in 'fcoe_ctlr_recv_clr_vlink'
> >   drivers/scsi/fcoe/fcoe_ctlr.c:1781: warning: Function parameter or member 't' not described in 'fcoe_ctlr_timeout'
> >   drivers/scsi/fcoe/fcoe_ctlr.c:1781: warning: Excess function parameter 'arg' description in 'fcoe_ctlr_timeout'
> >   drivers/scsi/fcoe/fcoe_ctlr.c:1904: warning: Function parameter or member 'lport' not described in 'fcoe_ctlr_recv_flogi'
> >   drivers/scsi/fcoe/fcoe_ctlr.c:2166: warning: Function parameter or member 'lport' not described in 'fcoe_ctlr_disc_stop_locked'
> >   drivers/scsi/fcoe/fcoe_ctlr.c:2166: warning: Excess function parameter 'fip' description in 'fcoe_ctlr_disc_stop_locked'
> >   drivers/scsi/fcoe/fcoe_ctlr.c:2188: warning: Function parameter or member 'lport' not described in 'fcoe_ctlr_disc_stop'
> >   drivers/scsi/fcoe/fcoe_ctlr.c:2188: warning: Excess function parameter 'fip' description in 'fcoe_ctlr_disc_stop'
> >   drivers/scsi/fcoe/fcoe_ctlr.c:2204: warning: Function parameter or member 'lport' not described in 'fcoe_ctlr_disc_stop_final'
> >   drivers/scsi/fcoe/fcoe_ctlr.c:2204: warning: Excess function parameter 'fip' description in 'fcoe_ctlr_disc_stop_final'
> >   drivers/scsi/fcoe/fcoe_ctlr.c:2273: warning: Function parameter or member 'frport' not described in 'fcoe_ctlr_vn_parse'
> >   drivers/scsi/fcoe/fcoe_ctlr.c:2273: warning: Excess function parameter 'rdata' description in 'fcoe_ctlr_vn_parse'
> >   drivers/scsi/fcoe/fcoe_ctlr.c:2804: warning: Function parameter or member 'frport' not described in 'fcoe_ctlr_vlan_parse'
> >   drivers/scsi/fcoe/fcoe_ctlr.c:2804: warning: Excess function parameter 'rdata' description in 'fcoe_ctlr_vlan_parse'
> >   drivers/scsi/fcoe/fcoe_ctlr.c:2900: warning: Excess function parameter 'min_len' description in 'fcoe_ctlr_vlan_send'
> >   drivers/scsi/fcoe/fcoe_ctlr.c:2977: warning: Function parameter or member 'fip' not described in 'fcoe_ctlr_vlan_recv'
> >   drivers/scsi/fcoe/fcoe_ctlr.c:2977: warning: Function parameter or member 'skb' not described in 'fcoe_ctlr_vlan_recv'
> >   drivers/scsi/fcoe/fcoe_ctlr.c:2977: warning: Excess function parameter 'lport' description in 'fcoe_ctlr_vlan_recv'
> >   drivers/scsi/fcoe/fcoe_ctlr.c:2977: warning: Excess function parameter 'fp' description in 'fcoe_ctlr_vlan_recv'
> >   drivers/scsi/fcoe/fcoe_ctlr.c:3033: warning: Function parameter or member 'callback' not described in 'fcoe_ctlr_disc_start'
> >   drivers/scsi/fcoe/fcoe_ctlr.c:3033: warning: Function parameter or member 'lport' not described in 'fcoe_ctlr_disc_start'
> >   drivers/scsi/fcoe/fcoe_ctlr.c:3033: warning: Excess function parameter 'fip' description in 'fcoe_ctlr_disc_start'
> > 
> > Cc: Hannes Reinecke <hare@suse.de>
> > Signed-off-by: Lee Jones <lee.jones@linaro.org>
> > ---
> >   drivers/scsi/fcoe/fcoe_ctlr.c | 26 +++++++++++++-------------
> >   1 file changed, 13 insertions(+), 13 deletions(-)
> > 
> > diff --git a/drivers/scsi/fcoe/fcoe_ctlr.c b/drivers/scsi/fcoe/fcoe_ctlr.c
> > index 1791a393795da..99242f9856708 100644
> > --- a/drivers/scsi/fcoe/fcoe_ctlr.c
> > +++ b/drivers/scsi/fcoe/fcoe_ctlr.c
> > @@ -134,6 +134,7 @@ static void fcoe_ctlr_map_dest(struct fcoe_ctlr *fip)
> >   /**
> >    * fcoe_ctlr_init() - Initialize the FCoE Controller instance
> >    * @fip: The FCoE controller to initialize
> > + * @mode: FIP mode to set
> >    */
> >   void fcoe_ctlr_init(struct fcoe_ctlr *fip, enum fip_mode mode)
> >   {
> > @@ -587,6 +588,7 @@ static void fcoe_ctlr_send_keep_alive(struct fcoe_ctlr *fip,
> >   /**
> >    * fcoe_ctlr_encaps() - Encapsulate an ELS frame for FIP, without sending it
> >    * @fip:   The FCoE controller for the ELS frame
> > + * @lport: The local port
> >    * @dtype: The FIP descriptor type for the frame
> >    * @skb:   The FCoE ELS frame including FC header but no FCoE headers
> >    * @d_id:  The destination port ID.
> > @@ -1302,7 +1304,7 @@ static void fcoe_ctlr_recv_els(struct fcoe_ctlr *fip, struct sk_buff *skb)
> >   /**
> >    * fcoe_ctlr_recv_els() - Handle an incoming link reset frame
> >    * @fip: The FCoE controller that received the frame
> > - * @fh:	 The received FIP header
> > + * @skb: The received FIP packet
> >    *
> >    * There may be multiple VN_Port descriptors.
> >    * The overall length has already been checked.
> > @@ -1775,7 +1777,7 @@ static void fcoe_ctlr_flogi_send(struct fcoe_ctlr *fip)
> >   /**
> >    * fcoe_ctlr_timeout() - FIP timeout handler
> > - * @arg: The FCoE controller that timed out
> > + * @t: Timer context use to obtain the controller reference
> >    */
> >   static void fcoe_ctlr_timeout(struct timer_list *t)
> >   {
> > @@ -1887,6 +1889,7 @@ static void fcoe_ctlr_recv_work(struct work_struct *recv_work)
> >   /**
> >    * fcoe_ctlr_recv_flogi() - Snoop pre-FIP receipt of FLOGI response
> >    * @fip: The FCoE controller
> > + * @lport: The local port
> >    * @fp:	 The FC frame to snoop
> >    *
> >    * Snoop potential response to FLOGI or even incoming FLOGI.
> > @@ -2158,7 +2161,7 @@ static struct fc_rport_operations fcoe_ctlr_vn_rport_ops = {
> >   /**
> >    * fcoe_ctlr_disc_stop_locked() - stop discovery in VN2VN mode
> > - * @fip: The FCoE controller
> > + * @lport: The local port
> >    *
> >    * Called with ctlr_mutex held.
> >    */
> > @@ -2179,7 +2182,7 @@ static void fcoe_ctlr_disc_stop_locked(struct fc_lport *lport)
> >   /**
> >    * fcoe_ctlr_disc_stop() - stop discovery in VN2VN mode
> > - * @fip: The FCoE controller
> > + * @lport: The local port
> >    *
> >    * Called through the local port template for discovery.
> >    * Called without the ctlr_mutex held.
> > @@ -2195,7 +2198,7 @@ static void fcoe_ctlr_disc_stop(struct fc_lport *lport)
> >   /**
> >    * fcoe_ctlr_disc_stop_final() - stop discovery for shutdown in VN2VN mode
> > - * @fip: The FCoE controller
> > + * @lport: The local port
> >    *
> >    * Called through the local port template for discovery.
> >    * Called without the ctlr_mutex held.
> > @@ -2262,7 +2265,7 @@ static void fcoe_ctlr_vn_start(struct fcoe_ctlr *fip)
> >    * fcoe_ctlr_vn_parse - parse probe request or response
> >    * @fip: The FCoE controller
> >    * @skb: incoming packet
> > - * @rdata: buffer for resulting parsed VN entry plus fcoe_rport
> > + * @frport: parsed FCoE rport from the probe request
> >    *
> >    * Returns non-zero error number on error.
> >    * Does not consume the packet.
> > @@ -2793,7 +2796,7 @@ static int fcoe_ctlr_vn_recv(struct fcoe_ctlr *fip, struct sk_buff *skb)
> >    * fcoe_ctlr_vlan_parse - parse vlan discovery request or response
> >    * @fip: The FCoE controller
> >    * @skb: incoming packet
> > - * @rdata: buffer for resulting parsed VLAN entry plus fcoe_rport
> > + * @frport: parsed FCoE rport from the probe request
> >    *
> >    * Returns non-zero error number on error.
> >    * Does not consume the packet.
> > @@ -2892,7 +2895,6 @@ static int fcoe_ctlr_vlan_parse(struct fcoe_ctlr *fip,
> >    * @fip: The FCoE controller
> >    * @sub: sub-opcode for vlan notification or vn2vn vlan notification
> >    * @dest: The destination Ethernet MAC address
> > - * @min_len: minimum size of the Ethernet payload to be sent
> >    */
> >   static void fcoe_ctlr_vlan_send(struct fcoe_ctlr *fip,
> >   			      enum fip_vlan_subcode sub,
> > @@ -2969,9 +2971,8 @@ static void fcoe_ctlr_vlan_disc_reply(struct fcoe_ctlr *fip,
> >   /**
> >    * fcoe_ctlr_vlan_recv - vlan request receive handler for VN2VN mode.
> > - * @lport: The local port
> > - * @fp: The received frame
> > - *
> > + * @fip: The FCoE controller
> > + * @skb: The received FIP packet
> >    */
> >   static int fcoe_ctlr_vlan_recv(struct fcoe_ctlr *fip, struct sk_buff *skb)
> >   {
> > @@ -3015,9 +3016,8 @@ static void fcoe_ctlr_disc_recv(struct fc_lport *lport, struct fc_frame *fp)
> >   	fc_frame_free(fp);
> >   }
> > -/**
> > +/*
> >    * fcoe_ctlr_disc_recv - start discovery for VN2VN mode.
> > - * @fip: The FCoE controller
> >    *
> >    * This sets a flag indicating that remote ports should be created
> >    * and started for the peers we discover.  We use the disc_callback
> > 
> Please, this should continue to be a kernel-doc comment; my copy still has
> this header:
> 
> /**
>  * fcoe_ctlr_disc_recv - discovery receive handler for VN2VN mode.
>  * @lport: The local port
>  * @fp: The received frame
>  *
> 
> What happened to it?

Look at the function below it (in your local copy). ;)

-- 
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] 53+ messages in thread

* Re: [PATCH v2 04/29] scsi: fcoe: fcoe: Fix various kernel-doc infringements
  2020-07-14  6:58   ` Hannes Reinecke
@ 2020-07-14  7:58     ` Lee Jones
  2020-07-14  8:14       ` Hannes Reinecke
  0 siblings, 1 reply; 53+ messages in thread
From: Lee Jones @ 2020-07-14  7:58 UTC (permalink / raw)
  To: Hannes Reinecke; +Cc: jejb, martin.petersen, linux-kernel, linux-scsi

On Tue, 14 Jul 2020, Hannes Reinecke wrote:

> On 7/13/20 9:46 AM, Lee Jones wrote:
> > A couple of headers make no attempt to document their associated function
> > parameters.  Others looks as if they are suffering with a little bitrot.
> > 
> > Fixes the following W=1 kernel build warning(s):
> > 
> >   drivers/scsi/fcoe/fcoe.c:654: warning: Function parameter or member 'lport' not described in 'fcoe_netdev_features_change'
> >   drivers/scsi/fcoe/fcoe.c:654: warning: Function parameter or member 'netdev' not described in 'fcoe_netdev_features_change'
> >   drivers/scsi/fcoe/fcoe.c:2039: warning: Function parameter or member 'ctlr_dev' not described in 'fcoe_ctlr_mode'
> >   drivers/scsi/fcoe/fcoe.c:2039: warning: Excess function parameter 'cdev' description in 'fcoe_ctlr_mode'
> >   drivers/scsi/fcoe/fcoe.c:2144: warning: Function parameter or member 'fcoe' not described in 'fcoe_dcb_create'
> >   drivers/scsi/fcoe/fcoe.c:2144: warning: Excess function parameter 'netdev' description in 'fcoe_dcb_create'
> >   drivers/scsi/fcoe/fcoe.c:2144: warning: Excess function parameter 'port' description in 'fcoe_dcb_create'
> >   drivers/scsi/fcoe/fcoe.c:2627: warning: Function parameter or member 'lport' not described in 'fcoe_elsct_send'
> >   drivers/scsi/fcoe/fcoe.c:2627: warning: Function parameter or member 'did' not described in 'fcoe_elsct_send'
> >   drivers/scsi/fcoe/fcoe.c:2627: warning: Function parameter or member 'fp' not described in 'fcoe_elsct_send'
> >   drivers/scsi/fcoe/fcoe.c:2627: warning: Function parameter or member 'op' not described in 'fcoe_elsct_send'
> >   drivers/scsi/fcoe/fcoe.c:2627: warning: Function parameter or member 'resp' not described in 'fcoe_elsct_send'
> >   drivers/scsi/fcoe/fcoe.c:2627: warning: Function parameter or member 'arg' not described in 'fcoe_elsct_send'
> >   drivers/scsi/fcoe/fcoe.c:2627: warning: Function parameter or member 'timeout' not described in 'fcoe_elsct_send'
> > 
> > Cc: Hannes Reinecke <hare@suse.de>
> > Signed-off-by: Lee Jones <lee.jones@linaro.org>
> > ---
> >   drivers/scsi/fcoe/fcoe.c | 10 ++++------
> >   1 file changed, 4 insertions(+), 6 deletions(-)
> > 
> > diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c
> > index cb41d166e0c0f..0f9274960dc6b 100644
> > --- a/drivers/scsi/fcoe/fcoe.c
> > +++ b/drivers/scsi/fcoe/fcoe.c
> > @@ -645,7 +645,7 @@ static int fcoe_lport_config(struct fc_lport *lport)
> >   	return 0;
> >   }
> > -/**
> > +/*
> >    * fcoe_netdev_features_change - Updates the lport's offload flags based
> >    * on the LLD netdev's FCoE feature flags
> >    */
> > @@ -2029,7 +2029,7 @@ static int fcoe_ctlr_enabled(struct fcoe_ctlr_device *cdev)
> >   /**
> >    * fcoe_ctlr_mode() - Switch FIP mode
> > - * @cdev: The FCoE Controller that is being modified
> > + * @ctlr_dev: The FCoE Controller that is being modified
> >    *
> >    * When the FIP mode has been changed we need to update
> >    * the multicast addresses to ensure we get the correct
> > @@ -2136,9 +2136,7 @@ static bool fcoe_match(struct net_device *netdev)
> >   /**
> >    * fcoe_dcb_create() - Initialize DCB attributes and hooks
> > - * @netdev: The net_device object of the L2 link that should be queried
> > - * @port: The fcoe_port to bind FCoE APP priority with
> > - * @
> > + * @fcoe:   The new FCoE interface
> >    */
> >   static void fcoe_dcb_create(struct fcoe_interface *fcoe)
> >   {
> > @@ -2609,7 +2607,7 @@ static void fcoe_logo_resp(struct fc_seq *seq, struct fc_frame *fp, void *arg)
> >   	fc_lport_logo_resp(seq, fp, lport);
> >   }
> > -/**
> > +/*
> >    * fcoe_elsct_send - FCoE specific ELS handler
> >    *
> >    * This does special case handling of FIP encapsualted ELS exchanges for FCoE,
> > 
> I'd rather convert this and the fcoe_netdev_features_change to proper
> kerneldocs:
> 
> diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c
> index cb41d166e0c0..151fe4c53b07 100644
> --- a/drivers/scsi/fcoe/fcoe.c
> +++ b/drivers/scsi/fcoe/fcoe.c
> @@ -646,8 +646,12 @@ static int fcoe_lport_config(struct fc_lport *lport)
>  }
> 
>  /**
> - * fcoe_netdev_features_change - Updates the lport's offload flags based
> - * on the LLD netdev's FCoE feature flags
> + * fcoe_netdev_features_change - Updates the lport's offload flags
> + * @lport:  The local port that is associated with the net device
> + * @netdev: The associated net device
> + *
> + * Update the @lport offload flags based on the FCoE feature flags
> + * from the LLD @netdev.
>   */
>  static void fcoe_netdev_features_change(struct fc_lport *lport,
>                                         struct net_device *netdev)
> @@ -2611,6 +2615,13 @@ static void fcoe_logo_resp(struct fc_seq *seq, struct
> fc_frame *fp, void *arg)
> 
>  /**
>   * fcoe_elsct_send - FCoE specific ELS handler
> + * @lport: Local port
> + * @did: Destination ID
> + * @fp: FCoE frame
> + * @op: ELS operation
> + * @resp: Response callback
> + * @arg: Argument for the response callback
> + * @timeout: Timeout for the ELS response
>   *
>   * This does special case handling of FIP encapsualted ELS exchanges for
> FCoE,
>   * using FCoE specific response handlers and passing the FIP controller as

I don't want to steal your work.

Why don't you send this and a follow-up to fix the broken header for
fcoe_ctlr_disc_start() as follow-ups?

It also saves me from having to submit a v3 of this entire set.

-- 
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] 53+ messages in thread

* Re: [PATCH v2 04/29] scsi: fcoe: fcoe: Fix various kernel-doc infringements
  2020-07-14  7:58     ` Lee Jones
@ 2020-07-14  8:14       ` Hannes Reinecke
  0 siblings, 0 replies; 53+ messages in thread
From: Hannes Reinecke @ 2020-07-14  8:14 UTC (permalink / raw)
  To: Lee Jones; +Cc: jejb, martin.petersen, linux-kernel, linux-scsi

On 7/14/20 9:58 AM, Lee Jones wrote:
> On Tue, 14 Jul 2020, Hannes Reinecke wrote:
> 
>> On 7/13/20 9:46 AM, Lee Jones wrote:
>>> A couple of headers make no attempt to document their associated function
>>> parameters.  Others looks as if they are suffering with a little bitrot.
>>>
>>> Fixes the following W=1 kernel build warning(s):
>>>
>>>   drivers/scsi/fcoe/fcoe.c:654: warning: Function parameter or member 'lport' not described in 'fcoe_netdev_features_change'
>>>   drivers/scsi/fcoe/fcoe.c:654: warning: Function parameter or member 'netdev' not described in 'fcoe_netdev_features_change'
>>>   drivers/scsi/fcoe/fcoe.c:2039: warning: Function parameter or member 'ctlr_dev' not described in 'fcoe_ctlr_mode'
>>>   drivers/scsi/fcoe/fcoe.c:2039: warning: Excess function parameter 'cdev' description in 'fcoe_ctlr_mode'
>>>   drivers/scsi/fcoe/fcoe.c:2144: warning: Function parameter or member 'fcoe' not described in 'fcoe_dcb_create'
>>>   drivers/scsi/fcoe/fcoe.c:2144: warning: Excess function parameter 'netdev' description in 'fcoe_dcb_create'
>>>   drivers/scsi/fcoe/fcoe.c:2144: warning: Excess function parameter 'port' description in 'fcoe_dcb_create'
>>>   drivers/scsi/fcoe/fcoe.c:2627: warning: Function parameter or member 'lport' not described in 'fcoe_elsct_send'
>>>   drivers/scsi/fcoe/fcoe.c:2627: warning: Function parameter or member 'did' not described in 'fcoe_elsct_send'
>>>   drivers/scsi/fcoe/fcoe.c:2627: warning: Function parameter or member 'fp' not described in 'fcoe_elsct_send'
>>>   drivers/scsi/fcoe/fcoe.c:2627: warning: Function parameter or member 'op' not described in 'fcoe_elsct_send'
>>>   drivers/scsi/fcoe/fcoe.c:2627: warning: Function parameter or member 'resp' not described in 'fcoe_elsct_send'
>>>   drivers/scsi/fcoe/fcoe.c:2627: warning: Function parameter or member 'arg' not described in 'fcoe_elsct_send'
>>>   drivers/scsi/fcoe/fcoe.c:2627: warning: Function parameter or member 'timeout' not described in 'fcoe_elsct_send'
>>>
>>> Cc: Hannes Reinecke <hare@suse.de>
>>> Signed-off-by: Lee Jones <lee.jones@linaro.org>
>>> ---
>>>   drivers/scsi/fcoe/fcoe.c | 10 ++++------
>>>   1 file changed, 4 insertions(+), 6 deletions(-)
>>>
>>> diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c
>>> index cb41d166e0c0f..0f9274960dc6b 100644
>>> --- a/drivers/scsi/fcoe/fcoe.c
>>> +++ b/drivers/scsi/fcoe/fcoe.c
>>> @@ -645,7 +645,7 @@ static int fcoe_lport_config(struct fc_lport *lport)
>>>   	return 0;
>>>   }
>>> -/**
>>> +/*
>>>    * fcoe_netdev_features_change - Updates the lport's offload flags based
>>>    * on the LLD netdev's FCoE feature flags
>>>    */
>>> @@ -2029,7 +2029,7 @@ static int fcoe_ctlr_enabled(struct fcoe_ctlr_device *cdev)
>>>   /**
>>>    * fcoe_ctlr_mode() - Switch FIP mode
>>> - * @cdev: The FCoE Controller that is being modified
>>> + * @ctlr_dev: The FCoE Controller that is being modified
>>>    *
>>>    * When the FIP mode has been changed we need to update
>>>    * the multicast addresses to ensure we get the correct
>>> @@ -2136,9 +2136,7 @@ static bool fcoe_match(struct net_device *netdev)
>>>   /**
>>>    * fcoe_dcb_create() - Initialize DCB attributes and hooks
>>> - * @netdev: The net_device object of the L2 link that should be queried
>>> - * @port: The fcoe_port to bind FCoE APP priority with
>>> - * @
>>> + * @fcoe:   The new FCoE interface
>>>    */
>>>   static void fcoe_dcb_create(struct fcoe_interface *fcoe)
>>>   {
>>> @@ -2609,7 +2607,7 @@ static void fcoe_logo_resp(struct fc_seq *seq, struct fc_frame *fp, void *arg)
>>>   	fc_lport_logo_resp(seq, fp, lport);
>>>   }
>>> -/**
>>> +/*
>>>    * fcoe_elsct_send - FCoE specific ELS handler
>>>    *
>>>    * This does special case handling of FIP encapsualted ELS exchanges for FCoE,
>>>
>> I'd rather convert this and the fcoe_netdev_features_change to proper
>> kerneldocs:
>>
>> diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c
>> index cb41d166e0c0..151fe4c53b07 100644
>> --- a/drivers/scsi/fcoe/fcoe.c
>> +++ b/drivers/scsi/fcoe/fcoe.c
>> @@ -646,8 +646,12 @@ static int fcoe_lport_config(struct fc_lport *lport)
>>  }
>>
>>  /**
>> - * fcoe_netdev_features_change - Updates the lport's offload flags based
>> - * on the LLD netdev's FCoE feature flags
>> + * fcoe_netdev_features_change - Updates the lport's offload flags
>> + * @lport:  The local port that is associated with the net device
>> + * @netdev: The associated net device
>> + *
>> + * Update the @lport offload flags based on the FCoE feature flags
>> + * from the LLD @netdev.
>>   */
>>  static void fcoe_netdev_features_change(struct fc_lport *lport,
>>                                         struct net_device *netdev)
>> @@ -2611,6 +2615,13 @@ static void fcoe_logo_resp(struct fc_seq *seq, struct
>> fc_frame *fp, void *arg)
>>
>>  /**
>>   * fcoe_elsct_send - FCoE specific ELS handler
>> + * @lport: Local port
>> + * @did: Destination ID
>> + * @fp: FCoE frame
>> + * @op: ELS operation
>> + * @resp: Response callback
>> + * @arg: Argument for the response callback
>> + * @timeout: Timeout for the ELS response
>>   *
>>   * This does special case handling of FIP encapsualted ELS exchanges for
>> FCoE,
>>   * using FCoE specific response handlers and passing the FIP controller as
> 
> I don't want to steal your work.
> 
> Why don't you send this and a follow-up to fix the broken header for
> fcoe_ctlr_disc_start() as follow-ups?
> 
> It also saves me from having to submit a v3 of this entire set.
> 
Okay, not a problem.

So you can add:

Reviewed-by: Hannes Reinecke <hare@suse.de>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		           Kernel Storage Architect
hare@suse.de			                  +49 911 74053 688
SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), GF: Felix Imendörffer

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

* Re: [PATCH v2 05/29] scsi: fcoe: fcoe_ctlr: Fix a myriad of documentation issues
  2020-07-13  7:46 ` [PATCH v2 05/29] scsi: fcoe: fcoe_ctlr: Fix a myriad of documentation issues Lee Jones
  2020-07-14  7:00   ` Hannes Reinecke
@ 2020-07-14 14:08   ` Martin K. Petersen
  2020-07-14 14:23     ` Lee Jones
  2020-07-14 15:07   ` [PATCH v2.1 " Lee Jones
  2 siblings, 1 reply; 53+ messages in thread
From: Martin K. Petersen @ 2020-07-14 14:08 UTC (permalink / raw)
  To: Lee Jones
  Cc: jejb, martin.petersen, linux-kernel, linux-scsi, Hannes Reinecke


Lee,

> @@ -3015,9 +3016,8 @@ static void fcoe_ctlr_disc_recv(struct fc_lport *lport, struct fc_frame *fp)
>  	fc_frame_free(fp);
>  }
>  
> -/**
> +/*
>   * fcoe_ctlr_disc_recv - start discovery for VN2VN mode.
> - * @fip: The FCoE controller
>   *
>   * This sets a flag indicating that remote ports should be created
>   * and started for the peers we discover.  We use the disc_callback

s/fcoe_ctlr_disc_recv/fcoe_ctlr_disc_start/ ?

-- 
Martin K. Petersen	Oracle Linux Engineering

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

* Re: [PATCH v2 05/29] scsi: fcoe: fcoe_ctlr: Fix a myriad of documentation issues
  2020-07-14 14:08   ` Martin K. Petersen
@ 2020-07-14 14:23     ` Lee Jones
  2020-07-14 16:50       ` Martin K. Petersen
  0 siblings, 1 reply; 53+ messages in thread
From: Lee Jones @ 2020-07-14 14:23 UTC (permalink / raw)
  To: Martin K. Petersen; +Cc: jejb, linux-kernel, linux-scsi, Hannes Reinecke

On Tue, 14 Jul 2020, Martin K. Petersen wrote:

> 
> Lee,

Ah, you are alive.  I was beginning to worry. :)

I have more fixes for you, but didn't want to send them until these
have been merged.

> > @@ -3015,9 +3016,8 @@ static void fcoe_ctlr_disc_recv(struct fc_lport *lport, struct fc_frame *fp)
> >  	fc_frame_free(fp);
> >  }
> >  
> > -/**
> > +/*
> >   * fcoe_ctlr_disc_recv - start discovery for VN2VN mode.
> > - * @fip: The FCoE controller
> >   *
> >   * This sets a flag indicating that remote ports should be created
> >   * and started for the peers we discover.  We use the disc_callback
> 
> s/fcoe_ctlr_disc_recv/fcoe_ctlr_disc_start/ ?

Yes, I spotted it.  Hence my earlier comment to Hannes:

 "Look at the function below it (in your local copy). ;)"

Do you want me to fix that up here as well?

-- 
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] 53+ messages in thread

* [PATCH v2.1 05/29] scsi: fcoe: fcoe_ctlr: Fix a myriad of documentation issues
  2020-07-13  7:46 ` [PATCH v2 05/29] scsi: fcoe: fcoe_ctlr: Fix a myriad of documentation issues Lee Jones
  2020-07-14  7:00   ` Hannes Reinecke
  2020-07-14 14:08   ` Martin K. Petersen
@ 2020-07-14 15:07   ` Lee Jones
  2020-07-14 15:15     ` Hannes Reinecke
  2 siblings, 1 reply; 53+ messages in thread
From: Lee Jones @ 2020-07-14 15:07 UTC (permalink / raw)
  To: jejb, martin.petersen; +Cc: linux-kernel, linux-scsi, Hannes Reinecke

Mostly missing or incorrect (bitrotted) function parameters.

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

 drivers/scsi/fcoe/fcoe_ctlr.c:139: warning: Function parameter or member 'mode' not described in 'fcoe_ctlr_init'
 drivers/scsi/fcoe/fcoe_ctlr.c:604: warning: Function parameter or member 'lport' not described in 'fcoe_ctlr_encaps'
 drivers/scsi/fcoe/fcoe_ctlr.c:1312: warning: Function parameter or member 'skb' not described in 'fcoe_ctlr_recv_clr_vlink'
 drivers/scsi/fcoe/fcoe_ctlr.c:1312: warning: Excess function parameter 'fh' description in 'fcoe_ctlr_recv_clr_vlink'
 drivers/scsi/fcoe/fcoe_ctlr.c:1781: warning: Function parameter or member 't' not described in 'fcoe_ctlr_timeout'
 drivers/scsi/fcoe/fcoe_ctlr.c:1781: warning: Excess function parameter 'arg' description in 'fcoe_ctlr_timeout'
 drivers/scsi/fcoe/fcoe_ctlr.c:1904: warning: Function parameter or member 'lport' not described in 'fcoe_ctlr_recv_flogi'
 drivers/scsi/fcoe/fcoe_ctlr.c:2166: warning: Function parameter or member 'lport' not described in 'fcoe_ctlr_disc_stop_locked'
 drivers/scsi/fcoe/fcoe_ctlr.c:2166: warning: Excess function parameter 'fip' description in 'fcoe_ctlr_disc_stop_locked'
 drivers/scsi/fcoe/fcoe_ctlr.c:2188: warning: Function parameter or member 'lport' not described in 'fcoe_ctlr_disc_stop'
 drivers/scsi/fcoe/fcoe_ctlr.c:2188: warning: Excess function parameter 'fip' description in 'fcoe_ctlr_disc_stop'
 drivers/scsi/fcoe/fcoe_ctlr.c:2204: warning: Function parameter or member 'lport' not described in 'fcoe_ctlr_disc_stop_final'
 drivers/scsi/fcoe/fcoe_ctlr.c:2204: warning: Excess function parameter 'fip' description in 'fcoe_ctlr_disc_stop_final'
 drivers/scsi/fcoe/fcoe_ctlr.c:2273: warning: Function parameter or member 'frport' not described in 'fcoe_ctlr_vn_parse'
 drivers/scsi/fcoe/fcoe_ctlr.c:2273: warning: Excess function parameter 'rdata' description in 'fcoe_ctlr_vn_parse'
 drivers/scsi/fcoe/fcoe_ctlr.c:2804: warning: Function parameter or member 'frport' not described in 'fcoe_ctlr_vlan_parse'
 drivers/scsi/fcoe/fcoe_ctlr.c:2804: warning: Excess function parameter 'rdata' description in 'fcoe_ctlr_vlan_parse'
 drivers/scsi/fcoe/fcoe_ctlr.c:2900: warning: Excess function parameter 'min_len' description in 'fcoe_ctlr_vlan_send'
 drivers/scsi/fcoe/fcoe_ctlr.c:2977: warning: Function parameter or member 'fip' not described in 'fcoe_ctlr_vlan_recv'
 drivers/scsi/fcoe/fcoe_ctlr.c:2977: warning: Function parameter or member 'skb' not described in 'fcoe_ctlr_vlan_recv'
 drivers/scsi/fcoe/fcoe_ctlr.c:2977: warning: Excess function parameter 'lport' description in 'fcoe_ctlr_vlan_recv'
 drivers/scsi/fcoe/fcoe_ctlr.c:2977: warning: Excess function parameter 'fp' description in 'fcoe_ctlr_vlan_recv'
 drivers/scsi/fcoe/fcoe_ctlr.c:3033: warning: Function parameter or member 'callback' not described in 'fcoe_ctlr_disc_start'
 drivers/scsi/fcoe/fcoe_ctlr.c:3033: warning: Function parameter or member 'lport' not described in 'fcoe_ctlr_disc_start'
 drivers/scsi/fcoe/fcoe_ctlr.c:3033: warning: Excess function parameter 'fip' description in 'fcoe_ctlr_disc_start'

Cc: Hannes Reinecke <hare@suse.de>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
Changelog:

v2
 - Rename title s/fcoe_ctlr_disc_recv/fcoe_ctlr_disc_start/ while we're at it

 drivers/scsi/fcoe/fcoe_ctlr.c | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/drivers/scsi/fcoe/fcoe_ctlr.c b/drivers/scsi/fcoe/fcoe_ctlr.c
index 1791a393795da..a31d4f2f9c382 100644
--- a/drivers/scsi/fcoe/fcoe_ctlr.c
+++ b/drivers/scsi/fcoe/fcoe_ctlr.c
@@ -134,6 +134,7 @@ static void fcoe_ctlr_map_dest(struct fcoe_ctlr *fip)
 /**
  * fcoe_ctlr_init() - Initialize the FCoE Controller instance
  * @fip: The FCoE controller to initialize
+ * @mode: FIP mode to set
  */
 void fcoe_ctlr_init(struct fcoe_ctlr *fip, enum fip_mode mode)
 {
@@ -587,6 +588,7 @@ static void fcoe_ctlr_send_keep_alive(struct fcoe_ctlr *fip,
 /**
  * fcoe_ctlr_encaps() - Encapsulate an ELS frame for FIP, without sending it
  * @fip:   The FCoE controller for the ELS frame
+ * @lport: The local port
  * @dtype: The FIP descriptor type for the frame
  * @skb:   The FCoE ELS frame including FC header but no FCoE headers
  * @d_id:  The destination port ID.
@@ -1302,7 +1304,7 @@ static void fcoe_ctlr_recv_els(struct fcoe_ctlr *fip, struct sk_buff *skb)
 /**
  * fcoe_ctlr_recv_els() - Handle an incoming link reset frame
  * @fip: The FCoE controller that received the frame
- * @fh:	 The received FIP header
+ * @skb: The received FIP packet
  *
  * There may be multiple VN_Port descriptors.
  * The overall length has already been checked.
@@ -1775,7 +1777,7 @@ static void fcoe_ctlr_flogi_send(struct fcoe_ctlr *fip)
 
 /**
  * fcoe_ctlr_timeout() - FIP timeout handler
- * @arg: The FCoE controller that timed out
+ * @t: Timer context use to obtain the controller reference
  */
 static void fcoe_ctlr_timeout(struct timer_list *t)
 {
@@ -1887,6 +1889,7 @@ static void fcoe_ctlr_recv_work(struct work_struct *recv_work)
 /**
  * fcoe_ctlr_recv_flogi() - Snoop pre-FIP receipt of FLOGI response
  * @fip: The FCoE controller
+ * @lport: The local port
  * @fp:	 The FC frame to snoop
  *
  * Snoop potential response to FLOGI or even incoming FLOGI.
@@ -2158,7 +2161,7 @@ static struct fc_rport_operations fcoe_ctlr_vn_rport_ops = {
 
 /**
  * fcoe_ctlr_disc_stop_locked() - stop discovery in VN2VN mode
- * @fip: The FCoE controller
+ * @lport: The local port
  *
  * Called with ctlr_mutex held.
  */
@@ -2179,7 +2182,7 @@ static void fcoe_ctlr_disc_stop_locked(struct fc_lport *lport)
 
 /**
  * fcoe_ctlr_disc_stop() - stop discovery in VN2VN mode
- * @fip: The FCoE controller
+ * @lport: The local port
  *
  * Called through the local port template for discovery.
  * Called without the ctlr_mutex held.
@@ -2195,7 +2198,7 @@ static void fcoe_ctlr_disc_stop(struct fc_lport *lport)
 
 /**
  * fcoe_ctlr_disc_stop_final() - stop discovery for shutdown in VN2VN mode
- * @fip: The FCoE controller
+ * @lport: The local port
  *
  * Called through the local port template for discovery.
  * Called without the ctlr_mutex held.
@@ -2262,7 +2265,7 @@ static void fcoe_ctlr_vn_start(struct fcoe_ctlr *fip)
  * fcoe_ctlr_vn_parse - parse probe request or response
  * @fip: The FCoE controller
  * @skb: incoming packet
- * @rdata: buffer for resulting parsed VN entry plus fcoe_rport
+ * @frport: parsed FCoE rport from the probe request
  *
  * Returns non-zero error number on error.
  * Does not consume the packet.
@@ -2793,7 +2796,7 @@ static int fcoe_ctlr_vn_recv(struct fcoe_ctlr *fip, struct sk_buff *skb)
  * fcoe_ctlr_vlan_parse - parse vlan discovery request or response
  * @fip: The FCoE controller
  * @skb: incoming packet
- * @rdata: buffer for resulting parsed VLAN entry plus fcoe_rport
+ * @frport: parsed FCoE rport from the probe request
  *
  * Returns non-zero error number on error.
  * Does not consume the packet.
@@ -2892,7 +2895,6 @@ static int fcoe_ctlr_vlan_parse(struct fcoe_ctlr *fip,
  * @fip: The FCoE controller
  * @sub: sub-opcode for vlan notification or vn2vn vlan notification
  * @dest: The destination Ethernet MAC address
- * @min_len: minimum size of the Ethernet payload to be sent
  */
 static void fcoe_ctlr_vlan_send(struct fcoe_ctlr *fip,
 			      enum fip_vlan_subcode sub,
@@ -2969,9 +2971,8 @@ static void fcoe_ctlr_vlan_disc_reply(struct fcoe_ctlr *fip,
 
 /**
  * fcoe_ctlr_vlan_recv - vlan request receive handler for VN2VN mode.
- * @lport: The local port
- * @fp: The received frame
- *
+ * @fip: The FCoE controller
+ * @skb: The received FIP packet
  */
 static int fcoe_ctlr_vlan_recv(struct fcoe_ctlr *fip, struct sk_buff *skb)
 {
@@ -3015,9 +3016,8 @@ static void fcoe_ctlr_disc_recv(struct fc_lport *lport, struct fc_frame *fp)
 	fc_frame_free(fp);
 }
 
-/**
- * fcoe_ctlr_disc_recv - start discovery for VN2VN mode.
- * @fip: The FCoE controller
+/*
+ * fcoe_ctlr_disc_start - start discovery for VN2VN mode.
  *
  * This sets a flag indicating that remote ports should be created
  * and started for the peers we discover.  We use the disc_callback
-- 
2.25.1

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

* Re: [PATCH v2.1 05/29] scsi: fcoe: fcoe_ctlr: Fix a myriad of documentation issues
  2020-07-14 15:07   ` [PATCH v2.1 " Lee Jones
@ 2020-07-14 15:15     ` Hannes Reinecke
  0 siblings, 0 replies; 53+ messages in thread
From: Hannes Reinecke @ 2020-07-14 15:15 UTC (permalink / raw)
  To: Lee Jones, jejb, martin.petersen; +Cc: linux-kernel, linux-scsi

On 7/14/20 5:07 PM, Lee Jones wrote:
> Mostly missing or incorrect (bitrotted) function parameters.
> 
> Fixes the following W=1 kernel build warning(s):
> 
>   drivers/scsi/fcoe/fcoe_ctlr.c:139: warning: Function parameter or member 'mode' not described in 'fcoe_ctlr_init'
>   drivers/scsi/fcoe/fcoe_ctlr.c:604: warning: Function parameter or member 'lport' not described in 'fcoe_ctlr_encaps'
>   drivers/scsi/fcoe/fcoe_ctlr.c:1312: warning: Function parameter or member 'skb' not described in 'fcoe_ctlr_recv_clr_vlink'
>   drivers/scsi/fcoe/fcoe_ctlr.c:1312: warning: Excess function parameter 'fh' description in 'fcoe_ctlr_recv_clr_vlink'
>   drivers/scsi/fcoe/fcoe_ctlr.c:1781: warning: Function parameter or member 't' not described in 'fcoe_ctlr_timeout'
>   drivers/scsi/fcoe/fcoe_ctlr.c:1781: warning: Excess function parameter 'arg' description in 'fcoe_ctlr_timeout'
>   drivers/scsi/fcoe/fcoe_ctlr.c:1904: warning: Function parameter or member 'lport' not described in 'fcoe_ctlr_recv_flogi'
>   drivers/scsi/fcoe/fcoe_ctlr.c:2166: warning: Function parameter or member 'lport' not described in 'fcoe_ctlr_disc_stop_locked'
>   drivers/scsi/fcoe/fcoe_ctlr.c:2166: warning: Excess function parameter 'fip' description in 'fcoe_ctlr_disc_stop_locked'
>   drivers/scsi/fcoe/fcoe_ctlr.c:2188: warning: Function parameter or member 'lport' not described in 'fcoe_ctlr_disc_stop'
>   drivers/scsi/fcoe/fcoe_ctlr.c:2188: warning: Excess function parameter 'fip' description in 'fcoe_ctlr_disc_stop'
>   drivers/scsi/fcoe/fcoe_ctlr.c:2204: warning: Function parameter or member 'lport' not described in 'fcoe_ctlr_disc_stop_final'
>   drivers/scsi/fcoe/fcoe_ctlr.c:2204: warning: Excess function parameter 'fip' description in 'fcoe_ctlr_disc_stop_final'
>   drivers/scsi/fcoe/fcoe_ctlr.c:2273: warning: Function parameter or member 'frport' not described in 'fcoe_ctlr_vn_parse'
>   drivers/scsi/fcoe/fcoe_ctlr.c:2273: warning: Excess function parameter 'rdata' description in 'fcoe_ctlr_vn_parse'
>   drivers/scsi/fcoe/fcoe_ctlr.c:2804: warning: Function parameter or member 'frport' not described in 'fcoe_ctlr_vlan_parse'
>   drivers/scsi/fcoe/fcoe_ctlr.c:2804: warning: Excess function parameter 'rdata' description in 'fcoe_ctlr_vlan_parse'
>   drivers/scsi/fcoe/fcoe_ctlr.c:2900: warning: Excess function parameter 'min_len' description in 'fcoe_ctlr_vlan_send'
>   drivers/scsi/fcoe/fcoe_ctlr.c:2977: warning: Function parameter or member 'fip' not described in 'fcoe_ctlr_vlan_recv'
>   drivers/scsi/fcoe/fcoe_ctlr.c:2977: warning: Function parameter or member 'skb' not described in 'fcoe_ctlr_vlan_recv'
>   drivers/scsi/fcoe/fcoe_ctlr.c:2977: warning: Excess function parameter 'lport' description in 'fcoe_ctlr_vlan_recv'
>   drivers/scsi/fcoe/fcoe_ctlr.c:2977: warning: Excess function parameter 'fp' description in 'fcoe_ctlr_vlan_recv'
>   drivers/scsi/fcoe/fcoe_ctlr.c:3033: warning: Function parameter or member 'callback' not described in 'fcoe_ctlr_disc_start'
>   drivers/scsi/fcoe/fcoe_ctlr.c:3033: warning: Function parameter or member 'lport' not described in 'fcoe_ctlr_disc_start'
>   drivers/scsi/fcoe/fcoe_ctlr.c:3033: warning: Excess function parameter 'fip' description in 'fcoe_ctlr_disc_start'
> 
> Cc: Hannes Reinecke <hare@suse.de>
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
> Changelog:
> 
> v2
>   - Rename title s/fcoe_ctlr_disc_recv/fcoe_ctlr_disc_start/ while we're at it
> 
>   drivers/scsi/fcoe/fcoe_ctlr.c | 28 ++++++++++++++--------------
>   1 file changed, 14 insertions(+), 14 deletions(-)
> 
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] 53+ messages in thread

* Re: [PATCH v2 18/29] scsi: aic7xxx: aic7xxx_osm: Remove unused variable 'tinfo'
  2020-07-13  7:46 ` [PATCH v2 18/29] scsi: aic7xxx: aic7xxx_osm: Remove unused variable 'tinfo' Lee Jones
@ 2020-07-14 16:24   ` Doug Ledford
  2020-07-14 21:08     ` Lee Jones
  0 siblings, 1 reply; 53+ messages in thread
From: Doug Ledford @ 2020-07-14 16:24 UTC (permalink / raw)
  To: Lee Jones, jejb, martin.petersen
  Cc: linux-kernel, linux-scsi, Hannes Reinecke

[-- Attachment #1: Type: text/plain, Size: 2600 bytes --]

On Mon, 2020-07-13 at 08:46 +0100, Lee Jones wrote:
> Looks like none of the artifact from  ahc_fetch_transinfo() are used
> anymore.
> 
> Fixes the following W=1 kernel build warning(s):
> 
>  drivers/scsi/aic7xxx/aic7xxx_osm.c: In function
> ‘ahc_linux_target_alloc’:
>  drivers/scsi/aic7xxx/aic7xxx_osm.c:567:30: warning: variable ‘tinfo’
> set but not used [-Wunused-but-set-variable]
>  567 | struct ahc_initiator_tinfo *tinfo;
>  | ^~~~~
> 
> Cc: Hannes Reinecke <hare@suse.com>
> Cc: "Daniel M. Eischen" <deischen@iworks.InterWorks.org>
> Cc: Doug Ledford <dledford@redhat.com>

FWIW, I can't seem to figure out how you got mine or Dan's email
addresses as related to this driver.  The MAINTAINERS file only lists
Hannes.  The driver Dan and I worked on was a different driver.  It was
named aic7xxx, but that was back in the 1990s.  It was renamed to
aic7xxx_old so that Adaptec could contribute this driver you are
currently patching back around 2001 or so.  And then maybe around 2010
or something like that, the aic7xxx_old driver that Dan and I worked on
was removed from the upstream source tree entirely.  So, just out of
curiosity, how did you get mine and Dan's email addresses to put on the
Cc: list for these patches?

> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
>  drivers/scsi/aic7xxx/aic7xxx_osm.c | 5 -----
>  1 file changed, 5 deletions(-)
> 
> diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm.c
> b/drivers/scsi/aic7xxx/aic7xxx_osm.c
> index 2edfa0594f183..32bfe20d79cc1 100644
> --- a/drivers/scsi/aic7xxx/aic7xxx_osm.c
> +++ b/drivers/scsi/aic7xxx/aic7xxx_osm.c
> @@ -564,8 +564,6 @@ ahc_linux_target_alloc(struct scsi_target
> *starget)
>  	struct scsi_target **ahc_targp =
> ahc_linux_target_in_softc(starget);
>  	unsigned short scsirate;
>  	struct ahc_devinfo devinfo;
> -	struct ahc_initiator_tinfo *tinfo;
> -	struct ahc_tmode_tstate *tstate;
>  	char channel = starget->channel + 'A';
>  	unsigned int our_id = ahc->our_id;
>  	unsigned int target_offset;
> @@ -612,9 +610,6 @@ ahc_linux_target_alloc(struct scsi_target
> *starget)
>  			spi_max_offset(starget) = 0;
>  		spi_min_period(starget) = 
>  			ahc_find_period(ahc, scsirate, maxsync);
> -
> -		tinfo = ahc_fetch_transinfo(ahc, channel, ahc->our_id,
> -					    starget->id, &tstate);
>  	}
>  	ahc_compile_devinfo(&devinfo, our_id, starget->id,
>  			    CAM_LUN_WILDCARD, channel,

-- 
Doug Ledford <dledford@redhat.com>
    GPG KeyID: B826A3330E572FDD
    Fingerprint = AE6B 1BDA 122B 23B4 265B  1274 B826 A333 0E57 2FDD

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH v2 05/29] scsi: fcoe: fcoe_ctlr: Fix a myriad of documentation issues
  2020-07-14 14:23     ` Lee Jones
@ 2020-07-14 16:50       ` Martin K. Petersen
  0 siblings, 0 replies; 53+ messages in thread
From: Martin K. Petersen @ 2020-07-14 16:50 UTC (permalink / raw)
  To: Lee Jones
  Cc: Martin K. Petersen, jejb, linux-kernel, linux-scsi, Hannes Reinecke


Lee,

> Yes, I spotted it.  Hence my earlier comment to Hannes:
>
>  "Look at the function below it (in your local copy). ;)"
>
> Do you want me to fix that up here as well?

I can fix it up.

-- 
Martin K. Petersen	Oracle Linux Engineering

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

* Re: [PATCH v2 18/29] scsi: aic7xxx: aic7xxx_osm: Remove unused variable 'tinfo'
  2020-07-14 16:24   ` Doug Ledford
@ 2020-07-14 21:08     ` Lee Jones
  0 siblings, 0 replies; 53+ messages in thread
From: Lee Jones @ 2020-07-14 21:08 UTC (permalink / raw)
  To: Doug Ledford
  Cc: jejb, martin.petersen, linux-kernel, linux-scsi, Hannes Reinecke

On Tue, 14 Jul 2020, Doug Ledford wrote:

> On Mon, 2020-07-13 at 08:46 +0100, Lee Jones wrote:
> > Looks like none of the artifact from  ahc_fetch_transinfo() are used
> > anymore.
> > 
> > Fixes the following W=1 kernel build warning(s):
> > 
> >  drivers/scsi/aic7xxx/aic7xxx_osm.c: In function
> > ‘ahc_linux_target_alloc’:
> >  drivers/scsi/aic7xxx/aic7xxx_osm.c:567:30: warning: variable ‘tinfo’
> > set but not used [-Wunused-but-set-variable]
> >  567 | struct ahc_initiator_tinfo *tinfo;
> >  | ^~~~~
> > 
> > Cc: Hannes Reinecke <hare@suse.com>
> > Cc: "Daniel M. Eischen" <deischen@iworks.InterWorks.org>
> > Cc: Doug Ledford <dledford@redhat.com>
> 
> FWIW, I can't seem to figure out how you got mine or Dan's email
> addresses as related to this driver.  The MAINTAINERS file only lists
> Hannes.  The driver Dan and I worked on was a different driver.  It was
> named aic7xxx, but that was back in the 1990s.  It was renamed to
> aic7xxx_old so that Adaptec could contribute this driver you are
> currently patching back around 2001 or so.  And then maybe around 2010
> or something like that, the aic7xxx_old driver that Dan and I worked on
> was removed from the upstream source tree entirely.  So, just out of
> curiosity, how did you get mine and Dan's email addresses to put on the
> Cc: list for these patches?

 $ ./scripts/get_maintainer.pl --file-emails --git-min-percent 75 -f drivers/scsi/aic7xxx/aic7xxx_osm.c
  Hannes Reinecke <hare@suse.com> (maintainer:AIC7XXX / AIC79XX SCSI DRIVER,in file)
  "James E.J. Bottomley" <jejb@linux.ibm.com> (maintainer:SCSI SUBSYSTEM)
  "Martin K. Petersen" <martin.petersen@oracle.com> (maintainer:SCSI SUBSYSTEM)
  "Daniel M. Eischen" <deischen@iworks.InterWorks.org> (in file)
  Doug Ledford <dledford@redhat.com> (in file)
  linux-scsi@vger.kernel.org (open list:AIC7XXX / AIC79XX SCSI DRIVER)
  linux-kernel@vger.kernel.org (open list)

Looks like get_maintainer.pl pulled it from the file header.

> > Signed-off-by: Lee Jones <lee.jones@linaro.org>
> > ---
> >  drivers/scsi/aic7xxx/aic7xxx_osm.c | 5 -----
> >  1 file changed, 5 deletions(-)
> > 
> > diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm.c
> > b/drivers/scsi/aic7xxx/aic7xxx_osm.c
> > index 2edfa0594f183..32bfe20d79cc1 100644
> > --- a/drivers/scsi/aic7xxx/aic7xxx_osm.c
> > +++ b/drivers/scsi/aic7xxx/aic7xxx_osm.c
> > @@ -564,8 +564,6 @@ ahc_linux_target_alloc(struct scsi_target
> > *starget)
> >  	struct scsi_target **ahc_targp =
> > ahc_linux_target_in_softc(starget);
> >  	unsigned short scsirate;
> >  	struct ahc_devinfo devinfo;
> > -	struct ahc_initiator_tinfo *tinfo;
> > -	struct ahc_tmode_tstate *tstate;
> >  	char channel = starget->channel + 'A';
> >  	unsigned int our_id = ahc->our_id;
> >  	unsigned int target_offset;
> > @@ -612,9 +610,6 @@ ahc_linux_target_alloc(struct scsi_target
> > *starget)
> >  			spi_max_offset(starget) = 0;
> >  		spi_min_period(starget) = 
> >  			ahc_find_period(ahc, scsirate, maxsync);
> > -
> > -		tinfo = ahc_fetch_transinfo(ahc, channel, ahc->our_id,
> > -					    starget->id, &tstate);
> >  	}
> >  	ahc_compile_devinfo(&devinfo, our_id, starget->id,
> >  			    CAM_LUN_WILDCARD, channel,
> 



-- 
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] 53+ messages in thread

* Re: [PATCH v2 00/29] Fix a bunch more SCSI related W=1 warnings
  2020-07-13  7:46 [PATCH v2 00/29] Fix a bunch more SCSI related W=1 warnings Lee Jones
                   ` (28 preceding siblings ...)
  2020-07-13  7:46 ` [PATCH v2 29/29] scsi: qla4xxx: ql4_init: Provide a missing function param description and fix formatting Lee Jones
@ 2020-07-15 22:14 ` Martin K. Petersen
  29 siblings, 0 replies; 53+ messages in thread
From: Martin K. Petersen @ 2020-07-15 22:14 UTC (permalink / raw)
  To: jejb, Lee Jones; +Cc: Martin K . Petersen, linux-scsi, linux-kernel

On Mon, 13 Jul 2020 08:46:16 +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.
> 
> Slowly working through the SCSI related ones.  There are many.
> 
> Change-log:
> 
> [...]

Applied to 5.9/scsi-queue, thanks!

[01/29] scsi: libfc: Supply some missing kerneldoc struct/function attributes/params
        https://git.kernel.org/mkp/scsi/c/74341d35b901
[02/29] scsi: scsi_transport_fc: Match HBA Attribute Length with HBAAPI V2.0 definitions
        https://git.kernel.org/mkp/scsi/c/e721eb0616f6
[03/29] scsi: libfc: trivial: Fix spelling mistake of 'discovery'
        https://git.kernel.org/mkp/scsi/c/ee9ec5c9af94
[04/29] scsi: fcoe: Fix various kernel-doc infringements
        https://git.kernel.org/mkp/scsi/c/54888649bec7
[05/29] scsi: fcoe: Fix a myriad of documentation issues
        https://git.kernel.org/mkp/scsi/c/3052652326dc
[06/29] scsi: fcoe: Correct some kernel-doc issues
        https://git.kernel.org/mkp/scsi/c/f2db5efefa89
[07/29] scsi: bnx2fc: Repair a range of kerneldoc issues
        https://git.kernel.org/mkp/scsi/c/ca63d8e2e9ef
[08/29] scsi: qedf: Demote obvious misuse of kerneldoc to standard comment blocks
        https://git.kernel.org/mkp/scsi/c/a9d4aece2255
[09/29] scsi: qedf: Remove set but not checked variable 'tmp'
        https://git.kernel.org/mkp/scsi/c/c6e2f4bd794a
[10/29] scsi: libfc: Repair function parameter documentation
        https://git.kernel.org/mkp/scsi/c/9865a04d528c
[11/29] scsi: libfc: Fix a couple of misdocumented function parameters
        https://git.kernel.org/mkp/scsi/c/f636acae8d0d
[12/29] scsi: libfc: Provide missing and repair existing function documentation
        https://git.kernel.org/mkp/scsi/c/ebb40ab68118
[13/29] scsi: bnx2fc: Fix a couple of bitrotted function documentation headers
        https://git.kernel.org/mkp/scsi/c/4db2ac3e0392
[14/29] scsi: arcmsr: Remove some set but unused variables
        https://git.kernel.org/mkp/scsi/c/18bc435e0a1d
[16/29] scsi: qedf: Remove a whole host of unused variables
        https://git.kernel.org/mkp/scsi/c/50efc51cb9ff
[17/29] scsi: bnx2fc: Demote obvious misuse of kerneldoc to standard comment blocks
        https://git.kernel.org/mkp/scsi/c/2bd92b33643e
[18/29] scsi: aic7xxx: Remove unused variable 'tinfo'
        https://git.kernel.org/mkp/scsi/c/e3f58eeedb55
[19/29] scsi: aic7xxx: Remove unused variable 'ahc'
        https://git.kernel.org/mkp/scsi/c/614fc2f9883e
[20/29] scsi: aic7xxx: Remove unused variable 'targ'
        https://git.kernel.org/mkp/scsi/c/7097a517446f
[21/29] scsi: aic7xxx: Fix 'amount_xferred' set but not used issue
        https://git.kernel.org/mkp/scsi/c/aa89d74e040a
[22/29] scsi: qedf: Demote obvious misuse of kerneldoc to standard comment blocks
        https://git.kernel.org/mkp/scsi/c/ce7e0a84e5d7
[23/29] scsi: aacraid: Provide suggested curly braces around empty body of if()
        https://git.kernel.org/mkp/scsi/c/8558d5a4f38c
[24/29] scsi: aacraid: Fix a couple of small kerneldoc issues
        https://git.kernel.org/mkp/scsi/c/00a72e8cd267
[25/29] scsi: aic94xx: Demote seemingly unintentional kerneldoc header
        https://git.kernel.org/mkp/scsi/c/2862a3a26c2d
[26/29] scsi: pm8001: Demote obvious misuse of kerneldoc and update others
        https://git.kernel.org/mkp/scsi/c/e802fc43ba36
[27/29] scsi: aic94xx: Repair kerneldoc formatting error and remove extra param
        https://git.kernel.org/mkp/scsi/c/bb458974e063
[28/29] scsi: aacraid: Fix a bunch of function doc formatting errors
        https://git.kernel.org/mkp/scsi/c/e7eb414c653d
[29/29] scsi: qla4xxx: Provide a missing function param description and fix formatting
        https://git.kernel.org/mkp/scsi/c/7ec772d0c3e6

-- 
Martin K. Petersen	Oracle Linux Engineering

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

end of thread, other threads:[~2020-07-15 22:14 UTC | newest]

Thread overview: 53+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-13  7:46 [PATCH v2 00/29] Fix a bunch more SCSI related W=1 warnings Lee Jones
2020-07-13  7:46 ` [PATCH v2 01/29] scsi: libfc: fc_exch: Supply some missing kerneldoc struct/function attributes/params Lee Jones
2020-07-14  6:47   ` Hannes Reinecke
2020-07-13  7:46 ` [PATCH v2 02/29] include: scsi: scsi_transport_fc: Match HBA Attribute Length with HBAAPI V2.0 definitions Lee Jones
2020-07-14  6:49   ` Hannes Reinecke
2020-07-13  7:46 ` [PATCH v2 03/29] scsi: libfc: fc_disc: trivial: Fix spelling mistake of 'discovery' Lee Jones
2020-07-14  6:50   ` Hannes Reinecke
2020-07-13  7:46 ` [PATCH v2 04/29] scsi: fcoe: fcoe: Fix various kernel-doc infringements Lee Jones
2020-07-14  6:58   ` Hannes Reinecke
2020-07-14  7:58     ` Lee Jones
2020-07-14  8:14       ` Hannes Reinecke
2020-07-13  7:46 ` [PATCH v2 05/29] scsi: fcoe: fcoe_ctlr: Fix a myriad of documentation issues Lee Jones
2020-07-14  7:00   ` Hannes Reinecke
2020-07-14  7:53     ` Lee Jones
2020-07-14 14:08   ` Martin K. Petersen
2020-07-14 14:23     ` Lee Jones
2020-07-14 16:50       ` Martin K. Petersen
2020-07-14 15:07   ` [PATCH v2.1 " Lee Jones
2020-07-14 15:15     ` Hannes Reinecke
2020-07-13  7:46 ` [PATCH v2 06/29] scsi: fcoe: fcoe_transport: Correct some kernel-doc issues Lee Jones
2020-07-14  7:01   ` Hannes Reinecke
2020-07-13  7:46 ` [PATCH v2 07/29] scsi: bnx2fc: bnx2fc_fcoe: Repair a range of kerneldoc issues Lee Jones
2020-07-13  7:46 ` [PATCH v2 08/29] scsi: qedf: qedf_main: Demote obvious misuse of kerneldoc to standard comment blocks Lee Jones
2020-07-13  7:46 ` [PATCH v2 09/29] scsi: qedf: qedf_main: Remove set but not checked variable 'tmp' Lee Jones
2020-07-13  7:46 ` [PATCH v2 10/29] scsi: libfc: fc_lport: Repair function parameter documentation Lee Jones
2020-07-14  7:04   ` Hannes Reinecke
2020-07-13  7:46 ` [PATCH v2 11/29] scsi: libfc: fc_rport: Fix a couple of misdocumented function parameters Lee Jones
2020-07-14  7:04   ` Hannes Reinecke
2020-07-13  7:46 ` [PATCH v2 12/29] scsi: libfc: fc_fcp: Provide missing and repair existing function documentation Lee Jones
2020-07-14  7:05   ` Hannes Reinecke
2020-07-13  7:46 ` [PATCH v2 13/29] scsi: bnx2fc: bnx2fc_hwi: Fix a couple of bitrotted function documentation headers Lee Jones
2020-07-13  7:46 ` [PATCH v2 14/29] scsi: arcmsr: arcmsr_hba: Remove some set but unused variables Lee Jones
2020-07-13  7:46 ` [PATCH v2 15/29] scsi: arcmsr: arcmsr_hba: Make room for the trailing NULL, even if it is over-written Lee Jones
2020-07-13  7:46 ` [PATCH v2 16/29] scsi: qedf: qedf_io: Remove a whole host of unused variables Lee Jones
2020-07-13  7:46 ` [PATCH v2 17/29] scsi: bnx2fc: bnx2fc_tgt: Demote obvious misuse of kerneldoc to standard comment blocks Lee Jones
2020-07-13  7:46 ` [PATCH v2 18/29] scsi: aic7xxx: aic7xxx_osm: Remove unused variable 'tinfo' Lee Jones
2020-07-14 16:24   ` Doug Ledford
2020-07-14 21:08     ` Lee Jones
2020-07-13  7:46 ` [PATCH v2 19/29] scsi: aic7xxx: aic7xxx_osm: Remove unused variable 'ahc' Lee Jones
2020-07-14  7:07   ` Hannes Reinecke
2020-07-13  7:46 ` [PATCH v2 20/29] scsi: aic7xxx: aic7xxx_osm: Remove unused variable 'targ' Lee Jones
2020-07-14  7:07   ` Hannes Reinecke
2020-07-13  7:46 ` [PATCH v2 21/29] scsi: aic7xxx: aic7xxx_osm: Fix 'amount_xferred' set but not used issue Lee Jones
2020-07-14  7:08   ` Hannes Reinecke
2020-07-13  7:46 ` [PATCH v2 22/29] scsi: qedf: qedf_debugfs: Demote obvious misuse of kerneldoc to standard comment blocks Lee Jones
2020-07-13  7:46 ` [PATCH v2 23/29] scsi: aacraid: linit: Provide suggested curly braces around empty body of if() Lee Jones
2020-07-13  7:46 ` [PATCH v2 24/29] scsi: aacraid: linit: Fix a couple of small kerneldoc issues Lee Jones
2020-07-13  7:46 ` [PATCH v2 25/29] scsi: aic94xx: aic94xx_init: Demote seemingly unintentional kerneldoc header Lee Jones
2020-07-13  7:46 ` [PATCH v2 26/29] scsi: pm8001: pm8001_init: Demote obvious misuse of kerneldoc and update others Lee Jones
2020-07-13  7:46 ` [PATCH v2 27/29] scsi: aic94xx: aic94xx_hwi: Repair kerneldoc formatting error and remove extra param Lee Jones
2020-07-13  7:46 ` [PATCH v2 28/29] scsi: aacraid: aachba: Fix a bunch of function doc formatting errors Lee Jones
2020-07-13  7:46 ` [PATCH v2 29/29] scsi: qla4xxx: ql4_init: Provide a missing function param description and fix formatting Lee Jones
2020-07-15 22:14 ` [PATCH v2 00/29] Fix a bunch more SCSI related W=1 warnings Martin K. Petersen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.