[PATCH 34/36] scsi: ibmvscsi: ibmvfc: Fix a bunch of misdocumentation

2021-03-17 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/scsi/ibmvscsi/ibmvfc.c:331: warning: Function parameter or member 
'vhost' not described in 'ibmvfc_get_err_result'
 drivers/scsi/ibmvscsi/ibmvfc.c:653: warning: Excess function parameter 
'job_step' description in 'ibmvfc_del_tgt'
 drivers/scsi/ibmvscsi/ibmvfc.c:773: warning: Function parameter or member 
'queue' not described in 'ibmvfc_init_event_pool'
 drivers/scsi/ibmvscsi/ibmvfc.c:773: warning: Function parameter or member 
'size' not described in 'ibmvfc_init_event_pool'
 drivers/scsi/ibmvscsi/ibmvfc.c:823: warning: Function parameter or member 
'queue' not described in 'ibmvfc_free_event_pool'
 drivers/scsi/ibmvscsi/ibmvfc.c:1413: warning: Function parameter or member 
'vhost' not described in 'ibmvfc_gather_partition_info'
 drivers/scsi/ibmvscsi/ibmvfc.c:1483: warning: Function parameter or member 
'queue' not described in 'ibmvfc_get_event'
 drivers/scsi/ibmvscsi/ibmvfc.c:1483: warning: Excess function parameter 
'vhost' description in 'ibmvfc_get_event'
 drivers/scsi/ibmvscsi/ibmvfc.c:1630: warning: Function parameter or member 't' 
not described in 'ibmvfc_timeout'
 drivers/scsi/ibmvscsi/ibmvfc.c:1630: warning: Excess function parameter 'evt' 
description in 'ibmvfc_timeout'
 drivers/scsi/ibmvscsi/ibmvfc.c:1893: warning: Function parameter or member 
'shost' not described in 'ibmvfc_queuecommand'
 drivers/scsi/ibmvscsi/ibmvfc.c:1893: warning: Excess function parameter 'done' 
description in 'ibmvfc_queuecommand'
 drivers/scsi/ibmvscsi/ibmvfc.c:2324: warning: Function parameter or member 
'rport' not described in 'ibmvfc_match_rport'
 drivers/scsi/ibmvscsi/ibmvfc.c:2324: warning: Excess function parameter 
'device' description in 'ibmvfc_match_rport'
 drivers/scsi/ibmvscsi/ibmvfc.c:3133: warning: Function parameter or member 
'evt_doneq' not described in 'ibmvfc_handle_crq'
 drivers/scsi/ibmvscsi/ibmvfc.c:3317: warning: Excess function parameter 
'reason' description in 'ibmvfc_change_queue_depth'
 drivers/scsi/ibmvscsi/ibmvfc.c:3390: warning: Function parameter or member 
'attr' not described in 'ibmvfc_show_log_level'
 drivers/scsi/ibmvscsi/ibmvfc.c:3413: warning: Function parameter or member 
'attr' not described in 'ibmvfc_store_log_level'
 drivers/scsi/ibmvscsi/ibmvfc.c:3413: warning: Function parameter or member 
'count' not described in 'ibmvfc_store_log_level'
 drivers/scsi/ibmvscsi/ibmvfc.c:4121: warning: Function parameter or member 
'done' not described in '__ibmvfc_tgt_get_implicit_logout_evt'
 drivers/scsi/ibmvscsi/ibmvfc.c:4438: warning: Function parameter or member 't' 
not described in 'ibmvfc_adisc_timeout'
 drivers/scsi/ibmvscsi/ibmvfc.c:4438: warning: Excess function parameter 'tgt' 
description in 'ibmvfc_adisc_timeout'
 drivers/scsi/ibmvscsi/ibmvfc.c:4641: warning: Function parameter or member 
'target' not described in 'ibmvfc_alloc_target'
 drivers/scsi/ibmvscsi/ibmvfc.c:4641: warning: Excess function parameter 
'scsi_id' description in 'ibmvfc_alloc_target'
 drivers/scsi/ibmvscsi/ibmvfc.c:5068: warning: Function parameter or member 
'evt' not described in 'ibmvfc_npiv_logout_done'
 drivers/scsi/ibmvscsi/ibmvfc.c:5068: warning: Excess function parameter 
'vhost' description in 'ibmvfc_npiv_logout_done'

Cc: Tyrel Datwyler 
Cc: Michael Ellerman 
Cc: Benjamin Herrenschmidt 
Cc: Paul Mackerras 
Cc: "James E.J. Bottomley" 
Cc: "Martin K. Petersen" 
Cc: Brian King 
Cc: linux-s...@vger.kernel.org
Cc: linuxppc-...@lists.ozlabs.org
Signed-off-by: Lee Jones 
---
 drivers/scsi/ibmvscsi/ibmvfc.c | 29 ++---
 1 file changed, 18 insertions(+), 11 deletions(-)

diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c
index a38d9d5d90ba3..a7a9b647ea178 100644
--- a/drivers/scsi/ibmvscsi/ibmvfc.c
+++ b/drivers/scsi/ibmvscsi/ibmvfc.c
@@ -326,6 +326,7 @@ static const char *ibmvfc_get_cmd_error(u16 status, u16 
error)
 
 /**
  * ibmvfc_get_err_result - Find the scsi status to return for the fcp response
+ * @vhost:  ibmvfc host struct
  * @vfc_cmd:   ibmvfc command struct
  *
  * Return value:
@@ -650,8 +651,6 @@ static void ibmvfc_reinit_host(struct ibmvfc_host *vhost)
 /**
  * ibmvfc_del_tgt - Schedule cleanup and removal of the target
  * @tgt:   ibmvfc target struct
- * @job_step:  job step to perform
- *
  **/
 static void ibmvfc_del_tgt(struct ibmvfc_target *tgt)
 {
@@ -768,6 +767,8 @@ static int ibmvfc_send_crq_init_compl

[PATCH 35/36] scsi: ibmvscsi_tgt: ibmvscsi_tgt: Remove duplicate section 'NOTE'

2021-03-17 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c:136: warning: duplicate section name 
'NOTE'

Cc: Michael Cyr 
Cc: "James E.J. Bottomley" 
Cc: "Martin K. Petersen" 
Cc: Dave Boutcher 
Cc: Santiago Leon 
Cc: Linda Xie 
Cc: FUJITA Tomonori 
Cc: "Nicholas A. Bellinger" 
Cc: "Bryant G. Ly" 
Cc: linux-s...@vger.kernel.org
Cc: target-de...@vger.kernel.org
Signed-off-by: Lee Jones 
---
 drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c 
b/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c
index b65d50d03428a..41ac9477df7ad 100644
--- a/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c
+++ b/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c
@@ -128,10 +128,10 @@ static bool connection_broken(struct scsi_info *vscsi)
  * This function calls h_free_q then frees the interrupt bit etc.
  * It must release the lock before doing so because of the time it can take
  * for h_free_crq in PHYP
- * NOTE: the caller must make sure that state and or flags will prevent
- *  interrupt handler from scheduling work.
- * NOTE: anyone calling this function may need to set the CRQ_CLOSED flag
- *  we can't do it here, because we don't have the lock
+ * NOTE: * the caller must make sure that state and or flags will prevent
+ *interrupt handler from scheduling work.
+ *   * anyone calling this function may need to set the CRQ_CLOSED flag
+ *we can't do it here, because we don't have the lock
  *
  * EXECUTION ENVIRONMENT:
  * Process level
-- 
2.27.0



[PATCH 33/36] scsi: ibmvscsi: Fix a bunch of kernel-doc related issues

2021-03-17 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/scsi/ibmvscsi/ibmvscsi.c:143: warning: Function parameter or member 
'hostdata' not described in 'ibmvscsi_release_crq_queue'
 drivers/scsi/ibmvscsi/ibmvscsi.c:143: warning: Function parameter or member 
'max_requests' not described in 'ibmvscsi_release_crq_queue'
 drivers/scsi/ibmvscsi/ibmvscsi.c:143: warning: expecting prototype for 
release_crq_queue(). Prototype was for ibmvscsi_release_crq_queue() instead
 drivers/scsi/ibmvscsi/ibmvscsi.c:286: warning: expecting prototype for 
reset_crq_queue(). Prototype was for ibmvscsi_reset_crq_queue() instead
 drivers/scsi/ibmvscsi/ibmvscsi.c:328: warning: Function parameter or member 
'max_requests' not described in 'ibmvscsi_init_crq_queue'
 drivers/scsi/ibmvscsi/ibmvscsi.c:328: warning: expecting prototype for 
initialize_crq_queue(). Prototype was for ibmvscsi_init_crq_queue() instead
 drivers/scsi/ibmvscsi/ibmvscsi.c:414: warning: expecting prototype for 
reenable_crq_queue(). Prototype was for ibmvscsi_reenable_crq_queue() instead
 drivers/scsi/ibmvscsi/ibmvscsi.c:536: warning: expecting prototype for 
ibmvscsi_free(). Prototype was for free_event_struct() instead
 drivers/scsi/ibmvscsi/ibmvscsi.c:558: warning: expecting prototype for 
get_evt_struct(). Prototype was for get_event_struct() instead
 drivers/scsi/ibmvscsi/ibmvscsi.c:587: warning: Function parameter or member 
'evt_struct' not described in 'init_event_struct'
 drivers/scsi/ibmvscsi/ibmvscsi.c:587: warning: Excess function parameter 'evt' 
description in 'init_event_struct'
 drivers/scsi/ibmvscsi/ibmvscsi.c:608: warning: Function parameter or member 
'cmd' not described in 'set_srp_direction'
 drivers/scsi/ibmvscsi/ibmvscsi.c:608: warning: Function parameter or member 
'srp_cmd' not described in 'set_srp_direction'
 drivers/scsi/ibmvscsi/ibmvscsi.c:608: warning: Function parameter or member 
'numbuf' not described in 'set_srp_direction'
 drivers/scsi/ibmvscsi/ibmvscsi.c:641: warning: Function parameter or member 
'evt_struct' not described in 'unmap_cmd_data'
 drivers/scsi/ibmvscsi/ibmvscsi.c:683: warning: Function parameter or member 
'evt_struct' not described in 'map_sg_data'
 drivers/scsi/ibmvscsi/ibmvscsi.c:757: warning: Function parameter or member 
'evt_struct' not described in 'map_data_for_srp_cmd'
 drivers/scsi/ibmvscsi/ibmvscsi.c:783: warning: Function parameter or member 
'error_code' not described in 'purge_requests'
 drivers/scsi/ibmvscsi/ibmvscsi.c:846: warning: Function parameter or member 
't' not described in 'ibmvscsi_timeout'
 drivers/scsi/ibmvscsi/ibmvscsi.c:846: warning: Excess function parameter 
'evt_struct' description in 'ibmvscsi_timeout'
 drivers/scsi/ibmvscsi/ibmvscsi.c:1043: warning: Function parameter or member 
'cmnd' not described in 'ibmvscsi_queuecommand_lck'
 drivers/scsi/ibmvscsi/ibmvscsi.c:1043: warning: expecting prototype for 
ibmvscsi_queue(). Prototype was for ibmvscsi_queuecommand_lck() instead
 drivers/scsi/ibmvscsi/ibmvscsi.c:1351: warning: expecting prototype for 
init_host(). Prototype was for enable_fast_fail() instead
 drivers/scsi/ibmvscsi/ibmvscsi.c:1464: warning: Function parameter or member 
'hostdata' not described in 'init_adapter'
 drivers/scsi/ibmvscsi/ibmvscsi.c:1475: warning: Function parameter or member 
'evt_struct' not described in 'sync_completion'
 drivers/scsi/ibmvscsi/ibmvscsi.c:1488: warning: Function parameter or member 
'cmd' not described in 'ibmvscsi_eh_abort_handler'
 drivers/scsi/ibmvscsi/ibmvscsi.c:1488: warning: expecting prototype for 
ibmvscsi_abort(). Prototype was for ibmvscsi_eh_abort_handler() instead
 drivers/scsi/ibmvscsi/ibmvscsi.c:1627: warning: Function parameter or member 
'cmd' not described in 'ibmvscsi_eh_device_reset_handler'
 drivers/scsi/ibmvscsi/ibmvscsi.c:1893: warning: Excess function parameter 
'reason' description in 'ibmvscsi_change_queue_depth'
 drivers/scsi/ibmvscsi/ibmvscsi.c:2221: warning: Function parameter or member 
'vdev' not described in 'ibmvscsi_probe'
 drivers/scsi/ibmvscsi/ibmvscsi.c:2221: warning: Function parameter or member 
'id' not described in 'ibmvscsi_probe'
 drivers/scsi/ibmvscsi/ibmvscsi.c:2221: warning: expecting prototype for Called 
by bus code for each adapter(). Prototype was for ibmvscsi_probe() instead
 drivers/scsi/ibmvscsi/ibmvscsi.c:2381: warning: cannot understand function 
prototype: 'const struct vio_device_id ibmvscsi_device_table[] = '

Cc: Tyrel Datwyler 
Cc: Michael Ellerman 
Cc: Benjamin Herrenschmidt 
Cc: Paul Mackerras 
Cc: "James E.J. Bottomley&q

[PATCH 32/36] scsi: cxlflash: superpipe: Fix a few misnaming issues

2021-03-17 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/scsi/cxlflash/superpipe.c:38: warning: Function parameter or member 
'release' not described in 'marshal_rele_to_resize'
 drivers/scsi/cxlflash/superpipe.c:38: warning: Excess function parameter 
'rele' description in 'marshal_rele_to_resize'
 drivers/scsi/cxlflash/superpipe.c:51: warning: Function parameter or member 
'release' not described in 'marshal_det_to_rele'
 drivers/scsi/cxlflash/superpipe.c:51: warning: Excess function parameter 
'rele' description in 'marshal_det_to_rele'
 drivers/scsi/cxlflash/superpipe.c:528: warning: expecting prototype for 
rhte_format1(). Prototype was for rht_format1() instead

Cc: "Manoj N. Kumar" 
Cc: "Matthew R. Ochs" 
Cc: Uma Krishnan 
Cc: "James E.J. Bottomley" 
Cc: "Martin K. Petersen" 
Cc: linux-s...@vger.kernel.org
Signed-off-by: Lee Jones 
---
 drivers/scsi/cxlflash/superpipe.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/scsi/cxlflash/superpipe.c 
b/drivers/scsi/cxlflash/superpipe.c
index 5dddf67dfa24a..ee11ec340654a 100644
--- a/drivers/scsi/cxlflash/superpipe.c
+++ b/drivers/scsi/cxlflash/superpipe.c
@@ -30,7 +30,7 @@ struct cxlflash_global global;
 
 /**
  * marshal_rele_to_resize() - translate release to resize structure
- * @rele:  Source structure from which to translate/copy.
+ * @release:   Source structure from which to translate/copy.
  * @resize:Destination structure for the translate/copy.
  */
 static void marshal_rele_to_resize(struct dk_cxlflash_release *release,
@@ -44,7 +44,7 @@ static void marshal_rele_to_resize(struct dk_cxlflash_release 
*release,
 /**
  * marshal_det_to_rele() - translate detach to release structure
  * @detach:Destination structure for the translate/copy.
- * @rele:  Source structure from which to translate/copy.
+ * @release:   Source structure from which to translate/copy.
  */
 static void marshal_det_to_rele(struct dk_cxlflash_detach *detach,
struct dk_cxlflash_release *release)
@@ -517,7 +517,7 @@ void rhte_checkin(struct ctx_info *ctxi,
 }
 
 /**
- * rhte_format1() - populates a RHTE for format 1
+ * rht_format1() - populates a RHTE for format 1
  * @rhte:  RHTE to populate.
  * @lun_id:LUN ID of LUN associated with RHTE.
  * @perm:  Desired permissions for RHTE.
-- 
2.27.0



[PATCH 28/36] scsi: isci: port: Fix a bunch of kernel-doc issues

2021-03-17 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/scsi/isci/port.c:130: warning: Function parameter or member 'iport' 
not described in 'sci_port_get_properties'
 drivers/scsi/isci/port.c:130: warning: Function parameter or member 'prop' not 
described in 'sci_port_get_properties'
 drivers/scsi/isci/port.c:130: warning: Excess function parameter 'port' 
description in 'sci_port_get_properties'
 drivers/scsi/isci/port.c:130: warning: Excess function parameter 'properties' 
description in 'sci_port_get_properties'
 drivers/scsi/isci/port.c:243: warning: Function parameter or member 'isci_phy' 
not described in 'isci_port_link_down'
 drivers/scsi/isci/port.c:243: warning: Function parameter or member 
'isci_port' not described in 'isci_port_link_down'
 drivers/scsi/isci/port.c:243: warning: Excess function parameter 'phy' 
description in 'isci_port_link_down'
 drivers/scsi/isci/port.c:243: warning: Excess function parameter 'port' 
description in 'isci_port_link_down'
 drivers/scsi/isci/port.c:318: warning: Function parameter or member 
'isci_port' not described in 'isci_port_hard_reset_complete'
 drivers/scsi/isci/port.c:318: warning: Excess function parameter 'port' 
description in 'isci_port_hard_reset_complete'
 drivers/scsi/isci/port.c:398: warning: Cannot understand  *
 drivers/scsi/isci/port.c:544: warning: Function parameter or member 'iport' 
not described in 'sci_port_construct_dummy_rnc'
 drivers/scsi/isci/port.c:544: warning: Excess function parameter 'sci_port' 
description in 'sci_port_construct_dummy_rnc'
 drivers/scsi/isci/port.c:692: warning: Function parameter or member 'iport' 
not described in 'sci_port_general_link_up_handler'
 drivers/scsi/isci/port.c:692: warning: Function parameter or member 'iphy' not 
described in 'sci_port_general_link_up_handler'
 drivers/scsi/isci/port.c:692: warning: Excess function parameter 'sci_port' 
description in 'sci_port_general_link_up_handler'
 drivers/scsi/isci/port.c:692: warning: Excess function parameter 'sci_phy' 
description in 'sci_port_general_link_up_handler'
 drivers/scsi/isci/port.c:719: warning: wrong kernel-doc identifier on line:
 drivers/scsi/isci/port.c:756: warning: Function parameter or member 'iport' 
not described in 'sci_port_link_detected'
 drivers/scsi/isci/port.c:756: warning: Function parameter or member 'iphy' not 
described in 'sci_port_link_detected'
 drivers/scsi/isci/port.c:756: warning: expecting prototype for if the(). 
Prototype was for sci_port_link_detected() instead
 drivers/scsi/isci/port.c:821: warning: wrong kernel-doc identifier on line:
 drivers/scsi/isci/port.c:885: warning: Function parameter or member 'iport' 
not described in 'sci_port_post_dummy_request'
 drivers/scsi/isci/port.c:885: warning: Excess function parameter 'sci_port' 
description in 'sci_port_post_dummy_request'
 drivers/scsi/isci/port.c:909: warning: Function parameter or member 'iport' 
not described in 'sci_port_abort_dummy_request'
 drivers/scsi/isci/port.c:909: warning: expecting prototype for This will alow 
the hardware to(). Prototype was for sci_port_abort_dummy_request() instead
 drivers/scsi/isci/port.c:926: warning: Cannot understand  *
 drivers/scsi/isci/port.c:1017: warning: Cannot understand  *
 drivers/scsi/isci/port.c:1199: warning: Function parameter or member 'iport' 
not described in 'sci_port_add_phy'
 drivers/scsi/isci/port.c:1199: warning: Function parameter or member 'iphy' 
not described in 'sci_port_add_phy'
 drivers/scsi/isci/port.c:1199: warning: Excess function parameter 'sci_port' 
description in 'sci_port_add_phy'
 drivers/scsi/isci/port.c:1199: warning: Excess function parameter 'sci_phy' 
description in 'sci_port_add_phy'
 drivers/scsi/isci/port.c:1270: warning: Function parameter or member 'iport' 
not described in 'sci_port_remove_phy'
 drivers/scsi/isci/port.c:1270: warning: Function parameter or member 'iphy' 
not described in 'sci_port_remove_phy'
 drivers/scsi/isci/port.c:1270: warning: Excess function parameter 'sci_port' 
description in 'sci_port_remove_phy'
 drivers/scsi/isci/port.c:1270: warning: Excess function parameter 'sci_phy' 
description in 'sci_port_remove_phy'

Cc: Artur Paszkiewicz 
Cc: "James E.J. Bottomley" 
Cc: "Martin K. Petersen" 
Cc: linux-s...@vger.kernel.org
Signed-off-by: Lee Jones 
---
 drivers/scsi/isci/port.c | 58 +---
 1 file changed, 30 insertio

[PATCH 29/36] scsi: isci: remote_node_context: Demote kernel-doc abuse

2021-03-17 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/scsi/isci/remote_node_context.c:206: warning: Function parameter or 
member 'rnc' not described in 'sci_remote_node_context_notify_user'
 drivers/scsi/isci/remote_node_context.c:206: warning: expecting prototype for 
This method just calls the user callback function and then resets the(). 
Prototype was for sci_remote_node_context_notify_user() instead

Cc: Artur Paszkiewicz 
Cc: "James E.J. Bottomley" 
Cc: "Martin K. Petersen" 
Cc: linux-s...@vger.kernel.org
Signed-off-by: Lee Jones 
---
 drivers/scsi/isci/remote_node_context.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/isci/remote_node_context.c 
b/drivers/scsi/isci/remote_node_context.c
index 7a576b995afae..77ba0291134e2 100644
--- a/drivers/scsi/isci/remote_node_context.c
+++ b/drivers/scsi/isci/remote_node_context.c
@@ -197,7 +197,7 @@ static void sci_remote_node_context_setup_to_destroy(
wake_up(&ihost->eventq);
 }
 
-/**
+/*
  * This method just calls the user callback function and then resets the
  * callback.
  */
-- 
2.27.0



[PATCH 31/36] scsi: cxlflash: main: Fix a little do-rot

2021-03-17 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/scsi/cxlflash/main.c:1369: warning: Function parameter or member 'hwq' 
not described in 'process_hrrq'
 drivers/scsi/cxlflash/main.c:1369: warning: Excess function parameter 'afu' 
description in 'process_hrrq'
 drivers/scsi/cxlflash/main.c:2005: warning: Function parameter or member 
'index' not described in 'init_mc'
 drivers/scsi/cxlflash/main.c:3303: warning: Function parameter or member 
'lunprov' not described in 'cxlflash_lun_provision'
 drivers/scsi/cxlflash/main.c:3303: warning: Excess function parameter 'arg' 
description in 'cxlflash_lun_provision'
 drivers/scsi/cxlflash/main.c:3397: warning: Function parameter or member 
'afu_dbg' not described in 'cxlflash_afu_debug'
 drivers/scsi/cxlflash/main.c:3397: warning: Excess function parameter 'arg' 
description in 'cxlflash_afu_debug'

Cc: "Manoj N. Kumar" 
Cc: "Matthew R. Ochs" 
Cc: Uma Krishnan 
Cc: "James E.J. Bottomley" 
Cc: "Martin K. Petersen" 
Cc: linux-s...@vger.kernel.org
Signed-off-by: Lee Jones 
---
 drivers/scsi/cxlflash/main.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/scsi/cxlflash/main.c b/drivers/scsi/cxlflash/main.c
index e72440d919d2a..dc36531d589e2 100644
--- a/drivers/scsi/cxlflash/main.c
+++ b/drivers/scsi/cxlflash/main.c
@@ -1357,7 +1357,7 @@ static irqreturn_t cxlflash_sync_err_irq(int irq, void 
*data)
 
 /**
  * process_hrrq() - process the read-response queue
- * @afu:   AFU associated with the host.
+ * @hwq:   HWQ associated with the host.
  * @doneq: Queue of commands harvested from the RRQ.
  * @budget:Threshold of RRQ entries to process.
  *
@@ -1997,7 +1997,7 @@ static enum undo_level init_intr(struct cxlflash_cfg *cfg,
 /**
  * init_mc() - create and register as the master context
  * @cfg:   Internal structure associated with the host.
- * index:  HWQ Index of the master context.
+ * @index: HWQ Index of the master context.
  *
  * Return: 0 on success, -errno on failure
  */
@@ -3294,7 +3294,7 @@ static char *decode_hioctl(unsigned int cmd)
 /**
  * cxlflash_lun_provision() - host LUN provisioning handler
  * @cfg:   Internal structure associated with the host.
- * @arg:   Kernel copy of userspace ioctl data structure.
+ * @lunprov:   Kernel copy of userspace ioctl data structure.
  *
  * Return: 0 on success, -errno on failure
  */
@@ -3385,7 +3385,7 @@ static int cxlflash_lun_provision(struct cxlflash_cfg 
*cfg,
 /**
  * cxlflash_afu_debug() - host AFU debug handler
  * @cfg:   Internal structure associated with the host.
- * @arg:   Kernel copy of userspace ioctl data structure.
+ * @afu_dbg:   Kernel copy of userspace ioctl data structure.
  *
  * For debug requests requiring a data buffer, always provide an aligned
  * (cache line) buffer to the AFU to appease any alignment requirements.
-- 
2.27.0



[PATCH 30/36] scsi: isci: remote_node_table: Provide some missing params and remove others

2021-03-17 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/scsi/isci/remote_node_table.c:113: warning: Function parameter or 
member 'group_table_index' not described in 
'sci_remote_node_table_clear_group_index'
 drivers/scsi/isci/remote_node_table.c:113: warning: Excess function parameter 
'set_index' description in 'sci_remote_node_table_clear_group_index'
 drivers/scsi/isci/remote_node_table.c:262: warning: Function parameter or 
member 'group_index' not described in 'sci_remote_node_table_set_group'
 drivers/scsi/isci/remote_node_table.c:383: warning: Function parameter or 
member 'group_table_index' not described in 
'sci_remote_node_table_allocate_single_remote_node'
 drivers/scsi/isci/remote_node_table.c:383: warning: Excess function parameter 
'table_index' description in 'sci_remote_node_table_allocate_single_remote_node'
 drivers/scsi/isci/remote_node_table.c:516: warning: Function parameter or 
member 'remote_node_index' not described in 
'sci_remote_node_table_release_single_remote_node'
 drivers/scsi/isci/remote_node_table.c:562: warning: Function parameter or 
member 'remote_node_index' not described in 
'sci_remote_node_table_release_triple_remote_node'
 drivers/scsi/isci/remote_node_table.c:588: warning: Function parameter or 
member 'remote_node_index' not described in 
'sci_remote_node_table_release_remote_node_index'

Cc: Artur Paszkiewicz 
Cc: "James E.J. Bottomley" 
Cc: "Martin K. Petersen" 
Cc: linux-s...@vger.kernel.org
Signed-off-by: Lee Jones 
---
 drivers/scsi/isci/remote_node_table.c | 13 +++--
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/scsi/isci/remote_node_table.c 
b/drivers/scsi/isci/remote_node_table.c
index 1036ab936626e..1bcaf528c1c99 100644
--- a/drivers/scsi/isci/remote_node_table.c
+++ b/drivers/scsi/isci/remote_node_table.c
@@ -99,7 +99,7 @@ static u32 sci_remote_node_table_get_group_index(
  * sci_remote_node_table_clear_group_index()
  * @remote_node_table: This the remote node table in which to clear the
  *selector.
- * @set_index: This is the remote node selector in which the change will be
+ * @group_table_index: This is the remote node selector in which the change 
will be
  *made.
  * @group_index: This is the bit index in the table to be modified.
  *
@@ -250,9 +250,8 @@ static void sci_remote_node_table_clear_group(
remote_node_table->available_remote_nodes[dword_location] = dword_value;
 }
 
-/**
+/*
  * sci_remote_node_table_set_group()
- * @remote_node_table:
  *
  * THis method sets an entire remote node group in the remote node table.
  */
@@ -366,7 +365,7 @@ void sci_remote_node_table_initialize(
  * sci_remote_node_table_allocate_single_remote_node()
  * @remote_node_table: The remote node table from which to allocate a
  *remote node.
- * @table_index: The group index that is to be used for the search.
+ * @group_table_index: The group index that is to be used for the search.
  *
  * This method will allocate a single RNi from the remote node table.  The
  * table index will determine from which remote node group table to search.
@@ -426,7 +425,7 @@ static u16 
sci_remote_node_table_allocate_single_remote_node(
  * sci_remote_node_table_allocate_triple_remote_node()
  * @remote_node_table: This is the remote node table from which to allocate the
  *remote node entries.
- * @group_table_index: THis is the group table index which must equal two (2)
+ * @group_table_index: This is the group table index which must equal two (2)
  *for this operation.
  *
  * This method will allocate three consecutive remote node context entries. If
@@ -506,7 +505,7 @@ u16 sci_remote_node_table_allocate_remote_node(
  * sci_remote_node_table_release_single_remote_node()
  * @remote_node_table: This is the remote node table from which the remote node
  *release is to take place.
- *
+ * @remote_node_index: This is the remote node index that is being released.
  * This method will free a single remote node index back to the remote node
  * table.  This routine will update the remote node groups
  */
@@ -552,6 +551,7 @@ static void 
sci_remote_node_table_release_single_remote_node(
  * sci_remote_node_table_release_triple_remote_node()
  * @remote_node_table: This is the remote node table to which the remote node
  *index is to be freed.
+ * @remote_node_index: This is the remote node index that is being released.
  *
  * This method will release a group of three consecutive remote nodes back to
  * the free remote nodes.
@@ -577,6 +577,7 @@ static void 
sci_remote_node_table_release_triple_remote_node(
  *to be freed.
  * @remote_node_count: This is the count of consecutive remote nodes that are
  *to be freed.
+ * @remote_node_index: This is the remote node index that is being released.
  *
  * This method will release the remote node index back into the remote node
  * table free pool.
-- 
2.27.0



[PATCH 26/36] scsi: isci: remote_device: Fix a bunch of doc-rot issues

2021-03-17 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/scsi/isci/remote_device.c:299: warning: Function parameter or member 
'ihost' not described in 'isci_remote_device_not_ready'
 drivers/scsi/isci/remote_device.c:299: warning: Function parameter or member 
'idev' not described in 'isci_remote_device_not_ready'
 drivers/scsi/isci/remote_device.c:299: warning: Function parameter or member 
'reason' not described in 'isci_remote_device_not_ready'
 drivers/scsi/isci/remote_device.c:299: warning: Excess function parameter 
'isci_host' description in 'isci_remote_device_not_ready'
 drivers/scsi/isci/remote_device.c:299: warning: Excess function parameter 
'isci_device' description in 'isci_remote_device_not_ready'
 drivers/scsi/isci/remote_device.c:1015: warning: Function parameter or member 
'idev' not described in 'sci_remote_device_destruct'
 drivers/scsi/isci/remote_device.c:1015: warning: Excess function parameter 
'remote_device' description in 'sci_remote_device_destruct'
 drivers/scsi/isci/remote_device.c:1249: warning: Function parameter or member 
'iport' not described in 'sci_remote_device_construct'
 drivers/scsi/isci/remote_device.c:1249: warning: Function parameter or member 
'idev' not described in 'sci_remote_device_construct'
 drivers/scsi/isci/remote_device.c:1249: warning: Excess function parameter 
'sci_port' description in 'sci_remote_device_construct'
 drivers/scsi/isci/remote_device.c:1249: warning: Excess function parameter 
'sci_dev' description in 'sci_remote_device_construct'
 drivers/scsi/isci/remote_device.c:1275: warning: Function parameter or member 
'iport' not described in 'sci_remote_device_da_construct'
 drivers/scsi/isci/remote_device.c:1275: warning: Function parameter or member 
'idev' not described in 'sci_remote_device_da_construct'
 drivers/scsi/isci/remote_device.c:1311: warning: Function parameter or member 
'iport' not described in 'sci_remote_device_ea_construct'
 drivers/scsi/isci/remote_device.c:1311: warning: Function parameter or member 
'idev' not described in 'sci_remote_device_ea_construct'
 drivers/scsi/isci/remote_device.c:1453: warning: Function parameter or member 
'idev' not described in 'sci_remote_device_start'
 drivers/scsi/isci/remote_device.c:1453: warning: Excess function parameter 
'remote_device' description in 'sci_remote_device_start'
 drivers/scsi/isci/remote_device.c:1513: warning: Function parameter or member 
'ihost' not described in 'isci_remote_device_alloc'
 drivers/scsi/isci/remote_device.c:1513: warning: Function parameter or member 
'iport' not described in 'isci_remote_device_alloc'
 drivers/scsi/isci/remote_device.c:1513: warning: expecting prototype for This 
function builds the isci_remote_device when a libsas dev_found message(). 
Prototype was for isci_remote_device_alloc() instead
 drivers/scsi/isci/remote_device.c:1558: warning: Function parameter or member 
'ihost' not described in 'isci_remote_device_stop'
 drivers/scsi/isci/remote_device.c:1558: warning: Function parameter or member 
'idev' not described in 'isci_remote_device_stop'
 drivers/scsi/isci/remote_device.c:1558: warning: Excess function parameter 
'isci_host' description in 'isci_remote_device_stop'
 drivers/scsi/isci/remote_device.c:1558: warning: Excess function parameter 
'isci_device' description in 'isci_remote_device_stop'
 drivers/scsi/isci/remote_device.c:1592: warning: Function parameter or member 
'dev' not described in 'isci_remote_device_gone'
 drivers/scsi/isci/remote_device.c:1592: warning: Excess function parameter 
'domain_device' description in 'isci_remote_device_gone'
 drivers/scsi/isci/remote_device.c:1614: warning: Function parameter or member 
'dev' not described in 'isci_remote_device_found'
 drivers/scsi/isci/remote_device.c:1614: warning: Excess function parameter 
'domain_device' description in 'isci_remote_device_found'

Cc: Artur Paszkiewicz 
Cc: "James E.J. Bottomley" 
Cc: "Martin K. Petersen" 
Cc: linux-s...@vger.kernel.org
Signed-off-by: Lee Jones 
---
 drivers/scsi/isci/remote_device.c | 31 ---
 1 file changed, 16 insertions(+), 15 deletions(-)

diff --git a/drivers/scsi/isci/remote_device.c 
b/drivers/scsi/isci/remote_device.c
index b1276f7e49c89..866950a02965d 100644
--- a/drivers/scsi/isci/remote_device.c
+++ b/drivers/scsi/isci/remote_device.c
@@ -288,8 +288,9 @@ enum sci_status isci_remote_device_terminate_requests(
 * i

[PATCH 27/36] scsi: isci: request: Fix doc-rot issue relating to 'ireq' param

2021-03-17 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/scsi/isci/request.c:496: warning: Function parameter or member 'ireq' 
not described in 'scu_sata_request_construct_task_context'
 drivers/scsi/isci/request.c:496: warning: Excess function parameter 'sci_req' 
description in 'scu_sata_request_construct_task_context'

Cc: Artur Paszkiewicz 
Cc: "James E.J. Bottomley" 
Cc: "Martin K. Petersen" 
Cc: linux-s...@vger.kernel.org
Signed-off-by: Lee Jones 
---
 drivers/scsi/isci/request.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/isci/request.c b/drivers/scsi/isci/request.c
index 49ab2555c0cdf..593b38c59924a 100644
--- a/drivers/scsi/isci/request.c
+++ b/drivers/scsi/isci/request.c
@@ -481,7 +481,7 @@ static void 
scu_ssp_task_request_construct_task_context(struct isci_request *ire
  * scu_sata_request_construct_task_context()
  * This method is will fill in the SCU Task Context for any type of SATA
  *request.  This is called from the various SATA constructors.
- * @sci_req: The general IO request object which is to be used in
+ * @ireq: The general IO request object which is to be used in
  *constructing the SCU task context.
  * @task_context: The buffer pointer for the SCU task context which is being
  *constructed.
-- 
2.27.0



[PATCH 24/36] scsi: isci: remote_node_context: Fix one function header and demote a couple more

2021-03-17 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/scsi/isci/remote_node_context.c:77: warning: Cannot understand  *
 drivers/scsi/isci/remote_node_context.c:167: warning: Cannot understand  *
 drivers/scsi/isci/remote_node_context.c:206: warning: Cannot understand  *

Cc: Artur Paszkiewicz 
Cc: "James E.J. Bottomley" 
Cc: "Martin K. Petersen" 
Cc: linux-s...@vger.kernel.org
Signed-off-by: Lee Jones 
---
 drivers/scsi/isci/remote_node_context.c | 11 ++-
 1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/drivers/scsi/isci/remote_node_context.c 
b/drivers/scsi/isci/remote_node_context.c
index 68333f523b351..7a576b995afae 100644
--- a/drivers/scsi/isci/remote_node_context.c
+++ b/drivers/scsi/isci/remote_node_context.c
@@ -74,7 +74,7 @@ const char *rnc_state_name(enum 
scis_sds_remote_node_context_states state)
 #undef C
 
 /**
- *
+ * sci_remote_node_context_is_ready()
  * @sci_rnc: The state of the remote node context object to check.
  *
  * This method will return true if the remote node context is in a READY state
@@ -163,12 +163,7 @@ static void 
sci_remote_node_context_construct_buffer(struct sci_remote_node_cont
rnc->ssp.oaf_source_zone_group = 0;
rnc->ssp.oaf_more_compatibility_features = 0;
 }
-/**
- *
- * @sci_rnc:
- * @callback:
- * @callback_parameter:
- *
+/*
  * This method will setup the remote node context object so it will transition
  * to its ready state.  If the remote node context is already setup to
  * transition to its final state then this function does nothing. none
@@ -203,8 +198,6 @@ static void sci_remote_node_context_setup_to_destroy(
 }
 
 /**
- *
- *
  * This method just calls the user callback function and then resets the
  * callback.
  */
-- 
2.27.0



[PATCH 23/36] scsi: isci: remote_node_table: Fix a bunch of kernel-doc misdemeanours

2021-03-17 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/scsi/isci/remote_node_table.c:66: warning: Incorrect use of kernel-doc 
format:  *
 drivers/scsi/isci/remote_node_table.c:80: warning: Function parameter or 
member 'remote_node_table' not described in 
'sci_remote_node_table_get_group_index'
 drivers/scsi/isci/remote_node_table.c:80: warning: Function parameter or 
member 'group_table_index' not described in 
'sci_remote_node_table_get_group_index'
 drivers/scsi/isci/remote_node_table.c:80: warning: expecting prototype for 
This file contains the implementation of the SCIC_SDS_REMOTE_NODE_TABLE(). 
Prototype was for sci_remote_node_table_get_group_index() instead
 drivers/scsi/isci/remote_node_table.c:101: warning: Cannot understand  *
 drivers/scsi/isci/remote_node_table.c:131: warning: Cannot understand  *
 drivers/scsi/isci/remote_node_table.c:161: warning: Cannot understand  *
 drivers/scsi/isci/remote_node_table.c:194: warning: Cannot understand  *
 drivers/scsi/isci/remote_node_table.c:227: warning: Cannot understand  *
 drivers/scsi/isci/remote_node_table.c:256: warning: Cannot understand  *
 drivers/scsi/isci/remote_node_table.c:283: warning: Cannot understand  *
 drivers/scsi/isci/remote_node_table.c:310: warning: Cannot understand  *
 drivers/scsi/isci/remote_node_table.c:368: warning: Cannot understand  *
 drivers/scsi/isci/remote_node_table.c:428: warning: Cannot understand  *
 drivers/scsi/isci/remote_node_table.c:465: warning: Cannot understand  *
 drivers/scsi/isci/remote_node_table.c:508: warning: Cannot understand  *
 drivers/scsi/isci/remote_node_table.c:553: warning: Cannot understand  *
 drivers/scsi/isci/remote_node_table.c:576: warning: Cannot understand  *

Cc: Artur Paszkiewicz 
Cc: "James E.J. Bottomley" 
Cc: "Martin K. Petersen" 
Cc: linux-s...@vger.kernel.org
Signed-off-by: Lee Jones 
---
 drivers/scsi/isci/remote_node_table.c | 51 +--
 1 file changed, 25 insertions(+), 26 deletions(-)

diff --git a/drivers/scsi/isci/remote_node_table.c 
b/drivers/scsi/isci/remote_node_table.c
index 301b3141945ec..1036ab936626e 100644
--- a/drivers/scsi/isci/remote_node_table.c
+++ b/drivers/scsi/isci/remote_node_table.c
@@ -53,17 +53,15 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-/**
+/*
  * This file contains the implementation of the SCIC_SDS_REMOTE_NODE_TABLE
  *public, protected, and private methods.
- *
- *
  */
 #include "remote_node_table.h"
 #include "remote_node_context.h"
 
 /**
- *
+ * sci_remote_node_table_get_group_index()
  * @remote_node_table: This is the remote node index table from which the
  *selection will be made.
  * @group_table_index: This is the index to the group table from which to
@@ -98,8 +96,8 @@ static u32 sci_remote_node_table_get_group_index(
 }
 
 /**
- *
- * @out]: remote_node_table This the remote node table in which to clear the
+ * sci_remote_node_table_clear_group_index()
+ * @remote_node_table: This the remote node table in which to clear the
  *selector.
  * @set_index: This is the remote node selector in which the change will be
  *made.
@@ -128,8 +126,8 @@ static void sci_remote_node_table_clear_group_index(
 }
 
 /**
- *
- * @out]: remote_node_table This the remote node table in which to set the
+ * sci_remote_node_table_set_group_index()
+ * @remote_node_table: This the remote node table in which to set the
  *selector.
  * @group_table_index: This is the remote node selector in which the change
  *will be made.
@@ -158,8 +156,8 @@ static void sci_remote_node_table_set_group_index(
 }
 
 /**
- *
- * @out]: remote_node_table This is the remote node table in which to modify
+ * sci_remote_node_table_set_node_index()
+ * @remote_node_table: This is the remote node table in which to modify
  *the remote node availability.
  * @remote_node_index: This is the remote node index that is being returned to
  *the table.
@@ -191,8 +189,8 @@ static void sci_remote_node_table_set_node_index(
 }
 
 /**
- *
- * @out]: remote_node_table This is the remote node table from which to clear
+ * sci_remote_node_table_clear_node_index()
+ * @remote_node_table: This is the remote node table from which to clear
  *the available remote node bit.
  * @remote_node_index: This is the remote node index which is to be cleared
  *from the table.
@@ -224,8 +222,8 @@ static void sci_remote_node_table_clear_node_index(
 }
 
 /**
- *
- * @out]: remote_node_table The remote node table from which the slot will be
+ * sci_remote_node_table_clear_group()
+ * @remote_node_table: The remote node table from which the slot will be
  *cleared.
  * @group_index: The index for the slot that is to be cleared.
  *
@@ -253,7 +251,7 @@ static void sci_remote_node_table_clear_group(
 }
 
 /**
- *
+ * sci_remote_node_table_set_group()
  * @remote_node_table:
  *
  * THis method sets an en

[PATCH 25/36] scsi: isci: port_config: Fix a bunch of doc-rot and demote abuses

2021-03-17 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/scsi/isci/port_config.c:76: warning: Cannot understand  *
 drivers/scsi/isci/port_config.c:105: warning: Cannot understand  *
 drivers/scsi/isci/port_config.c:148: warning: Cannot understand  *
 drivers/scsi/isci/port_config.c:376: warning: Cannot understand  *
 drivers/scsi/isci/port_config.c:607: warning: Function parameter or member 
'ihost' not described in 'sci_apc_agent_link_up'
 drivers/scsi/isci/port_config.c:607: warning: Function parameter or member 
'port_agent' not described in 'sci_apc_agent_link_up'
 drivers/scsi/isci/port_config.c:607: warning: Function parameter or member 
'iport' not described in 'sci_apc_agent_link_up'
 drivers/scsi/isci/port_config.c:607: warning: Function parameter or member 
'iphy' not described in 'sci_apc_agent_link_up'
 drivers/scsi/isci/port_config.c:607: warning: Excess function parameter 'scic' 
description in 'sci_apc_agent_link_up'
 drivers/scsi/isci/port_config.c:607: warning: Excess function parameter 
'sci_port' description in 'sci_apc_agent_link_up'
 drivers/scsi/isci/port_config.c:607: warning: Excess function parameter 
'sci_phy' description in 'sci_apc_agent_link_up'
 drivers/scsi/isci/port_config.c:623: warning: Cannot understand  *
 drivers/scsi/isci/port_config.c:701: warning: Cannot understand  *

Cc: Artur Paszkiewicz 
Cc: "James E.J. Bottomley" 
Cc: "Martin K. Petersen" 
Cc: linux-s...@vger.kernel.org
Signed-off-by: Lee Jones 
---
 drivers/scsi/isci/port_config.c | 37 +
 1 file changed, 19 insertions(+), 18 deletions(-)

diff --git a/drivers/scsi/isci/port_config.c b/drivers/scsi/isci/port_config.c
index b1c1975055792..c382a257b51b9 100644
--- a/drivers/scsi/isci/port_config.c
+++ b/drivers/scsi/isci/port_config.c
@@ -73,7 +73,7 @@ enum SCIC_SDS_APC_ACTIVITY {
  * 
** 
*/
 
 /**
- *
+ * sci_sas_address_compare()
  * @address_one: A SAS Address to be compared.
  * @address_two: A SAS Address to be compared.
  *
@@ -102,9 +102,9 @@ static s32 sci_sas_address_compare(
 }
 
 /**
- *
- * @controller: The controller object used for the port search.
- * @phy: The phy object to match.
+ * sci_port_configuration_agent_find_port()
+ * @ihost: The controller object used for the port search.
+ * @iphy: The phy object to match.
  *
  * This routine will find a matching port for the phy.  This means that the
  * port and phy both have the same broadcast sas address and same received sas
@@ -145,8 +145,8 @@ static struct isci_port 
*sci_port_configuration_agent_find_port(
 }
 
 /**
- *
- * @controller: This is the controller object that contains the port agent
+ * sci_port_configuration_agent_validate_ports()
+ * @ihost: This is the controller object that contains the port agent
  * @port_agent: This is the port configuration agent for the controller.
  *
  * This routine will validate the port configuration is correct for the SCU
@@ -373,15 +373,16 @@ static void sci_mpc_agent_link_up(struct isci_host *ihost,
 }
 
 /**
- *
- * @controller: This is the controller object that receives the link down
+ * sci_mpc_agent_link_down()
+ * @ihost: This is the controller object that receives the link down
  *notification.
- * @port: This is the port object associated with the phy.  If the is no
+ * @port_agent: This is the port configuration agent for the controller.
+ * @iport: This is the port object associated with the phy.  If the is no
  *associated port this is an NULL.  The port is an invalid
  *handle only if the phy was never port of this port.  This happens when
  *the phy is not broadcasting the same SAS address as the other phys in the
  *assigned port.
- * @phy: This is the phy object which has gone link down.
+ * @iphy: This is the phy object which has gone link down.
  *
  * This function handles the manual port configuration link down notifications.
  * Since all ports and phys are associated at initialization time we just turn
@@ -590,11 +591,12 @@ static void sci_apc_agent_configure_ports(struct 
isci_host *ihost,
 
 /**
  * sci_apc_agent_link_up - handle apc link up events
- * @scic: This is the controller object that receives the link up
+ * @ihost: This is the controller object that receives the link up
  *notification.
- * @sci_port: This is the port object associated with the phy.  If the is no
+ * @port_agent: This is the port configuration agent for the controller.
+ * @iport: This is the port object associated with the phy.  If the is no
  *associated port this is an NULL.
- * @sci_phy: This is the phy object which has gone link up.
+ * @iphy: This is the phy object which has gone link up.
  *
  * This method handles the automatic port configuration for link up
  * notifications. Is it possible t

[PATCH 07/36] scsi: aic94xx: aic94xx_dump: Correct misspelling of function asd_dump_seq_state()

2021-03-17 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/scsi/aic94xx/aic94xx_dump.c:729: warning: expecting prototype for 
ads_dump_seq_state(). Prototype was for asd_dump_seq_state() instead

Cc: "James E.J. Bottomley" 
Cc: "Martin K. Petersen" 
Cc: Lee Jones 
Cc: David Chaw 
Cc: Luben Tuikov 
Cc: linux-s...@vger.kernel.org
Signed-off-by: Lee Jones 
---
 drivers/scsi/aic94xx/aic94xx_dump.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/aic94xx/aic94xx_dump.c 
b/drivers/scsi/aic94xx/aic94xx_dump.c
index 47a663a39dcce..552f1913e95ec 100644
--- a/drivers/scsi/aic94xx/aic94xx_dump.c
+++ b/drivers/scsi/aic94xx/aic94xx_dump.c
@@ -721,7 +721,7 @@ static void asd_dump_lseq_state(struct asd_ha_struct 
*asd_ha, int lseq)
 }
 
 /**
- * ads_dump_seq_state -- dump CSEQ and LSEQ states
+ * asd_dump_seq_state -- dump CSEQ and LSEQ states
  * @asd_ha: pointer to host adapter structure
  * @lseq_mask: mask of LSEQs of interest
  */
-- 
2.27.0



[PATCH 15/36] scsi: be2iscsi: be_main: Demote incomplete/non-conformant kernel-doc header

2021-03-17 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/scsi/be2iscsi/be_main.c:4937: warning: Function parameter or member 
'data' not described in 'beiscsi_show_boot_tgt_info'
 drivers/scsi/be2iscsi/be_main.c:4937: warning: Function parameter or member 
'type' not described in 'beiscsi_show_boot_tgt_info'
 drivers/scsi/be2iscsi/be_main.c:4937: warning: Function parameter or member 
'buf' not described in 'beiscsi_show_boot_tgt_info'

Cc: Subbu Seetharaman 
Cc: Ketan Mukadam 
Cc: Jitendra Bhivare 
Cc: "James E.J. Bottomley" 
Cc: "Martin K. Petersen" 
Cc: linux-driv...@broadcom.com
Cc: linux-s...@vger.kernel.org
Signed-off-by: Lee Jones 
---
 drivers/scsi/be2iscsi/be_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c
index eac67878b2b1b..22cf7f4b8d8c8 100644
--- a/drivers/scsi/be2iscsi/be_main.c
+++ b/drivers/scsi/be2iscsi/be_main.c
@@ -4927,7 +4927,7 @@ void beiscsi_start_boot_work(struct beiscsi_hba *phba, 
unsigned int s_handle)
 }
 
 #define BEISCSI_SYSFS_ISCSI_BOOT_FLAGS 3
-/**
+/*
  * beiscsi_show_boot_tgt_info()
  * Boot flag info for iscsi-utilities
  * Bit 0 Block valid flag
-- 
2.27.0



[PATCH 22/36] scsi: isci: task: Demote non-conformant header and remove superfluous param

2021-03-17 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/scsi/isci/task.c:383: warning: Function parameter or member 
'isci_host' not described in 'isci_task_send_lu_reset_sas'
 drivers/scsi/isci/task.c:383: warning: Function parameter or member 
'isci_device' not described in 'isci_task_send_lu_reset_sas'
 drivers/scsi/isci/task.c:677: warning: Excess function parameter 'lun' 
description in 'isci_task_query_task'

Cc: Artur Paszkiewicz 
Cc: "James E.J. Bottomley" 
Cc: "Martin K. Petersen" 
Cc: linux-s...@vger.kernel.org
Signed-off-by: Lee Jones 
---
 drivers/scsi/isci/task.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/scsi/isci/task.c b/drivers/scsi/isci/task.c
index 26fa1a4d1e6bf..62062ed6cd9ad 100644
--- a/drivers/scsi/isci/task.c
+++ b/drivers/scsi/isci/task.c
@@ -369,7 +369,7 @@ static void isci_task_build_abort_task_tmf(struct isci_tmf 
*tmf,
tmf->io_tag = old_request->io_tag;
 }
 
-/**
+/*
  * isci_task_send_lu_reset_sas() - This function is called by of the SAS Domain
  *Template functions.
  * @lun: This parameter specifies the lun to be reset.
@@ -668,7 +668,6 @@ int isci_task_clear_task_set(
  *returned, libsas turns this into a LUN reset; when FUNC_FAILED is
  *returned, libsas will turn this into a target reset
  * @task: This parameter specifies the sas task being queried.
- * @lun: This parameter specifies the lun associated with this request.
  *
  * status, zero indicates success.
  */
-- 
2.27.0



[PATCH 19/36] scsi: isci: phy: Provide function name and demote non-conforming header

2021-03-17 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/scsi/isci/phy.c:354: warning: Function parameter or member 'iphy' not 
described in 'phy_get_non_dummy_port'
 drivers/scsi/isci/phy.c:354: warning: expecting prototype for If the phy is(). 
Prototype was for phy_get_non_dummy_port() instead
 drivers/scsi/isci/phy.c:371: warning: Function parameter or member 'iphy' not 
described in 'sci_phy_set_port'
 drivers/scsi/isci/phy.c:371: warning: Function parameter or member 'iport' not 
described in 'sci_phy_set_port'

Cc: Artur Paszkiewicz 
Cc: "James E.J. Bottomley" 
Cc: "Martin K. Petersen" 
Cc: linux-s...@vger.kernel.org
Signed-off-by: Lee Jones 
---
 drivers/scsi/isci/phy.c | 13 ++---
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/drivers/scsi/isci/phy.c b/drivers/scsi/isci/phy.c
index 7ca7621f77479..aa8787343e831 100644
--- a/drivers/scsi/isci/phy.c
+++ b/drivers/scsi/isci/phy.c
@@ -339,10 +339,11 @@ static void phy_sata_timeout(struct timer_list *t)
 }
 
 /**
- * This method returns the port currently containing this phy. If the phy is
- *currently contained by the dummy port, then the phy is considered to not
- *be part of a port.
- * @sci_phy: This parameter specifies the phy for which to retrieve the
+ * phy_get_non_dummy_port() - This method returns the port currently containing
+ * this phy. If the phy is currently contained by the dummy port, then the phy
+ * is considered to not be part of a port.
+ *
+ * @iphy: This parameter specifies the phy for which to retrieve the
  *containing port.
  *
  * This method returns a handle to a port that contains the supplied phy.
@@ -360,10 +361,8 @@ struct isci_port *phy_get_non_dummy_port(struct isci_phy 
*iphy)
return iphy->owning_port;
 }
 
-/**
+/*
  * sci_phy_set_port() - This method will assign a port to the phy object.
- * @out]: iphy This parameter specifies the phy for which to assign a port
- *object.
  */
 void sci_phy_set_port(
struct isci_phy *iphy,
-- 
2.27.0



[PATCH 16/36] scsi: isci: phy: Fix a few different kernel-doc related issues

2021-03-17 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/scsi/isci/phy.c:354: warning: Function parameter or member 'iphy' not 
described in 'phy_get_non_dummy_port'
 drivers/scsi/isci/phy.c:354: warning: expecting prototype for If the phy is(). 
Prototype was for phy_get_non_dummy_port() instead
 drivers/scsi/isci/phy.c:364: warning: wrong kernel-doc identifier on line:
 drivers/scsi/isci/phy.c:401: warning: wrong kernel-doc identifier on line:
 drivers/scsi/isci/phy.c:611: warning: Function parameter or member 'iphy' not 
described in 'sci_phy_complete_link_training'
 drivers/scsi/isci/phy.c:611: warning: Excess function parameter 'sci_phy' 
description in 'sci_phy_complete_link_training'
 drivers/scsi/isci/phy.c:1170: warning: Cannot understand  *
 drivers/scsi/isci/phy.c:1222: warning: Cannot understand  *
 drivers/scsi/isci/phy.c:1432: warning: Function parameter or member 'sas_phy' 
not described in 'isci_phy_control'
 drivers/scsi/isci/phy.c:1432: warning: Excess function parameter 'phy' 
description in 'isci_phy_control'

Cc: Artur Paszkiewicz 
Cc: "James E.J. Bottomley" 
Cc: "Martin K. Petersen" 
Cc: linux-s...@vger.kernel.org
Signed-off-by: Lee Jones 
---
 drivers/scsi/isci/phy.c | 21 ++---
 1 file changed, 10 insertions(+), 11 deletions(-)

diff --git a/drivers/scsi/isci/phy.c b/drivers/scsi/isci/phy.c
index 1b87d9080ebeb..7ca7621f77479 100644
--- a/drivers/scsi/isci/phy.c
+++ b/drivers/scsi/isci/phy.c
@@ -361,11 +361,9 @@ struct isci_port *phy_get_non_dummy_port(struct isci_phy 
*iphy)
 }
 
 /**
- * This method will assign a port to the phy object.
+ * sci_phy_set_port() - This method will assign a port to the phy object.
  * @out]: iphy This parameter specifies the phy for which to assign a port
  *object.
- *
- *
  */
 void sci_phy_set_port(
struct isci_phy *iphy,
@@ -398,11 +396,11 @@ enum sci_status sci_phy_initialize(struct isci_phy *iphy,
 }
 
 /**
- * This method assigns the direct attached device ID for this phy.
+ * sci_phy_setup_transport() - This method assigns the direct attached device 
ID for this phy.
  *
- * @iphy The phy for which the direct attached device id is to
+ * @iphy: The phy for which the direct attached device id is to
  *   be assigned.
- * @device_id The direct attached device ID to assign to the phy.
+ * @device_id: The direct attached device ID to assign to the phy.
  *   This will either be the RNi for the device or an invalid RNi if there
  *   is no current device assigned to the phy.
  */
@@ -597,7 +595,7 @@ static void sci_phy_start_sata_link_training(struct 
isci_phy *iphy)
 /**
  * sci_phy_complete_link_training - perform processing common to
  *all protocols upon completion of link training.
- * @sci_phy: This parameter specifies the phy object for which link training
+ * @iphy: This parameter specifies the phy object for which link training
  *has completed.
  * @max_link_rate: This parameter specifies the maximum link rate to be
  *associated with this phy.
@@ -1167,8 +1165,8 @@ static void sci_phy_starting_final_substate_enter(struct 
sci_base_state_machine
 }
 
 /**
- *
- * @sci_phy: This is the struct isci_phy object to stop.
+ * scu_link_layer_stop_protocol_engine()
+ * @iphy: This is the struct isci_phy object to stop.
  *
  * This method will stop the struct isci_phy object. This does not reset the
  * protocol engine it just suspends it and places it in a state where it will
@@ -1219,7 +1217,8 @@ static void scu_link_layer_start_oob(struct isci_phy 
*iphy)
 }
 
 /**
- *
+ * scu_link_layer_tx_hard_reset()
+ * @iphy: This is the struct isci_phy object to stop.
  *
  * This method will transmit a hard reset request on the specified phy. The SCU
  * hardware requires that we reset the OOB state machine and set the hard reset
@@ -1420,7 +1419,7 @@ void isci_phy_init(struct isci_phy *iphy, struct 
isci_host *ihost, int index)
 /**
  * isci_phy_control() - This function is one of the SAS Domain Template
  *functions. This is a phy management function.
- * @phy: This parameter specifies the sphy being controlled.
+ * @sas_phy: This parameter specifies the sphy being controlled.
  * @func: This parameter specifies the phy control function being invoked.
  * @buf: This parameter is specific to the phy function being invoked.
  *
-- 
2.27.0



[PATCH 20/36] scsi: isci: request: Fix a myriad of kernel-doc issues

2021-03-17 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/scsi/isci/request.c:211: warning: wrong kernel-doc identifier on line:
 drivers/scsi/isci/request.c:414: warning: wrong kernel-doc identifier on line:
 drivers/scsi/isci/request.c:472: warning: Function parameter or member 'ireq' 
not described in 'scu_ssp_task_request_construct_task_context'
 drivers/scsi/isci/request.c:472: warning: expecting prototype for The(). 
Prototype was for scu_ssp_task_request_construct_task_context() instead
 drivers/scsi/isci/request.c:501: warning: Function parameter or member 'ireq' 
not described in 'scu_sata_request_construct_task_context'
 drivers/scsi/isci/request.c:501: warning: expecting prototype for This method 
is will fill in the SCU Task Context for any type of SATA(). Prototype was for 
scu_sata_request_construct_task_context() instead
 drivers/scsi/isci/request.c:597: warning: Cannot understand  *
 drivers/scsi/isci/request.c:785: warning: expecting prototype for 
sci_req_tx_bytes(). Prototype was for SCU_TASK_CONTEXT_SRAM() instead
 drivers/scsi/isci/request.c:1399: warning: Cannot understand  *
 drivers/scsi/isci/request.c:1446: warning: Cannot understand  *
 drivers/scsi/isci/request.c:2465: warning: Function parameter or member 'task' 
not described in 'isci_request_process_response_iu'
 drivers/scsi/isci/request.c:2465: warning: Excess function parameter 
'sas_task' description in 'isci_request_process_response_iu'
 drivers/scsi/isci/request.c:2501: warning: Function parameter or member 'task' 
not described in 'isci_request_set_open_reject_status'
 drivers/scsi/isci/request.c:2524: warning: Function parameter or member 'idev' 
not described in 'isci_request_handle_controller_specific_errors'
 drivers/scsi/isci/request.c:2524: warning: Function parameter or member 'task' 
not described in 'isci_request_handle_controller_specific_errors'
 drivers/scsi/isci/request.c:3337: warning: Function parameter or member 'idev' 
not described in 'isci_io_request_build'
 drivers/scsi/isci/request.c:3337: warning: Excess function parameter 
'sci_device' description in 'isci_io_request_build'

Cc: Artur Paszkiewicz 
Cc: "James E.J. Bottomley" 
Cc: "Martin K. Petersen" 
Cc: linux-s...@vger.kernel.org
Signed-off-by: Lee Jones 
---
 drivers/scsi/isci/request.c | 58 ++---
 1 file changed, 28 insertions(+), 30 deletions(-)

diff --git a/drivers/scsi/isci/request.c b/drivers/scsi/isci/request.c
index 58e62162882f2..49ab2555c0cdf 100644
--- a/drivers/scsi/isci/request.c
+++ b/drivers/scsi/isci/request.c
@@ -207,11 +207,8 @@ static void sci_task_request_build_ssp_task_iu(struct 
isci_request *ireq)
SCI_CONTROLLER_INVALID_IO_TAG;
 }
 
-/**
+/*
  * This method is will fill in the SCU Task Context for any type of SSP 
request.
- * @sci_req:
- * @task_context:
- *
  */
 static void scu_ssp_request_construct_task_context(
struct isci_request *ireq,
@@ -410,10 +407,8 @@ static void scu_ssp_ireq_dif_strip(struct isci_request 
*ireq, u8 type, u8 op)
tc->ref_tag_seed_gen = 0;
 }
 
-/**
+/*
  * This method is will fill in the SCU Task Context for a SSP IO request.
- * @sci_req:
- *
  */
 static void scu_ssp_io_request_construct_task_context(struct isci_request 
*ireq,
  enum dma_data_direction 
dir,
@@ -456,17 +451,16 @@ static void 
scu_ssp_io_request_construct_task_context(struct isci_request *ireq,
 }
 
 /**
- * This method will fill in the SCU Task Context for a SSP Task request.  The
- *following important settings are utilized: -# priority ==
- *SCU_TASK_PRIORITY_HIGH.  This ensures that the task request is issued
- *ahead of other task destined for the same Remote Node. -# task_type ==
- *SCU_TASK_TYPE_IOREAD.  This simply indicates that a normal request type
- *(i.e. non-raw frame) is being utilized to perform task management. -#
- *control_frame == 1.  This ensures that the proper endianess is set so
- *that the bytes are transmitted in the right order for a task frame.
- * @sci_req: This parameter specifies the task request object being
- *constructed.
- *
+ * scu_ssp_task_request_construct_task_context() - This method will fill in
+ *the SCU Task Context for a SSP Task request.  The following important
+ *settings are utilized: -# priority == SCU_TASK_PRIORITY_HIGH.  This
+ *ensures that the task request is issued ahead of other task destined
+ *for the same Remote Node. -# task_type == SCU_TASK_TYPE_IOREAD.  This
+ *simply indicates that a normal request type (i.e. non-raw frame) is
+ *being utilized to perform task management. -#control_frame == 1.  This
+ *ensures that the proper endianess is set so that the bytes are
+ *transmitted i

[PATCH 17/36] scsi: fnic: fnic_scsi: Demote non-conformant kernel-doc headers

2021-03-17 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/scsi/fnic/fnic_scsi.c:183: warning: Function parameter or member 
'fnic' not described in '__fnic_set_state_flags'
 drivers/scsi/fnic/fnic_scsi.c:183: warning: Function parameter or member 
'st_flags' not described in '__fnic_set_state_flags'
 drivers/scsi/fnic/fnic_scsi.c:183: warning: Function parameter or member 
'clearbits' not described in '__fnic_set_state_flags'
 drivers/scsi/fnic/fnic_scsi.c:2296: warning: Function parameter or member 
'fnic' not described in 'fnic_scsi_host_start_tag'
 drivers/scsi/fnic/fnic_scsi.c:2296: warning: Function parameter or member 'sc' 
not described in 'fnic_scsi_host_start_tag'
 drivers/scsi/fnic/fnic_scsi.c:2316: warning: Function parameter or member 
'fnic' not described in 'fnic_scsi_host_end_tag'
 drivers/scsi/fnic/fnic_scsi.c:2316: warning: Function parameter or member 'sc' 
not described in 'fnic_scsi_host_end_tag'

Cc: Satish Kharat 
Cc: Sesidhar Baddela 
Cc: Karan Tilak Kumar 
Cc: "James E.J. Bottomley" 
Cc: "Martin K. Petersen" 
Cc: linux-s...@vger.kernel.org
Signed-off-by: Lee Jones 
---
 drivers/scsi/fnic/fnic_scsi.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/scsi/fnic/fnic_scsi.c b/drivers/scsi/fnic/fnic_scsi.c
index 36744968378ff..e619a82f921b1 100644
--- a/drivers/scsi/fnic/fnic_scsi.c
+++ b/drivers/scsi/fnic/fnic_scsi.c
@@ -173,7 +173,7 @@ static int free_wq_copy_descs(struct fnic *fnic, struct 
vnic_wq_copy *wq)
 }
 
 
-/**
+/*
  * __fnic_set_state_flags
  * Sets/Clears bits in fnic's state_flags
  **/
@@ -2287,7 +2287,7 @@ static int fnic_clean_pending_aborts(struct fnic *fnic,
return ret;
 }
 
-/**
+/*
  * fnic_scsi_host_start_tag
  * Allocates tagid from host's tag list
  **/
@@ -2307,7 +2307,7 @@ fnic_scsi_host_start_tag(struct fnic *fnic, struct 
scsi_cmnd *sc)
return dummy->tag;
 }
 
-/**
+/*
  * fnic_scsi_host_end_tag
  * frees tag allocated by fnic_scsi_host_start_tag.
  **/
-- 
2.27.0



[PATCH 21/36] scsi: isci: host: Fix bunch of kernel-doc related issues

2021-03-17 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/scsi/isci/host.c:93: warning: Cannot understand  *
 drivers/scsi/isci/host.c:108: warning: Function parameter or member 'x' not 
described in 'NORMALIZE_PUT_POINTER'
 drivers/scsi/isci/host.c:121: warning: Function parameter or member 'x' not 
described in 'NORMALIZE_EVENT_POINTER'
 drivers/scsi/isci/host.c:130: warning: Function parameter or member 'x' not 
described in 'NORMALIZE_GET_POINTER'
 drivers/scsi/isci/host.c:139: warning: Function parameter or member 'x' not 
described in 'NORMALIZE_GET_POINTER_CYCLE_BIT'
 drivers/scsi/isci/host.c:146: warning: Function parameter or member 'x' not 
described in 'COMPLETION_QUEUE_CYCLE_BIT'
 drivers/scsi/isci/host.c:646: warning: Function parameter or member 'ihost' 
not described in 'isci_host_start_complete'
 drivers/scsi/isci/host.c:646: warning: Excess function parameter 'isci_host' 
description in 'isci_host_start_complete'
 drivers/scsi/isci/host.c:680: warning: Function parameter or member 'ihost' 
not described in 'sci_controller_get_suggested_start_timeout'
 drivers/scsi/isci/host.c:680: warning: Excess function parameter 'controller' 
description in 'sci_controller_get_suggested_start_timeout'
 drivers/scsi/isci/host.c:903: warning: Function parameter or member 'ihost' 
not described in 'sci_controller_start_next_phy'
 drivers/scsi/isci/host.c:903: warning: Excess function parameter 'scic' 
description in 'sci_controller_start_next_phy'
 drivers/scsi/isci/host.c:1159: warning: Function parameter or member 'ihost' 
not described in 'sci_controller_stop'
 drivers/scsi/isci/host.c:1159: warning: Excess function parameter 'controller' 
description in 'sci_controller_stop'
 drivers/scsi/isci/host.c:1184: warning: Function parameter or member 'ihost' 
not described in 'sci_controller_reset'
 drivers/scsi/isci/host.c:1184: warning: Excess function parameter 'controller' 
description in 'sci_controller_reset'
 drivers/scsi/isci/host.c:1352: warning: Function parameter or member 'ihost' 
not described in 'sci_controller_set_interrupt_coalescence'
 drivers/scsi/isci/host.c:1352: warning: Excess function parameter 'controller' 
description in 'sci_controller_set_interrupt_coalescence'
 drivers/scsi/isci/host.c:2498: warning: Function parameter or member 'ihost' 
not described in 'sci_controller_allocate_remote_node_context'
 drivers/scsi/isci/host.c:2498: warning: Function parameter or member 'idev' 
not described in 'sci_controller_allocate_remote_node_context'
 drivers/scsi/isci/host.c:2498: warning: expecting prototype for This method 
allocates remote node index and the reserves the remote node(). Prototype was 
for sci_controller_allocate_remote_node_context() instead
 drivers/scsi/isci/host.c:2721: warning: Function parameter or member 'ihost' 
not described in 'sci_controller_start_task'
 drivers/scsi/isci/host.c:2721: warning: Function parameter or member 'idev' 
not described in 'sci_controller_start_task'
 drivers/scsi/isci/host.c:2721: warning: Function parameter or member 'ireq' 
not described in 'sci_controller_start_task'
 drivers/scsi/isci/host.c:2721: warning: Excess function parameter 'controller' 
description in 'sci_controller_start_task'
 drivers/scsi/isci/host.c:2721: warning: Excess function parameter 
'remote_device' description in 'sci_controller_start_task'
 drivers/scsi/isci/host.c:2721: warning: Excess function parameter 
'task_request' description in 'sci_controller_start_task'

Cc: Artur Paszkiewicz 
Cc: "James E.J. Bottomley" 
Cc: "Martin K. Petersen" 
Cc: linux-s...@vger.kernel.org
Signed-off-by: Lee Jones 
---
 drivers/scsi/isci/host.c | 37 ++---
 1 file changed, 18 insertions(+), 19 deletions(-)

diff --git a/drivers/scsi/isci/host.c b/drivers/scsi/isci/host.c
index 7ebfa3c8cdc78..d690d9cf7eb15 100644
--- a/drivers/scsi/isci/host.c
+++ b/drivers/scsi/isci/host.c
@@ -89,16 +89,14 @@
 
 #define SCIC_SDS_CONTROLLER_PHY_START_TIMEOUT  100
 
-/**
- *
- *
+/*
  * The number of milliseconds to wait while a given phy is consuming power
  * before allowing another set of phys to consume power. Ultimately, this will
  * be specified by OEM parameter.
  */
 #define SCIC_SDS_CONTROLLER_POWER_CONTROL_INTERVAL 500
 
-/**
+/*
  * NORMALIZE_PUT_POINTER() -
  *
  * This macro will normalize the completion queue put pointer so its value can
@@ -108,7 +106,7 @@
((x) & SMU_COMPLETION_QUEUE_PUT_POINTER_MASK)
 
 
-/**
+/*
  * NORMALI

[PATCH 18/36] scsi: fnic: fnic_fcs: Kernel-doc headers must contain the function name

2021-03-17 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/scsi/fnic/fnic_fcs.c:308: warning: expecting prototype for Check if 
the Received FIP FLOGI frame is rejected(). Prototype was for 
is_fnic_fip_flogi_reject() instead

Cc: Satish Kharat 
Cc: Sesidhar Baddela 
Cc: Karan Tilak Kumar 
Cc: "James E.J. Bottomley" 
Cc: "Martin K. Petersen" 
Cc: linux-s...@vger.kernel.org
Signed-off-by: Lee Jones 
---
 drivers/scsi/fnic/fnic_fcs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/fnic/fnic_fcs.c b/drivers/scsi/fnic/fnic_fcs.c
index e0cee4dcb4391..881c4823d7e24 100644
--- a/drivers/scsi/fnic/fnic_fcs.c
+++ b/drivers/scsi/fnic/fnic_fcs.c
@@ -296,7 +296,7 @@ void fnic_handle_event(struct work_struct *work)
 }
 
 /**
- * Check if the Received FIP FLOGI frame is rejected
+ * is_fnic_fip_flogi_reject() - Check if the Received FIP FLOGI frame is 
rejected
  * @fip: The FCoE controller that received the frame
  * @skb: The received FIP frame
  *
-- 
2.27.0



[PATCH 14/36] scsi: mpt3sas: mpt3sas_scs: Fix a few kernel-doc issues

2021-03-17 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/scsi/mpt3sas/mpt3sas_scsih.c:763: warning: Function parameter or 
member 'sas_address' not described in '__mpt3sas_get_sdev_by_addr'
 drivers/scsi/mpt3sas/mpt3sas_scsih.c:763: warning: expecting prototype for 
mpt3sas_get_sdev_by_addr(). Prototype was for __mpt3sas_get_sdev_by_addr() 
instead
 drivers/scsi/mpt3sas/mpt3sas_scsih.c:4535: warning: expecting prototype for 
_scsih_check_for_pending_internal_cmds(). Prototype was for 
mpt3sas_check_for_pending_internal_cmds() instead
 drivers/scsi/mpt3sas/mpt3sas_scsih.c:6188: warning: Function parameter or 
member 'port_entry' not described in '_scsih_look_and_get_matched_port_entry'
 drivers/scsi/mpt3sas/mpt3sas_scsih.c:6188: warning: Function parameter or 
member 'matched_port_entry' not described in 
'_scsih_look_and_get_matched_port_entry'
 drivers/scsi/mpt3sas/mpt3sas_scsih.c:6188: warning: Function parameter or 
member 'count' not described in '_scsih_look_and_get_matched_port_entry'
 drivers/scsi/mpt3sas/mpt3sas_scsih.c:6959: warning: Function parameter or 
member 'port' not described in 'mpt3sas_expander_remove'
 drivers/scsi/mpt3sas/mpt3sas_scsih.c:10494: warning: expecting prototype for 
mpt3sas_scsih_reset_handler(). Prototype was for 
mpt3sas_scsih_pre_reset_handler() instead
 drivers/scsi/mpt3sas/mpt3sas_scsih.c:10536: warning: expecting prototype for 
mpt3sas_scsih_reset_handler(). Prototype was for 
mpt3sas_scsih_reset_done_handler() instead
 drivers/scsi/mpt3sas/mpt3sas_scsih.c:12303: warning: expecting prototype for 
scsih__ncq_prio_supp(). Prototype was for scsih_ncq_prio_supp() instead

Cc: Sathya Prakash 
Cc: Sreekanth Reddy 
Cc: Suganath Prabu Subramani 
Cc: "James E.J. Bottomley" 
Cc: "Martin K. Petersen" 
Cc: mpt-fusionlinux@avagotech.com
Cc: mpt-fusionlinux@broadcom.com
Cc: linux-s...@vger.kernel.org
Signed-off-by: Lee Jones 
---
 drivers/scsi/mpt3sas/mpt3sas_scsih.c | 18 ++
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c 
b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
index 945531e94d7e4..23ecf2750ec79 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
@@ -749,9 +749,10 @@ __mpt3sas_get_sdev_by_rphy(struct MPT3SAS_ADAPTER *ioc,
 }
 
 /**
- * mpt3sas_get_sdev_by_addr - get _sas_device object corresponding to provided
+ * __mpt3sas_get_sdev_by_addr - get _sas_device object corresponding to 
provided
  * sas address from sas_device_list list
  * @ioc: per adapter object
+ * @sas_address: device sas address
  * @port: port number
  *
  * Search for _sas_device object corresponding to provided sas address,
@@ -4518,7 +4519,7 @@ _scsih_issue_delayed_sas_io_unit_ctrl(struct 
MPT3SAS_ADAPTER *ioc,
 }
 
 /**
- * _scsih_check_for_pending_internal_cmds - check for pending internal messages
+ * mpt3sas_check_for_pending_internal_cmds - check for pending internal 
messages
  * @ioc: per adapter object
  * @smid: system request message index
  *
@@ -6174,10 +6175,10 @@ enum hba_port_matched_codes {
  * _scsih_look_and_get_matched_port_entry - Get matched hba port entry
  * from HBA port table
  * @ioc: per adapter object
- * @port_entry - hba port entry from temporary port table which needs to be
+ * @port_entry: hba port entry from temporary port table which needs to be
  * searched for matched entry in the HBA port table
- * @matched_port_entry - save matched hba port entry here
- * @count - count of matched entries
+ * @matched_port_entry: save matched hba port entry here
+ * @count: count of matched entries
  *
  * return type of matched entry found.
  */
@@ -6952,6 +6953,7 @@ _scsih_expander_add(struct MPT3SAS_ADAPTER *ioc, u16 
handle)
  * mpt3sas_expander_remove - removing expander object
  * @ioc: per adapter object
  * @sas_address: expander sas_address
+ * @port: hba port entry
  */
 void
 mpt3sas_expander_remove(struct MPT3SAS_ADAPTER *ioc, u64 sas_address,
@@ -10487,7 +10489,7 @@ _scsih_scan_for_devices_after_reset(struct 
MPT3SAS_ADAPTER *ioc)
 }
 
 /**
- * mpt3sas_scsih_reset_handler - reset callback handler (for scsih)
+ * mpt3sas_scsih_pre_reset_handler - reset callback handler (for scsih)
  * @ioc: per adapter object
  *
  * The handler for doing any required cleanup or initialization.
@@ -10528,7 +10530,7 @@ mpt3sas_scsih_clear_outstanding_scsi_tm_commands(struct 
MPT3SAS_ADAPTER *ioc)
 }
 
 /**
- * mpt3sas_scsih_reset_handler - reset callback handler (for scsih)
+ * mpt3sas_scsih_reset_done_handler - reset callback handler (for scsih)
  * @ioc: per adapter object
  *
  * The handler for doing any required cleanup or initialization.
@@ -12295,7 +12297,7 @@ scsih_pci_mmio_enabled(struct pci_dev *pdev)
 }
 
 /**
- * scsih__ncq_prio_supp - Check for NCQ command priority suppo

[PATCH 13/36] scsi: pmcraid: Correct function name pmcraid_show_adapter_id() in header

2021-03-17 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/scsi/pmcraid.c:4079: warning: expecting prototype for 
pmcraid_show_io_adapter_id(). Prototype was for pmcraid_show_adapter_id() 
instead

Cc: "James E.J. Bottomley" 
Cc: "Martin K. Petersen" 
Cc: Anil Ravindranath 
Cc: linux-s...@vger.kernel.org
Signed-off-by: Lee Jones 
---
 drivers/scsi/pmcraid.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/pmcraid.c b/drivers/scsi/pmcraid.c
index c98e39eb04b24..bffd9a9349e72 100644
--- a/drivers/scsi/pmcraid.c
+++ b/drivers/scsi/pmcraid.c
@@ -4063,7 +4063,7 @@ static struct device_attribute 
pmcraid_driver_version_attr = {
 };
 
 /**
- * pmcraid_show_io_adapter_id - Display driver assigned adapter id
+ * pmcraid_show_adapter_id - Display driver assigned adapter id
  * @dev: class device struct
  * @attr: unused
  * @buf: buffer
-- 
2.27.0



[PATCH 12/36] scsi: myrs: Add missing ':' to make the kernel-doc checker happy

2021-03-17 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/scsi/myrs.c:1965: warning: Function parameter or member 'dev' not 
described in 'myrs_is_raid'
 drivers/scsi/myrs.c:1978: warning: Function parameter or member 'dev' not 
described in 'myrs_get_resync'
 drivers/scsi/myrs.c:2002: warning: Function parameter or member 'dev' not 
described in 'myrs_get_state'

Cc: Hannes Reinecke 
Cc: "James E.J. Bottomley" 
Cc: "Martin K. Petersen" 
Cc: Linux GmbH 
Cc: "Leonard N. Zubkoff" 
Cc: linux-s...@vger.kernel.org
Signed-off-by: Lee Jones 
---
 drivers/scsi/myrs.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/scsi/myrs.c b/drivers/scsi/myrs.c
index 48e399f057d5c..588c0de006b02 100644
--- a/drivers/scsi/myrs.c
+++ b/drivers/scsi/myrs.c
@@ -1958,7 +1958,7 @@ static struct myrs_hba *myrs_alloc_host(struct pci_dev 
*pdev,
 
 /**
  * myrs_is_raid - return boolean indicating device is raid volume
- * @dev the device struct object
+ * @dev: the device struct object
  */
 static int
 myrs_is_raid(struct device *dev)
@@ -1971,7 +1971,7 @@ myrs_is_raid(struct device *dev)
 
 /**
  * myrs_get_resync - get raid volume resync percent complete
- * @dev the device struct object
+ * @dev: the device struct object
  */
 static void
 myrs_get_resync(struct device *dev)
@@ -1995,7 +1995,7 @@ myrs_get_resync(struct device *dev)
 
 /**
  * myrs_get_state - get raid volume status
- * @dev the device struct object
+ * @dev: the device struct object
  */
 static void
 myrs_get_state(struct device *dev)
-- 
2.27.0



[PATCH 11/36] scsi: a100u2w: Fix some misnaming and formatting issues

2021-03-17 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/scsi/a100u2w.c:278: warning: expecting prototype for orc_exec_sb(). 
Prototype was for orc_exec_scb() instead
 drivers/scsi/a100u2w.c:596: warning: Function parameter or member 'target' not 
described in 'orc_device_reset'
 drivers/scsi/a100u2w.c:739: warning: Function parameter or member 'host' not 
described in 'orchid_abort_scb'
 drivers/scsi/a100u2w.c:739: warning: Function parameter or member 'scb' not 
described in 'orchid_abort_scb'
 drivers/scsi/a100u2w.c:915: warning: expecting prototype for inia100_queue(). 
Prototype was for inia100_queue_lck() instead

Cc: "James E.J. Bottomley" 
Cc: "Martin K. Petersen" 
Cc: Doug Ledford 
Cc: Christoph Hellwig 
Cc: Alan Cox 
Cc: linux-s...@vger.kernel.org
Signed-off-by: Lee Jones 
---
 drivers/scsi/a100u2w.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/scsi/a100u2w.c b/drivers/scsi/a100u2w.c
index c99224a128f82..c9ed210d77b39 100644
--- a/drivers/scsi/a100u2w.c
+++ b/drivers/scsi/a100u2w.c
@@ -269,7 +269,7 @@ static u8 orc_nv_read(struct orc_host * host, u8 address, 
u8 *ptr)
 }
 
 /**
- * orc_exec_sb -   Queue an SCB with the HA
+ * orc_exec_scb-   Queue an SCB with the HA
  * @host: host adapter the SCB belongs to
  * @scb: SCB to queue for execution
  */
@@ -586,7 +586,7 @@ static int orc_reset_scsi_bus(struct orc_host * host)
  * orc_device_reset-   device reset handler
  * @host: host to reset
  * @cmd: command causing the reset
- * @target; target device
+ * @target: target device
  *
  * Reset registers, reset a hanging bus and kill active and disconnected
  * commands for target w/o soft reset
@@ -727,7 +727,7 @@ static void orc_release_scb(struct orc_host *host, struct 
orc_scb *scb)
spin_unlock_irqrestore(&(host->allocation_lock), flags);
 }
 
-/**
+/*
  * orchid_abort_scb-   abort a command
  *
  * Abort a queued command that has been passed to the firmware layer
@@ -902,7 +902,7 @@ static int inia100_build_scb(struct orc_host * host, struct 
orc_scb * scb, struc
 }
 
 /**
- * inia100_queue   -   queue command with host
+ * inia100_queue_lck   -   queue command with host
  * @cmd: Command block
  * @done: Completion function
  *
-- 
2.27.0



[PATCH 02/36] scsi: ipr: Fix incorrect function names in their headers

2021-03-17 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/scsi/ipr.c:5335: warning: expecting prototype for ipr_eh_dev_reset(). 
Prototype was for __ipr_eh_dev_reset() instead
 drivers/scsi/ipr.c:5594: warning: expecting prototype for ipr_eh_abort(). 
Prototype was for ipr_scan_finished() instead
 drivers/scsi/ipr.c:5616: warning: expecting prototype for ipr_eh_host_reset(). 
Prototype was for ipr_eh_abort() instead
 drivers/scsi/ipr.c:6725: warning: expecting prototype for ipr_info(). 
Prototype was for ipr_ioa_info() instead

Cc: Brian King 
Cc: "James E.J. Bottomley" 
Cc: "Martin K. Petersen" 
Cc: linux-s...@vger.kernel.org
Signed-off-by: Lee Jones 
---
 drivers/scsi/ipr.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c
index e451102b9a299..fd6c974c2754e 100644
--- a/drivers/scsi/ipr.c
+++ b/drivers/scsi/ipr.c
@@ -5321,7 +5321,7 @@ static int ipr_sata_reset(struct ata_link *link, unsigned 
int *classes,
 }
 
 /**
- * ipr_eh_dev_reset - Reset the device
+ * __ipr_eh_dev_reset - Reset the device
  * @scsi_cmd:  scsi command struct
  *
  * This function issues a device reset to the affected device.
@@ -5583,7 +5583,7 @@ static int ipr_cancel_op(struct scsi_cmnd *scsi_cmd)
 }
 
 /**
- * ipr_eh_abort - Abort a single op
+ * ipr_scan_finished - Abort a single op
  * @shost:   scsi host struct
  * @elapsed_time:elapsed time
  *
@@ -5606,7 +5606,7 @@ static int ipr_scan_finished(struct Scsi_Host *shost, 
unsigned long elapsed_time
 }
 
 /**
- * ipr_eh_host_reset - Reset the host adapter
+ * ipr_eh_abort - Reset the host adapter
  * @scsi_cmd:  scsi command struct
  *
  * Return value:
@@ -6715,7 +6715,7 @@ static int ipr_ioctl(struct scsi_device *sdev, unsigned 
int cmd,
 }
 
 /**
- * ipr_info - Get information about the card/driver
+ * ipr_ioa_info - Get information about the card/driver
  * @host:  scsi host struct
  *
  * Return value:
-- 
2.27.0



[PATCH 00/36] [Set 4] Rid W=1 warnings in SCSI

2021-03-17 Thread 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.

Lee Jones (36):
  scsi: myrb: Demote non-conformant kernel-doc headers and fix others
  scsi: ipr: Fix incorrect function names in their headers
  scsi: mvumi: Fix formatting and doc-rot issues
  scsi: sd_zbc: Place function name into header
  scsi: pmcraid: Fix a whole host of kernel-doc issues
  scsi: sd: Fix function name in header
  scsi: aic94xx: aic94xx_dump: Correct misspelling of function
asd_dump_seq_state()
  scsi: be2iscsi: be_main: Ensure function follows directly after its
header
  scsi: dc395x: Fix some function param descriptions
  scsi: initio: Fix a few kernel-doc misdemeanours
  scsi: a100u2w: Fix some misnaming and formatting issues
  scsi: myrs: Add missing ':' to make the kernel-doc checker happy
  scsi: pmcraid: Correct function name pmcraid_show_adapter_id() in
header
  scsi: mpt3sas: mpt3sas_scs: Fix a few kernel-doc issues
  scsi: be2iscsi: be_main: Demote incomplete/non-conformant kernel-doc
header
  scsi: isci: phy: Fix a few different kernel-doc related issues
  scsi: fnic: fnic_scsi: Demote non-conformant kernel-doc headers
  scsi: fnic: fnic_fcs: Kernel-doc headers must contain the function
name
  scsi: isci: phy: Provide function name and demote non-conforming
header
  scsi: isci: request: Fix a myriad of kernel-doc issues
  scsi: isci: host: Fix bunch of kernel-doc related issues
  scsi: isci: task: Demote non-conformant header and remove superfluous
param
  scsi: isci: remote_node_table: Fix a bunch of kernel-doc misdemeanours
  scsi: isci: remote_node_context: Fix one function header and demote a
couple more
  scsi: isci: port_config: Fix a bunch of doc-rot and demote abuses
  scsi: isci: remote_device: Fix a bunch of doc-rot issues
  scsi: isci: request: Fix doc-rot issue relating to 'ireq' param
  scsi: isci: port: Fix a bunch of kernel-doc issues
  scsi: isci: remote_node_context: Demote kernel-doc abuse
  scsi: isci: remote_node_table: Provide some missing params and remove
others
  scsi: cxlflash: main: Fix a little do-rot
  scsi: cxlflash: superpipe: Fix a few misnaming issues
  scsi: ibmvscsi: Fix a bunch of kernel-doc related issues
  scsi: ibmvscsi: ibmvfc: Fix a bunch of misdocumentation
  scsi: ibmvscsi_tgt: ibmvscsi_tgt: Remove duplicate section 'NOTE'
  scsi: cxlflash: vlun: Fix some misnaming related doc-rot

 drivers/scsi/a100u2w.c   |  8 +--
 drivers/scsi/aic94xx/aic94xx_dump.c  |  2 +-
 drivers/scsi/be2iscsi/be_main.c  |  5 +-
 drivers/scsi/cxlflash/main.c |  8 +--
 drivers/scsi/cxlflash/superpipe.c|  6 +-
 drivers/scsi/cxlflash/vlun.c |  8 +--
 drivers/scsi/dc395x.c|  3 +-
 drivers/scsi/fnic/fnic_fcs.c |  2 +-
 drivers/scsi/fnic/fnic_scsi.c|  6 +-
 drivers/scsi/ibmvscsi/ibmvfc.c   | 29 ++
 drivers/scsi/ibmvscsi/ibmvscsi.c | 70 
 drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c |  8 +--
 drivers/scsi/initio.c| 13 ++---
 drivers/scsi/ipr.c   |  8 +--
 drivers/scsi/isci/host.c | 37 ++---
 drivers/scsi/isci/phy.c  | 34 ++--
 drivers/scsi/isci/port.c | 58 ++--
 drivers/scsi/isci/port_config.c  | 37 +++--
 drivers/scsi/isci/remote_device.c| 31 ++-
 drivers/scsi/isci/remote_node_context.c  | 13 +
 drivers/scsi/isci/remote_node_table.c| 64 +++---
 drivers/scsi/isci/request.c  | 60 ++--
 drivers/scsi/isci/task.c |  3 +-
 drivers/scsi/mpt3sas/mpt3sas_scsih.c | 18 +++---
 drivers/scsi/mvumi.c |  5 +-
 drivers/scsi/myrb.c  | 47 
 drivers/scsi/myrs.c  |  6 +-
 drivers/scsi/pmcraid.c   | 70 
 drivers/scsi/sd.c|  2 +-
 drivers/scsi/sd_zbc.c|  2 +-
 30 files changed, 329 insertions(+), 334 deletions(-)

Cc: Alan Cox 
Cc: Alex Davis 
Cc: Ali Akcaagac 
Cc: Anil Ravindranath 
Cc: Artur Paszkiewicz 
Cc: Badari Pulavarty 
Cc: Bas Vermeulen 
Cc: Benjamin Herrenschmidt 
Cc: Brian King 
Cc: Brian King 
Cc: Brian Macy 
Cc: "Bryant G. Ly" 
Cc: Christoph Hellwig 
Cc: "C.L. Huang" 
Cc: Colin DeVilbiss 
Cc: Dave Boutcher 
Cc: Dave Boutcher 
Cc: David Chaw 
Cc: dc3...@twibble.org
Cc: Douglas Gilbert 
Cc: Doug Ledford 
Cc: Drew Eckhardt 
Cc: Erich Chen 
Cc: Eric Youngdale 
Cc: FUJITA Tomonori 
Cc: Hannes Reinecke 
Cc: Hannes Reinecke 
Cc: "James E.J. Bottomley" 
Cc: Jamie Lenehan 
Cc: Jirka Hanika 
Cc: Jitendra Bhivare 
Cc: Karan Tilak Kumar 
Cc: Ketan Mukadam 
Cc: Kurt Garloff 
Cc: Lee Jones 
Cc: Le Moal 
Cc: "Leon

[PATCH 10/36] scsi: initio: Fix a few kernel-doc misdemeanours

2021-03-17 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/scsi/initio.c:560: warning: Excess function parameter 'num_scbs' 
description in 'initio_init'
 drivers/scsi/initio.c:1899: warning: expecting prototype for 
int_initio_scsi_resel(). Prototype was for int_initio_resel() instead
 drivers/scsi/initio.c:2615: warning: expecting prototype for 
i91u_queuecommand(). Prototype was for i91u_queuecommand_lck() instead
 drivers/scsi/initio.c:2667: warning: Function parameter or member 'dev' not 
described in 'i91u_biosparam'
 drivers/scsi/initio.c:2667: warning: expecting prototype for 
i91u_biospararm(). Prototype was for i91u_biosparam() instead
 drivers/scsi/initio.c:2740: warning: Function parameter or member 'host_mem' 
not described in 'i91uSCBPost'
 drivers/scsi/initio.c:2740: warning: Function parameter or member 'cblk_mem' 
not described in 'i91uSCBPost'
 drivers/scsi/initio.c:2740: warning: Excess function parameter 'host' 
description in 'i91uSCBPost'
 drivers/scsi/initio.c:2740: warning: Excess function parameter 'cmnd' 
description in 'i91uSCBPost'

Cc: "James E.J. Bottomley" 
Cc: "Martin K. Petersen" 
Cc: Bas Vermeulen 
Cc: Christoph Hellwig 
Cc: Brian Macy 
Cc: linux-s...@vger.kernel.org
Signed-off-by: Lee Jones 
---
 drivers/scsi/initio.c | 13 +
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/drivers/scsi/initio.c b/drivers/scsi/initio.c
index 926a7045c2e5c..9b75e19a9bab1 100644
--- a/drivers/scsi/initio.c
+++ b/drivers/scsi/initio.c
@@ -546,7 +546,6 @@ static int initio_reset_scsi(struct initio_host * host, int 
seconds)
 /**
  * initio_init -   set up an InitIO host adapter
  * @host: InitIO host adapter
- * @num_scbs: Number of SCBS
  * @bios_addr: BIOS address
  *
  * Set up the host adapter and devices according to the configuration
@@ -1887,7 +1886,7 @@ static int int_initio_scsi_rst(struct initio_host * host)
 }
 
 /**
- * int_initio_scsi_resel   -   Reselection occurred
+ * int_initio_resel-   Reselection occurred
  * @host: InitIO host adapter
  *
  * A SCSI reselection event has been signalled and the interrupt
@@ -2601,7 +2600,7 @@ static void initio_build_scb(struct initio_host * host, 
struct scsi_ctrl_blk * c
 }
 
 /**
- * i91u_queuecommand   -   Queue a new command if possible
+ * i91u_queuecommand_lck   -   Queue a new command if possible
  * @cmd: SCSI command block from the mid layer
  * @done: Completion handler
  *
@@ -2650,9 +2649,9 @@ static int i91u_bus_reset(struct scsi_cmnd * cmnd)
 }
 
 /**
- * i91u_biospararm -   return the "logical geometry
+ * i91u_biosparam  -   return the "logical geometry
  * @sdev: SCSI device
- * @dev; Matching block device
+ * @dev: Matching block device
  * @capacity: Sector size of drive
  * @info_array: Return space for BIOS geometry
  *
@@ -2727,10 +2726,8 @@ static void i91u_unmap_scb(struct pci_dev *pci_dev, 
struct scsi_cmnd *cmnd)
}
 }
 
-/**
+/*
  * i91uSCBPost -   SCSI callback
- * @host: Pointer to host adapter control block.
- * @cmnd: Pointer to SCSI control block.
  *
  * This is callback routine be called when tulip finish one
  * SCSI command.
-- 
2.27.0



[PATCH 08/36] scsi: be2iscsi: be_main: Ensure function follows directly after its header

2021-03-17 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/scsi/be2iscsi/be_main.c:4935: warning: expecting prototype for 
beiscsi_show_boot_tgt_info(). Prototype was for 
BEISCSI_SYSFS_ISCSI_BOOT_FLAGS() instead

Cc: Subbu Seetharaman 
Cc: Ketan Mukadam 
Cc: Jitendra Bhivare 
Cc: "James E.J. Bottomley" 
Cc: "Martin K. Petersen" 
Cc: linux-driv...@broadcom.com
Cc: linux-s...@vger.kernel.org
Signed-off-by: Lee Jones 
---
 drivers/scsi/be2iscsi/be_main.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c
index ab32ca535078d..eac67878b2b1b 100644
--- a/drivers/scsi/be2iscsi/be_main.c
+++ b/drivers/scsi/be2iscsi/be_main.c
@@ -4926,14 +4926,13 @@ void beiscsi_start_boot_work(struct beiscsi_hba *phba, 
unsigned int s_handle)
schedule_work(&phba->boot_work);
 }
 
+#define BEISCSI_SYSFS_ISCSI_BOOT_FLAGS 3
 /**
  * beiscsi_show_boot_tgt_info()
  * Boot flag info for iscsi-utilities
  * Bit 0 Block valid flag
  * Bit 1 Firmware booting selected
  */
-#define BEISCSI_SYSFS_ISCSI_BOOT_FLAGS 3
-
 static ssize_t beiscsi_show_boot_tgt_info(void *data, int type, char *buf)
 {
struct beiscsi_hba *phba = data;
-- 
2.27.0



[PATCH 05/36] scsi: pmcraid: Fix a whole host of kernel-doc issues

2021-03-17 Thread Lee Jones
ter or member 'arg' not 
described in 'pmcraid_chr_ioctl'
 drivers/scsi/pmcraid.c:3905: warning: expecting prototype for pmcraid_ioctl(). 
Prototype was for pmcraid_chr_ioctl() instead
 drivers/scsi/pmcraid.c:3969: warning: cannot understand function prototype: 
'const struct file_operations pmcraid_fops = '
 drivers/scsi/pmcraid.c:3993: warning: Function parameter or member 'attr' not 
described in 'pmcraid_show_log_level'
 drivers/scsi/pmcraid.c:4015: warning: Function parameter or member 'attr' not 
described in 'pmcraid_store_log_level'
 drivers/scsi/pmcraid.c:4055: warning: Function parameter or member 'attr' not 
described in 'pmcraid_show_drv_version'
 drivers/scsi/pmcraid.c:4081: warning: Function parameter or member 'attr' not 
described in 'pmcraid_show_adapter_id'
 drivers/scsi/pmcraid.c:4081: warning: expecting prototype for 
pmcraid_show_io_adapter_id(). Prototype was for pmcraid_show_adapter_id() 
instead
 drivers/scsi/pmcraid.c:4600: warning: Function parameter or member 'pinstance' 
not described in 'pmcraid_allocate_cmd_blocks'
 drivers/scsi/pmcraid.c:5153: warning: Function parameter or member 'minor' not 
described in 'pmcraid_release_minor'

Cc: "James E.J. Bottomley" 
Cc: "Martin K. Petersen" 
Cc: Anil Ravindranath 
Cc: linux-s...@vger.kernel.org
Signed-off-by: Lee Jones 
---
 drivers/scsi/pmcraid.c | 68 --
 1 file changed, 33 insertions(+), 35 deletions(-)

diff --git a/drivers/scsi/pmcraid.c b/drivers/scsi/pmcraid.c
index 834556ea21d20..c98e39eb04b24 100644
--- a/drivers/scsi/pmcraid.c
+++ b/drivers/scsi/pmcraid.c
@@ -443,15 +443,14 @@ static void pmcraid_disable_interrupts(
  * pmcraid_enable_interrupts - Enables specified interrupts
  *
  * @pinstance: pointer to per adapter instance structure
- * @intr: interrupts to enable
+ * @intrs: interrupts to enable
  *
  * Return Value
  *  None
  */
 static void pmcraid_enable_interrupts(
struct pmcraid_instance *pinstance,
-   u32 intrs
-)
+   u32 intrs)
 {
u32 gmask = ioread32(pinstance->int_regs.global_interrupt_mask_reg);
u32 nmask = gmask & (~GLOBAL_INTERRUPT_MASK);
@@ -533,15 +532,13 @@ static void pmcraid_reset_type(struct pmcraid_instance 
*pinstance)
pinstance->ioa_unit_check = 1;
 }
 
+static void pmcraid_ioa_reset(struct pmcraid_cmd *);
 /**
  * pmcraid_bist_done - completion function for PCI BIST
- * @cmd: pointer to reset command
+ * @t: pointer to reset command
  * Return Value
  * none
  */
-
-static void pmcraid_ioa_reset(struct pmcraid_cmd *);
-
 static void pmcraid_bist_done(struct timer_list *t)
 {
struct pmcraid_cmd *cmd = from_timer(cmd, t, timer);
@@ -595,7 +592,7 @@ static void pmcraid_start_bist(struct pmcraid_cmd *cmd)
 
 /**
  * pmcraid_reset_alert_done - completion routine for reset_alert
- * @cmd: pointer to command block used in reset sequence
+ * @t: pointer to command block used in reset sequence
  * Return value
  *  None
  */
@@ -626,16 +623,16 @@ static void pmcraid_reset_alert_done(struct timer_list *t)
}
 }
 
+static void pmcraid_notify_ioastate(struct pmcraid_instance *, u32);
 /**
  * pmcraid_reset_alert - alerts IOA for a possible reset
- * @cmd : command block to be used for reset sequence.
+ * @cmd: command block to be used for reset sequence.
  *
  * Return Value
  * returns 0 if pci config-space is accessible and RESET_DOORBELL is
  * successfully written to IOA. Returns non-zero in case pci_config_space
  * is not accessible
  */
-static void pmcraid_notify_ioastate(struct pmcraid_instance *, u32);
 static void pmcraid_reset_alert(struct pmcraid_cmd *cmd)
 {
struct pmcraid_instance *pinstance = cmd->drv_inst;
@@ -676,7 +673,7 @@ static void pmcraid_reset_alert(struct pmcraid_cmd *cmd)
 /**
  * pmcraid_timeout_handler -  Timeout handler for internally generated ops
  *
- * @cmd : pointer to command structure, that got timedout
+ * @t: pointer to command structure, that got timedout
  *
  * This function blocks host requests and initiates an adapter reset.
  *
@@ -844,7 +841,7 @@ static void pmcraid_erp_done(struct pmcraid_cmd *cmd)
 }
 
 /**
- * pmcraid_fire_command - sends an IOA command to adapter
+ * _pmcraid_fire_command - sends an IOA command to adapter
  *
  * This function adds the given block into pending command list
  * and returns without waiting
@@ -961,6 +958,7 @@ static void pmcraid_ioa_shutdown(struct pmcraid_cmd *cmd)
 pmcraid_timeout_handler);
 }
 
+static void pmcraid_querycfg(struct pmcraid_cmd *);
 /**
  * pmcraid_get_fwversion_done - completion function for get_fwversion
  *
@@ -969,8 +967,6 @@ static void pmcraid_ioa_shutdown(struct pmcraid_cmd *cmd)
  * Return Value
  * none
  */
-static void pmcraid_querycfg(struct pmcraid_cmd *);
-
 s

[PATCH 09/36] scsi: dc395x: Fix some function param descriptions

2021-03-17 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/scsi/dc395x.c:4353: warning: Function parameter or member 'acb' not 
described in 'adapter_init'
 drivers/scsi/dc395x.c:4353: warning: Function parameter or member 
'io_port_len' not described in 'adapter_init'
 drivers/scsi/dc395x.c:4353: warning: Excess function parameter 'host' 
description in 'adapter_init'

Cc: Oliver Neukum 
Cc: Ali Akcaagac 
Cc: Jamie Lenehan 
Cc: "James E.J. Bottomley" 
Cc: "Martin K. Petersen" 
Cc: "C.L. Huang" 
Cc: Erich Chen 
Cc: Kurt Garloff 
Cc: dc3...@twibble.org
Cc: linux-s...@vger.kernel.org
Signed-off-by: Lee Jones 
---
 drivers/scsi/dc395x.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/scsi/dc395x.c b/drivers/scsi/dc395x.c
index e28f8931e23f8..5503230006f87 100644
--- a/drivers/scsi/dc395x.c
+++ b/drivers/scsi/dc395x.c
@@ -4341,8 +4341,9 @@ static void adapter_init_chip(struct AdapterCtlBlk *acb)
  * tables etc etc. This basically gets all adapter information all up
  * to date, initialised and gets the chip in sync with it.
  *
- * @host:  This hosts adapter structure
+ * @acb:   The adapter which we are to init.
  * @io_port:   The base I/O port
+ * @io_port_len: The I/O port size
  * @irq:   IRQ
  *
  * Returns 0 if the initialization succeeds, any other value on
-- 
2.27.0



[PATCH 06/36] scsi: sd: Fix function name in header

2021-03-17 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/scsi/sd.c:1537: warning: expecting prototype for sd_ioctl(). Prototype 
was for sd_ioctl_common() instead

Cc: "James E.J. Bottomley" 
Cc: "Martin K. Petersen" 
Cc: Drew Eckhardt 
Cc: Eric Youngdale 
Cc: Jirka Hanika 
Cc: Richard Gooch 
Cc: Torben Mathiasen 
Cc: Alex Davis 
Cc: Douglas Gilbert 
Cc: Badari Pulavarty 
Cc: wi...@debian.org
Cc: Kurt Garloff 
Cc: linux-s...@vger.kernel.org
Signed-off-by: Lee Jones 
---
 drivers/scsi/sd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index ed0b1bb99f083..91c34ee972c79 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -1519,7 +1519,7 @@ static int sd_getgeo(struct block_device *bdev, struct 
hd_geometry *geo)
 }
 
 /**
- * sd_ioctl - process an ioctl
+ * sd_ioctl_common - process an ioctl
  * @bdev: target block device
  * @mode: FMODE_* mask
  * @cmd: ioctl command number
-- 
2.27.0



[PATCH 03/36] scsi: mvumi: Fix formatting and doc-rot issues

2021-03-17 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/scsi/mvumi.c:191: warning: Function parameter or member 'sg_count' not 
described in 'mvumi_make_sgl'
 drivers/scsi/mvumi.c:1301: warning: Function parameter or member 'ob_frame' 
not described in 'mvumi_complete_cmd'
 drivers/scsi/mvumi.c:2084: warning: Function parameter or member 'shost' not 
described in 'mvumi_queue_command'
 drivers/scsi/mvumi.c:2084: warning: Excess function parameter 'done' 
description in 'mvumi_queue_command'

Cc: "James E.J. Bottomley" 
Cc: "Martin K. Petersen" 
Cc: Marvell 
Cc: linux-s...@vger.kernel.org
Signed-off-by: Lee Jones 
---
 drivers/scsi/mvumi.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/mvumi.c b/drivers/scsi/mvumi.c
index 71b6a1f834cd7..f41982a4b3abd 100644
--- a/drivers/scsi/mvumi.c
+++ b/drivers/scsi/mvumi.c
@@ -182,7 +182,7 @@ static void mvumi_release_mem_resource(struct mvumi_hba 
*mhba)
  * @mhba:  Adapter soft state
  * @scmd:  SCSI command from the mid-layer
  * @sgl_p: SGL to be filled in
- * @sg_count   return the number of SG elements
+ * @sg_count:  return the number of SG elements
  *
  * If successful, this function returns 0. otherwise, it returns -1.
  */
@@ -1295,6 +1295,7 @@ static unsigned char mvumi_start(struct mvumi_hba *mhba)
  * mvumi_complete_cmd -Completes a command
  * @mhba:  Adapter soft state
  * @cmd:   Command to be completed
+ * @ob_frame:  Command response
  */
 static void mvumi_complete_cmd(struct mvumi_hba *mhba, struct mvumi_cmd *cmd,
struct mvumi_rsp_frame *ob_frame)
@@ -2076,8 +2077,8 @@ static unsigned char mvumi_build_frame(struct mvumi_hba 
*mhba,
 
 /**
  * mvumi_queue_command -   Queue entry point
+ * @shost: Scsi host to queue command on
  * @scmd:  SCSI command to be queued
- * @done:  Callback entry point
  */
 static int mvumi_queue_command(struct Scsi_Host *shost,
struct scsi_cmnd *scmd)
-- 
2.27.0



[PATCH 01/36] scsi: myrb: Demote non-conformant kernel-doc headers and fix others

2021-03-17 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/scsi/myrb.c:91: warning: Function parameter or member 'pdev' not 
described in 'myrb_create_mempools'
 drivers/scsi/myrb.c:91: warning: Function parameter or member 'cb' not 
described in 'myrb_create_mempools'
 drivers/scsi/myrb.c:141: warning: Function parameter or member 'cb' not 
described in 'myrb_destroy_mempools'
 drivers/scsi/myrb.c:153: warning: Function parameter or member 'cmd_blk' not 
described in 'myrb_reset_cmd'
 drivers/scsi/myrb.c:164: warning: Function parameter or member 'cb' not 
described in 'myrb_qcmd'
 drivers/scsi/myrb.c:164: warning: Function parameter or member 'cmd_blk' not 
described in 'myrb_qcmd'
 drivers/scsi/myrb.c:187: warning: Function parameter or member 'cb' not 
described in 'myrb_exec_cmd'
 drivers/scsi/myrb.c:187: warning: Function parameter or member 'cmd_blk' not 
described in 'myrb_exec_cmd'
 drivers/scsi/myrb.c:208: warning: Function parameter or member 'cb' not 
described in 'myrb_exec_type3'
 drivers/scsi/myrb.c:208: warning: Function parameter or member 'op' not 
described in 'myrb_exec_type3'
 drivers/scsi/myrb.c:208: warning: Function parameter or member 'addr' not 
described in 'myrb_exec_type3'
 drivers/scsi/myrb.c:231: warning: Function parameter or member 'cb' not 
described in 'myrb_exec_type3D'
 drivers/scsi/myrb.c:231: warning: Function parameter or member 'op' not 
described in 'myrb_exec_type3D'
 drivers/scsi/myrb.c:231: warning: Function parameter or member 'sdev' not 
described in 'myrb_exec_type3D'
 drivers/scsi/myrb.c:231: warning: Function parameter or member 'pdev_info' not 
described in 'myrb_exec_type3D'
 drivers/scsi/myrb.c:341: warning: Function parameter or member 'cb' not 
described in 'myrb_get_errtable'
 drivers/scsi/myrb.c:388: warning: Function parameter or member 'cb' not 
described in 'myrb_get_ldev_info'
 drivers/scsi/myrb.c:440: warning: Function parameter or member 'cb' not 
described in 'myrb_get_rbld_progress'
 drivers/scsi/myrb.c:440: warning: Function parameter or member 'rbld' not 
described in 'myrb_get_rbld_progress'
 drivers/scsi/myrb.c:472: warning: Function parameter or member 'cb' not 
described in 'myrb_update_rbld_progress'
 drivers/scsi/myrb.c:533: warning: Function parameter or member 'cb' not 
described in 'myrb_get_cc_progress'
 drivers/scsi/myrb.c:580: warning: Function parameter or member 'cb' not 
described in 'myrb_bgi_control'
 drivers/scsi/myrb.c:671: warning: Function parameter or member 'cb' not 
described in 'myrb_hba_enquiry'
 drivers/scsi/myrb.c:782: warning: Function parameter or member 'cb' not 
described in 'myrb_set_pdev_state'
 drivers/scsi/myrb.c:782: warning: Function parameter or member 'sdev' not 
described in 'myrb_set_pdev_state'
 drivers/scsi/myrb.c:782: warning: Function parameter or member 'state' not 
described in 'myrb_set_pdev_state'
 drivers/scsi/myrb.c:808: warning: Function parameter or member 'cb' not 
described in 'myrb_enable_mmio'
 drivers/scsi/myrb.c:808: warning: Function parameter or member 'mmio_init_fn' 
not described in 'myrb_enable_mmio'
 drivers/scsi/myrb.c:913: warning: Function parameter or member 'cb' not 
described in 'myrb_get_hba_config'
 drivers/scsi/myrb.c:1200: warning: Function parameter or member 'cb' not 
described in 'myrb_unmap'
 drivers/scsi/myrb.c:1236: warning: Function parameter or member 'cb' not 
described in 'myrb_cleanup'
 drivers/scsi/myrb.c:2249: warning: Function parameter or member 'dev' not 
described in 'myrb_is_raid'
 drivers/scsi/myrb.c:2260: warning: Function parameter or member 'dev' not 
described in 'myrb_get_resync'
 drivers/scsi/myrb.c:2287: warning: Function parameter or member 'dev' not 
described in 'myrb_get_state'
 drivers/scsi/myrb.c:2493: warning: Function parameter or member 'cb' not 
described in 'myrb_err_status'
 drivers/scsi/myrb.c:2493: warning: Function parameter or member 'error' not 
described in 'myrb_err_status'
 drivers/scsi/myrb.c:2493: warning: Function parameter or member 'parm0' not 
described in 'myrb_err_status'
 drivers/scsi/myrb.c:2493: warning: Function parameter or member 'parm1' not 
described in 'myrb_err_status'

Cc: Hannes Reinecke 
Cc: "James E.J. Bottomley" 
Cc: "Martin K. Pe

[PATCH 04/36] scsi: sd_zbc: Place function name into header

2021-03-17 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/scsi/sd_zbc.c:137: warning: wrong kernel-doc identifier on line:

Cc: "James E.J. Bottomley" 
Cc: "Martin K. Petersen" 
Cc: Hannes Reinecke 
Cc: Le Moal 
Cc: Shaun Tancheff 
Cc: linux-s...@vger.kernel.org
Signed-off-by: Lee Jones 
---
 drivers/scsi/sd_zbc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/sd_zbc.c b/drivers/scsi/sd_zbc.c
index ee558675eab4a..232f624c3704f 100644
--- a/drivers/scsi/sd_zbc.c
+++ b/drivers/scsi/sd_zbc.c
@@ -134,7 +134,7 @@ static int sd_zbc_do_report_zones(struct scsi_disk *sdkp, 
unsigned char *buf,
 }
 
 /**
- * Allocate a buffer for report zones reply.
+ * sd_zbc_alloc_report_buffer() - Allocate a buffer for report zones reply.
  * @sdkp: The target disk
  * @nr_zones: Maximum number of zones to report
  * @buflen: Size of the buffer allocated
-- 
2.27.0



[PATCH 6/8] scsi: isci: remote_device: Make local function isci_remote_device_wait_for_resume_from_abort() static

2021-03-17 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

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

Cc: Artur Paszkiewicz 
Cc: "James E.J. Bottomley" 
Cc: "Martin K. Petersen" 
Cc: linux-s...@vger.kernel.org
Signed-off-by: Lee Jones 
---
 drivers/scsi/isci/remote_device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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



[PATCH 1/8] scsi: BusLogic: Supply __printf(x, y) formatting for blogic_msg()

2021-03-17 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

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

Cc: Khalid Aziz 
Cc: "James E.J. Bottomley" 
Cc: "Martin K. Petersen" 
Cc: "Leonard N. Zubkoff" 
Cc: linux-s...@vger.kernel.org
Signed-off-by: Lee Jones 
---
 drivers/scsi/BusLogic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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



[PATCH 2/8] scsi: nsp32: Supply __printf(x, y) formatting for nsp32_message()

2021-03-17 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

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

Cc: GOTO Masanori 
Cc: YOKOTA Hiroshi 
Cc: "James E.J. Bottomley" 
Cc: "Martin K. Petersen" 
Cc: go...@debian.org
Cc: linux-s...@vger.kernel.org
Signed-off-by: Lee Jones 
---
 drivers/scsi/nsp32.c | 1 +
 1 file changed, 1 insertion(+)

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



[PATCH 0/8] [Set 3 v2] Rid W=1 warnings in SCSI

2021-03-17 Thread Lee Jones
This set contains functional changes.

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

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

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

Cc: Artur Paszkiewicz 
Cc: c by 
Cc: GOTO Masanori 
Cc: go...@debian.org
Cc: "James E.J. Bottomley" 
Cc: Khalid Aziz 
Cc: "Leonard N. Zubkoff" 
Cc: linux-s...@vger.kernel.org
Cc: "Martin K. Petersen" 
Cc: Richard Hirst 
Cc: YOKOTA Hiroshi 
-- 
2.27.0



[PATCH 4/8] scsi: FlashPoint: Remove unused variable 'TID' from 'FlashPoint_AbortCCB()'

2021-03-17 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

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

Cc: Khalid Aziz 
Cc: "James E.J. Bottomley" 
Cc: "Martin K. Petersen" 
Cc: linux-s...@vger.kernel.org
Signed-off-by: Lee Jones 
---
 drivers/scsi/FlashPoint.c | 4 
 1 file changed, 4 deletions(-)

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



[PATCH 7/8] scsi: isci: port: Make local function 'port_state_name()' static

2021-03-17 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

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

Cc: Artur Paszkiewicz 
Cc: "James E.J. Bottomley" 
Cc: "Martin K. Petersen" 
Cc: linux-s...@vger.kernel.org
Signed-off-by: Lee Jones 
---
 drivers/scsi/isci/port.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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



[PATCH 3/8] scsi: nsp32: Remove or exclude unused variables

2021-03-17 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

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

Cc: GOTO Masanori 
Cc: YOKOTA Hiroshi 
Cc: "James E.J. Bottomley" 
Cc: "Martin K. Petersen" 
Cc: go...@debian.org
Cc: linux-s...@vger.kernel.org
Signed-off-by: Lee Jones 
---
 drivers/scsi/nsp32.c | 23 ---
 1 file changed, 4 insertions(+), 19 deletions(-)

diff --git a/drivers/scsi/nsp32.c b/drivers/scsi/nsp32.c
index d5aa96f05bce4..54abda4d07c64 100644
--- a/drivers/scsi/nsp32.c
+++ b/drivers/scsi/nsp32.c
@@ -581,7 +581,6 @@ static int nsp32_selection_autoscsi(struct scsi_cmnd *SCpnt)
int status;
unsigned short  command = 0;
unsigned intmsgout  = 0;
-   unsigned short  execph;
int i;
 
nsp32_dbg(NSP32_DEBUG_AUTOSCSI, "in");
@@ -605,7 +604,7 @@ static int nsp32_selection_autoscsi(struct scsi_cmnd *SCpnt)
/*
 * clear execph
 */
-   execph = nsp32_read2(base, SCSI_EXECUTE_PHASE);
+   nsp32_read2(base, SCSI_EXECUTE_PHASE);
 
/*
 * clear FIFO counter to set CDBs
@@ -1781,8 +1780,6 @@ static void nsp32_msgout_occur(struct scsi_cmnd *SCpnt)
 {
nsp32_hw_data *data = (nsp32_hw_data *)SCpnt->device->host->hostdata;
unsigned int base   = SCpnt->device->host->io_port;
-   //unsigned short command;
-   long new_sgtp;
int i;

nsp32_dbg(NSP32_DEBUG_MSGOUTOCCUR,
@@ -1796,14 +1793,6 @@ static void nsp32_msgout_occur(struct scsi_cmnd *SCpnt)
nsp32_build_nop(SCpnt);
}
 
-   /*
-* Set SGTP ADDR current entry for restarting AUTOSCSI, 
-* because SGTP is incremented next point.
-* There is few statement in the specification...
-*/
-   new_sgtp = data->cur_lunt->sglun_paddr + 
-  (data->cur_lunt->cur_entry * sizeof(nsp32_sgtable));
-
/*
 * send messages
 */
@@ -2220,17 +2209,12 @@ static void nsp32_analyze_sdtr(struct scsi_cmnd *SCpnt)
 {
nsp32_hw_data   *data = (nsp32_hw_data *)SCpnt->device->host->hostdata;
nsp32_target *target = data->cur_target;
-   nsp32_sync_table *synct;
unsigned char get_period = data->msginbuf[3];
unsigned char get_offset = data->msginbuf[4];
int   entry;
-   int   syncnum;
 
nsp32_dbg(NSP32_DEBUG_MSGINOCCUR, "enter");
 
-   synct   = data->synct;
-   syncnum = data->syncnum;
-
/*
 * If this inititor sent the SDTR message, then target responds SDTR,
 * initiator SYNCREG, ACKWIDTH from SDTR parameter.
@@ -2838,8 +2822,8 @@ static int nsp32_eh_abort(struct scsi_cmnd *SCpnt)
 static void nsp32_do_bus_reset(nsp32_hw_data *data)
 {
unsigned int   base = data->BaseAddress;
-   unsigned short intrdat;
int i;
+   unsigned short __maybe_unused intrdat;
 
nsp32_dbg(NSP32_DEBUG_BUSRESET, "in");
 
@@ -2909,7 +2893,8 @@ static int nsp32_getprom_param(nsp32_hw_data *data)
 {
int vendor = data->pci_devid->vendor;
int device = data->pci_devid->device;
-   int ret, val, i;
+   int ret, i;
+   int __maybe_unused val;
 
/*
 * EEPROM checking.
-- 
2.27.0



[PATCH 8/8] scsi: nsp32: Correct expected types in debug print formatting

2021-03-17 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

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

Cc: GOTO Masanori 
Cc: YOKOTA Hiroshi 
Cc: "James E.J. Bottomley" 
Cc: "Martin K. Petersen" 
Cc: go...@debian.org
Cc: linux-s...@vger.kernel.org
Signed-off-by: Lee Jones 
---
 drivers/scsi/nsp32.c | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

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



Re: [PATCH 00/18] [Set 3] Rid W=1 warnings in SCSI

2021-03-17 Thread Lee Jones
On Wed, 17 Mar 2021, Lee Jones wrote:

> MIME-Version: 1.0
> Content-Type: text/plain; charset=UTF-8
> Content-Transfer-Encoding: 8bit
> 
> This set contains functional changes.
> 
> This set is part of a larger effort attempting to clean-up W=1
> kernel builds, which are currently overwhelmingly riddled with
> niggly little warnings.
> 
> Lee Jones (18):
>   scsi: aic94xx: aic94xx_dump: Remove code that has been unused for at
> least 13 years
>   scsi: mpt3sas: mpt3sas_scs: Move a little data from the stack onto the
> heap
>   scsi: bfa: bfa_fcs_lport: Move a large struct from the stack onto the
> heap
>   scsi: esas2r: esas2r_log: Supply __printf(x, y) formatting for
> esas2r_log_master()
>   scsi: BusLogic: Supply __printf(x, y) formatting for blogic_msg()
>   scsi: nsp32: Supply __printf(x, y) formatting for nsp32_message()
>   scsi: initio: Remove unused variable 'prev'
>   scsi: a100u2w: Remove unused variable 'bios_phys'
>   scsi: myrs: Remove a couple of unused 'status' variables
>   scsi: 3w-: Remove 2 unused variables 'response_que_value' and
> 'tw_dev'
>   scsi: 3w-9xxx: Remove a few set but unused variables
>   scsi: 3w-sas: Remove unused variables 'sglist' and 'tw_dev'
>   scsi: nsp32: Remove or exclude unused variables
>   scsi: FlashPoint: Remove unused variable 'TID' from
> 'FlashPoint_AbortCCB()'
>   scsi: sim710: Remove unused variable 'err' from sim710_init()
>   scsi: isci: port: Make local function 'port_state_name()' static
>   scsi: isci: remote_device: Make local function
> isci_remote_device_wait_for_resume_from_abort() static
>   scsi: nsp32: Correct expected types in debug print formatting

Oh dear! Looks like I also took functional patches from sets that
have already been sent out.

Please silently disregard this set. Sorry for the noise.

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


[PATCH 08/18] scsi: a100u2w: Remove unused variable 'bios_phys'

2021-03-17 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/scsi/a100u2w.c: In function ‘inia100_probe_one’:
 drivers/scsi/a100u2w.c:1092:8: warning: variable ‘bios_phys’ set but not used 
[-Wunused-but-set-variable]

Cc: "James E.J. Bottomley" 
Cc: "Martin K. Petersen" 
Cc: Doug Ledford 
Cc: Christoph Hellwig 
Cc: Alan Cox 
Cc: linux-s...@vger.kernel.org
Signed-off-by: Lee Jones 
---
 drivers/scsi/a100u2w.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/scsi/a100u2w.c b/drivers/scsi/a100u2w.c
index 66c514310f3c5..c99224a128f82 100644
--- a/drivers/scsi/a100u2w.c
+++ b/drivers/scsi/a100u2w.c
@@ -1089,7 +1089,6 @@ static int inia100_probe_one(struct pci_dev *pdev,
int error = -ENODEV;
u32 sz;
unsigned long biosaddr;
-   char *bios_phys;
 
if (pci_enable_device(pdev))
goto out;
@@ -1141,7 +1140,6 @@ static int inia100_probe_one(struct pci_dev *pdev,
 
biosaddr = host->BIOScfg;
biosaddr = (biosaddr << 4);
-   bios_phys = phys_to_virt(biosaddr);
if (init_orchid(host)) {/* Initialize orchid chip */
printk("inia100: initial orchid fail!!\n");
goto out_free_escb_array;
-- 
2.27.0



[PATCH 11/18] scsi: 3w-9xxx: Remove a few set but unused variables

2021-03-17 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/scsi/3w-9xxx.c: In function ‘twa_empty_response_queue’:
 drivers/scsi/3w-9xxx.c:942:24: warning: variable ‘response_que_value’ set but 
not used [-Wunused-but-set-variable]
 drivers/scsi/3w-9xxx.c: In function ‘twa_scsi_biosparam’:
 drivers/scsi/3w-9xxx.c:1701:23: warning: variable ‘tw_dev’ set but not used 
[-Wunused-but-set-variable]
 drivers/scsi/3w-9xxx.c: In function ‘twa_scsiop_execute_scsi’:
 drivers/scsi/3w-9xxx.c:1812:22: warning: variable ‘sglist’ set but not used 
[-Wunused-but-set-variable]

Cc: Adam Radford 
Cc: "James E.J. Bottomley" 
Cc: "Martin K. Petersen" 
Cc: linux-s...@vger.kernel.org
Signed-off-by: Lee Jones 
---
 drivers/scsi/3w-9xxx.c | 14 --
 1 file changed, 4 insertions(+), 10 deletions(-)

diff --git a/drivers/scsi/3w-9xxx.c b/drivers/scsi/3w-9xxx.c
index b96e82de4237d..47028f5e57abd 100644
--- a/drivers/scsi/3w-9xxx.c
+++ b/drivers/scsi/3w-9xxx.c
@@ -939,13 +939,13 @@ static int twa_decode_bits(TW_Device_Extension *tw_dev, 
u32 status_reg_value)
 /* This function will empty the response queue */
 static int twa_empty_response_queue(TW_Device_Extension *tw_dev)
 {
-   u32 status_reg_value, response_que_value;
+   u32 status_reg_value;
int count = 0, retval = 1;
 
status_reg_value = readl(TW_STATUS_REG_ADDR(tw_dev));
 
while (((status_reg_value & TW_STATUS_RESPONSE_QUEUE_EMPTY) == 0) && 
(count < TW_MAX_RESPONSE_DRAIN)) {
-   response_que_value = readl(TW_RESPONSE_QUEUE_REG_ADDR(tw_dev));
+   readl(TW_RESPONSE_QUEUE_REG_ADDR(tw_dev));
status_reg_value = readl(TW_STATUS_REG_ADDR(tw_dev));
count++;
}
@@ -1698,9 +1698,6 @@ static int twa_reset_sequence(TW_Device_Extension 
*tw_dev, int soft_reset)
 static int twa_scsi_biosparam(struct scsi_device *sdev, struct block_device 
*bdev, sector_t capacity, int geom[])
 {
int heads, sectors, cylinders;
-   TW_Device_Extension *tw_dev;
-
-   tw_dev = (TW_Device_Extension *)sdev->host->hostdata;
 
if (capacity >= 0x20) {
heads = 255;
@@ -1809,14 +1806,11 @@ static int twa_scsiop_execute_scsi(TW_Device_Extension 
*tw_dev, int request_id,
u32 num_sectors = 0x0;
int i, sg_count;
struct scsi_cmnd *srb = NULL;
-   struct scatterlist *sglist = NULL, *sg;
+   struct scatterlist *sg;
int retval = 1;
 
-   if (tw_dev->srb[request_id]) {
+   if (tw_dev->srb[request_id])
srb = tw_dev->srb[request_id];
-   if (scsi_sglist(srb))
-   sglist = scsi_sglist(srb);
-   }
 
/* Initialize command packet */
full_command_packet = tw_dev->command_packet_virt[request_id];
-- 
2.27.0



[PATCH 12/18] scsi: 3w-sas: Remove unused variables 'sglist' and 'tw_dev'

2021-03-17 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/scsi/3w-sas.c: In function ‘twl_scsiop_execute_scsi’:
 drivers/scsi/3w-sas.c:298:22: warning: variable ‘sglist’ set but not used 
[-Wunused-but-set-variable]
 drivers/scsi/3w-sas.c: In function ‘twl_scsi_biosparam’:
 drivers/scsi/3w-sas.c:1411:23: warning: variable ‘tw_dev’ set but not used 
[-Wunused-but-set-variable]

Cc: Adam Radford 
Cc: "James E.J. Bottomley" 
Cc: "Martin K. Petersen" 
Cc: linux-s...@vger.kernel.org
Signed-off-by: Lee Jones 
---
 drivers/scsi/3w-sas.c | 10 ++
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/drivers/scsi/3w-sas.c b/drivers/scsi/3w-sas.c
index 3db0e42e9aa75..383f6f204c24b 100644
--- a/drivers/scsi/3w-sas.c
+++ b/drivers/scsi/3w-sas.c
@@ -295,14 +295,11 @@ static int twl_scsiop_execute_scsi(TW_Device_Extension 
*tw_dev, int request_id,
TW_Command_Apache *command_packet;
int i, sg_count;
struct scsi_cmnd *srb = NULL;
-   struct scatterlist *sglist = NULL, *sg;
+   struct scatterlist *sg;
int retval = 1;
 
-   if (tw_dev->srb[request_id]) {
+   if (tw_dev->srb[request_id])
srb = tw_dev->srb[request_id];
-   if (scsi_sglist(srb))
-   sglist = scsi_sglist(srb);
-   }
 
/* Initialize command packet */
full_command_packet = tw_dev->command_packet_virt[request_id];
@@ -1408,9 +1405,6 @@ static int twl_reset_device_extension(TW_Device_Extension 
*tw_dev, int ioctl_res
 static int twl_scsi_biosparam(struct scsi_device *sdev, struct block_device 
*bdev, sector_t capacity, int geom[])
 {
int heads, sectors;
-   TW_Device_Extension *tw_dev;
-
-   tw_dev = (TW_Device_Extension *)sdev->host->hostdata;
 
if (capacity >= 0x20) {
heads = 255;
-- 
2.27.0



[PATCH 17/18] scsi: isci: remote_device: Make local function isci_remote_device_wait_for_resume_from_abort() static

2021-03-17 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

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

Cc: Artur Paszkiewicz 
Cc: "James E.J. Bottomley" 
Cc: "Martin K. Petersen" 
Cc: linux-s...@vger.kernel.org
Signed-off-by: Lee Jones 
---
 drivers/scsi/isci/remote_device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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



[PATCH 16/18] scsi: isci: port: Make local function 'port_state_name()' static

2021-03-17 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

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

Cc: Artur Paszkiewicz 
Cc: "James E.J. Bottomley" 
Cc: "Martin K. Petersen" 
Cc: linux-s...@vger.kernel.org
Signed-off-by: Lee Jones 
---
 drivers/scsi/isci/port.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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



[PATCH 18/18] scsi: nsp32: Correct expected types in debug print formatting

2021-03-17 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

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

Cc: GOTO Masanori 
Cc: YOKOTA Hiroshi 
Cc: "James E.J. Bottomley" 
Cc: "Martin K. Petersen" 
Cc: go...@debian.org
Cc: linux-s...@vger.kernel.org
Signed-off-by: Lee Jones 
---
 drivers/scsi/nsp32.c | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

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



[PATCH 14/18] scsi: FlashPoint: Remove unused variable 'TID' from 'FlashPoint_AbortCCB()'

2021-03-17 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

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

Cc: Khalid Aziz 
Cc: "James E.J. Bottomley" 
Cc: "Martin K. Petersen" 
Cc: linux-s...@vger.kernel.org
Signed-off-by: Lee Jones 
---
 drivers/scsi/FlashPoint.c | 4 
 1 file changed, 4 deletions(-)

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



[PATCH 13/18] scsi: nsp32: Remove or exclude unused variables

2021-03-17 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

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

Cc: GOTO Masanori 
Cc: YOKOTA Hiroshi 
Cc: "James E.J. Bottomley" 
Cc: "Martin K. Petersen" 
Cc: go...@debian.org
Cc: linux-s...@vger.kernel.org
Signed-off-by: Lee Jones 
---
 drivers/scsi/nsp32.c | 23 ---
 1 file changed, 4 insertions(+), 19 deletions(-)

diff --git a/drivers/scsi/nsp32.c b/drivers/scsi/nsp32.c
index d5aa96f05bce4..54abda4d07c64 100644
--- a/drivers/scsi/nsp32.c
+++ b/drivers/scsi/nsp32.c
@@ -581,7 +581,6 @@ static int nsp32_selection_autoscsi(struct scsi_cmnd *SCpnt)
int status;
unsigned short  command = 0;
unsigned intmsgout  = 0;
-   unsigned short  execph;
int i;
 
nsp32_dbg(NSP32_DEBUG_AUTOSCSI, "in");
@@ -605,7 +604,7 @@ static int nsp32_selection_autoscsi(struct scsi_cmnd *SCpnt)
/*
 * clear execph
 */
-   execph = nsp32_read2(base, SCSI_EXECUTE_PHASE);
+   nsp32_read2(base, SCSI_EXECUTE_PHASE);
 
/*
 * clear FIFO counter to set CDBs
@@ -1781,8 +1780,6 @@ static void nsp32_msgout_occur(struct scsi_cmnd *SCpnt)
 {
nsp32_hw_data *data = (nsp32_hw_data *)SCpnt->device->host->hostdata;
unsigned int base   = SCpnt->device->host->io_port;
-   //unsigned short command;
-   long new_sgtp;
int i;

nsp32_dbg(NSP32_DEBUG_MSGOUTOCCUR,
@@ -1796,14 +1793,6 @@ static void nsp32_msgout_occur(struct scsi_cmnd *SCpnt)
nsp32_build_nop(SCpnt);
}
 
-   /*
-* Set SGTP ADDR current entry for restarting AUTOSCSI, 
-* because SGTP is incremented next point.
-* There is few statement in the specification...
-*/
-   new_sgtp = data->cur_lunt->sglun_paddr + 
-  (data->cur_lunt->cur_entry * sizeof(nsp32_sgtable));
-
/*
 * send messages
 */
@@ -2220,17 +2209,12 @@ static void nsp32_analyze_sdtr(struct scsi_cmnd *SCpnt)
 {
nsp32_hw_data   *data = (nsp32_hw_data *)SCpnt->device->host->hostdata;
nsp32_target *target = data->cur_target;
-   nsp32_sync_table *synct;
unsigned char get_period = data->msginbuf[3];
unsigned char get_offset = data->msginbuf[4];
int   entry;
-   int   syncnum;
 
nsp32_dbg(NSP32_DEBUG_MSGINOCCUR, "enter");
 
-   synct   = data->synct;
-   syncnum = data->syncnum;
-
/*
 * If this inititor sent the SDTR message, then target responds SDTR,
 * initiator SYNCREG, ACKWIDTH from SDTR parameter.
@@ -2838,8 +2822,8 @@ static int nsp32_eh_abort(struct scsi_cmnd *SCpnt)
 static void nsp32_do_bus_reset(nsp32_hw_data *data)
 {
unsigned int   base = data->BaseAddress;
-   unsigned short intrdat;
int i;
+   unsigned short __maybe_unused intrdat;
 
nsp32_dbg(NSP32_DEBUG_BUSRESET, "in");
 
@@ -2909,7 +2893,8 @@ static int nsp32_getprom_param(nsp32_hw_data *data)
 {
int vendor = data->pci_devid->vendor;
int device = data->pci_devid->device;
-   int ret, val, i;
+   int ret, i;
+   int __maybe_unused val;
 
/*
 * EEPROM checking.
-- 
2.27.0



[PATCH 10/18] scsi: 3w-xxxx: Remove 2 unused variables 'response_que_value' and 'tw_dev'

2021-03-17 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/scsi/3w-.c: In function ‘tw_empty_response_que’:
 drivers/scsi/3w-.c:463:24: warning: variable ‘response_que_value’ set but 
not used [-Wunused-but-set-variable]
 drivers/scsi/3w-.c: In function ‘tw_scsi_biosparam’:
 drivers/scsi/3w-.c:1345:23: warning: variable ‘tw_dev’ set but not used 
[-Wunused-but-set-variable]

Cc: Adam Radford 
Cc: "James E.J. Bottomley" 
Cc: "Martin K. Petersen" 
Cc: Joel Jacobson 
Cc: de Melo 
Cc: Andre Hedrick 
Cc: linux-s...@vger.kernel.org
Signed-off-by: Lee Jones 
---
 drivers/scsi/3w-.c | 6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/scsi/3w-.c b/drivers/scsi/3w-.c
index d90b9fca4aea2..a7292883b72bc 100644
--- a/drivers/scsi/3w-.c
+++ b/drivers/scsi/3w-.c
@@ -460,12 +460,12 @@ static int tw_check_errors(TW_Device_Extension *tw_dev)
 /* This function will empty the response que */
 static void tw_empty_response_que(TW_Device_Extension *tw_dev)
 {
-   u32 status_reg_value, response_que_value;
+   u32 status_reg_value;
 
status_reg_value = inl(TW_STATUS_REG_ADDR(tw_dev));
 
while ((status_reg_value & TW_STATUS_RESPONSE_QUEUE_EMPTY) == 0) {
-   response_que_value = inl(TW_RESPONSE_QUEUE_REG_ADDR(tw_dev));
+   inl(TW_RESPONSE_QUEUE_REG_ADDR(tw_dev));
status_reg_value = inl(TW_STATUS_REG_ADDR(tw_dev));
}
 } /* End tw_empty_response_que() */
@@ -1342,10 +1342,8 @@ static int tw_scsi_biosparam(struct scsi_device *sdev, 
struct block_device *bdev
 sector_t capacity, int geom[])
 {
int heads, sectors, cylinders;
-   TW_Device_Extension *tw_dev;
 
dprintk(KERN_NOTICE "3w-: tw_scsi_biosparam()\n");
-   tw_dev = (TW_Device_Extension *)sdev->host->hostdata;
 
heads = 64;
sectors = 32;
-- 
2.27.0



[PATCH 15/18] scsi: sim710: Remove unused variable 'err' from sim710_init()

2021-03-17 Thread Lee Jones
Take the opportunity to rework the comment a little.

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

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

Cc: "James E.J. Bottomley" 
Cc: "Martin K. Petersen" 
Cc: Richard Hirst 
Cc: c by 
Cc: linux-s...@vger.kernel.org
Signed-off-by: Lee Jones 
---
 drivers/scsi/sim710.c | 14 ++
 1 file changed, 6 insertions(+), 8 deletions(-)

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



[PATCH 09/18] scsi: myrs: Remove a couple of unused 'status' variables

2021-03-17 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/scsi/myrs.c: In function ‘consistency_check_show’:
 drivers/scsi/myrs.c:1193:16: warning: variable ‘status’ set but not used 
[-Wunused-but-set-variable]
 drivers/scsi/myrs.c: In function ‘myrs_get_resync’:
 drivers/scsi/myrs.c:1984:5: warning: variable ‘status’ set but not used 
[-Wunused-but-set-variable]

Cc: Hannes Reinecke 
Cc: "James E.J. Bottomley" 
Cc: "Martin K. Petersen" 
Cc: Linux GmbH 
Cc: "Leonard N. Zubkoff" 
Cc: linux-s...@vger.kernel.org
Signed-off-by: Lee Jones 
---
 drivers/scsi/myrs.c | 6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/scsi/myrs.c b/drivers/scsi/myrs.c
index 4adf9ded296aa..48e399f057d5c 100644
--- a/drivers/scsi/myrs.c
+++ b/drivers/scsi/myrs.c
@@ -1190,7 +1190,6 @@ static ssize_t consistency_check_show(struct device *dev,
struct myrs_hba *cs = shost_priv(sdev->host);
struct myrs_ldev_info *ldev_info;
unsigned short ldev_num;
-   unsigned char status;
 
if (sdev->channel < cs->ctlr_info->physchan_present)
return snprintf(buf, 32, "physical device - not checking\n");
@@ -1199,7 +1198,7 @@ static ssize_t consistency_check_show(struct device *dev,
if (!ldev_info)
return -ENXIO;
ldev_num = ldev_info->ldev_num;
-   status = myrs_get_ldev_info(cs, ldev_num, ldev_info);
+   myrs_get_ldev_info(cs, ldev_num, ldev_info);
if (ldev_info->cc_active)
return snprintf(buf, 32, "checking block %zu of %zu\n",
(size_t)ldev_info->cc_lba,
@@ -1981,14 +1980,13 @@ myrs_get_resync(struct device *dev)
struct myrs_hba *cs = shost_priv(sdev->host);
struct myrs_ldev_info *ldev_info = sdev->hostdata;
u64 percent_complete = 0;
-   u8 status;
 
if (sdev->channel < cs->ctlr_info->physchan_present || !ldev_info)
return;
if (ldev_info->rbld_active) {
unsigned short ldev_num = ldev_info->ldev_num;
 
-   status = myrs_get_ldev_info(cs, ldev_num, ldev_info);
+   myrs_get_ldev_info(cs, ldev_num, ldev_info);
percent_complete = ldev_info->rbld_lba * 100;
do_div(percent_complete, ldev_info->cfg_devsize);
}
-- 
2.27.0



[PATCH 06/18] scsi: nsp32: Supply __printf(x, y) formatting for nsp32_message()

2021-03-17 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

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

Cc: GOTO Masanori 
Cc: YOKOTA Hiroshi 
Cc: "James E.J. Bottomley" 
Cc: "Martin K. Petersen" 
Cc: go...@debian.org
Cc: linux-s...@vger.kernel.org
Signed-off-by: Lee Jones 
---
 drivers/scsi/nsp32.c | 1 +
 1 file changed, 1 insertion(+)

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



[PATCH 00/18] [Set 3] Rid W=1 warnings in SCSI

2021-03-17 Thread Lee Jones
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

This set contains functional changes.

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

Lee Jones (18):
  scsi: aic94xx: aic94xx_dump: Remove code that has been unused for at
least 13 years
  scsi: mpt3sas: mpt3sas_scs: Move a little data from the stack onto the
heap
  scsi: bfa: bfa_fcs_lport: Move a large struct from the stack onto the
heap
  scsi: esas2r: esas2r_log: Supply __printf(x, y) formatting for
esas2r_log_master()
  scsi: BusLogic: Supply __printf(x, y) formatting for blogic_msg()
  scsi: nsp32: Supply __printf(x, y) formatting for nsp32_message()
  scsi: initio: Remove unused variable 'prev'
  scsi: a100u2w: Remove unused variable 'bios_phys'
  scsi: myrs: Remove a couple of unused 'status' variables
  scsi: 3w-: Remove 2 unused variables 'response_que_value' and
'tw_dev'
  scsi: 3w-9xxx: Remove a few set but unused variables
  scsi: 3w-sas: Remove unused variables 'sglist' and 'tw_dev'
  scsi: nsp32: Remove or exclude unused variables
  scsi: FlashPoint: Remove unused variable 'TID' from
'FlashPoint_AbortCCB()'
  scsi: sim710: Remove unused variable 'err' from sim710_init()
  scsi: isci: port: Make local function 'port_state_name()' static
  scsi: isci: remote_device: Make local function
isci_remote_device_wait_for_resume_from_abort() static
  scsi: nsp32: Correct expected types in debug print formatting

 drivers/scsi/3w-9xxx.c   |  14 +-
 drivers/scsi/3w-sas.c|  10 +-
 drivers/scsi/3w-.c   |   6 +-
 drivers/scsi/BusLogic.c  |   2 +-
 drivers/scsi/FlashPoint.c|   4 -
 drivers/scsi/a100u2w.c   |   2 -
 drivers/scsi/aic94xx/aic94xx_dump.c  | 184 ---
 drivers/scsi/bfa/bfa_fcs_lport.c |  20 ++-
 drivers/scsi/esas2r/esas2r_log.c |   7 +
 drivers/scsi/initio.c|   5 +-
 drivers/scsi/isci/port.c |   2 +-
 drivers/scsi/isci/remote_device.c|   2 +-
 drivers/scsi/mpt3sas/mpt3sas_scsih.c |  38 --
 drivers/scsi/myrs.c  |   6 +-
 drivers/scsi/nsp32.c |  31 ++---
 drivers/scsi/sim710.c|  14 +-
 16 files changed, 77 insertions(+), 270 deletions(-)

Cc: Adam Radford 
Cc: Alan Cox 
Cc: Andre Hedrick 
Cc: Anil Gurumurthy 
Cc: Artur Paszkiewicz 
Cc: Bas Vermeulen 
Cc: Bradley Grove 
Cc: Brian Macy 
Cc: c by 
Cc: Christoph Hellwig 
Cc: David Chaw 
Cc: de Melo 
Cc: Doug Ledford 
Cc: GOTO Masanori 
Cc: go...@debian.org
Cc: Hannes Reinecke 
Cc: "James E.J. Bottomley" 
Cc: Joel Jacobson 
Cc: Khalid Aziz 
Cc: "Leonard N. Zubkoff" 
Cc: Linux GmbH 
Cc: linux-s...@vger.kernel.org
Cc: Luben Tuikov 
Cc: "Martin K. Petersen" 
Cc: mpt-fusionlinux@avagotech.com
Cc: mpt-fusionlinux@broadcom.com
Cc: Richard Hirst 
Cc: Sathya Prakash 
Cc: Sreekanth Reddy 
Cc: Sudarsana Kalluru 
Cc: Suganath Prabu Subramani 
Cc: YOKOTA Hiroshi 
-- 
2.27.0



[PATCH 07/18] scsi: initio: Remove unused variable 'prev'

2021-03-17 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/scsi/initio.c: In function ‘initio_find_busy_scb’:
 drivers/scsi/initio.c:869:30: warning: variable ‘prev’ set but not used 
[-Wunused-but-set-variable]

Cc: "James E.J. Bottomley" 
Cc: "Martin K. Petersen" 
Cc: Bas Vermeulen 
Cc: Christoph Hellwig 
Cc: Brian Macy 
Cc: linux-s...@vger.kernel.org
Signed-off-by: Lee Jones 
---
 drivers/scsi/initio.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/scsi/initio.c b/drivers/scsi/initio.c
index 814acc57069dc..926a7045c2e5c 100644
--- a/drivers/scsi/initio.c
+++ b/drivers/scsi/initio.c
@@ -866,17 +866,16 @@ static void initio_unlink_busy_scb(struct initio_host * 
host, struct scsi_ctrl_b
 
 struct scsi_ctrl_blk *initio_find_busy_scb(struct initio_host * host, u16 
tarlun)
 {
-   struct scsi_ctrl_blk *tmp, *prev;
+   struct scsi_ctrl_blk *tmp;
u16 scbp_tarlun;
 
 
-   prev = tmp = host->first_busy;
+   tmp = host->first_busy;
while (tmp != NULL) {
scbp_tarlun = (tmp->lun << 8) | (tmp->target);
if (scbp_tarlun == tarlun) {/* Unlink this SCB  
*/
break;
}
-   prev = tmp;
tmp = tmp->next;
}
 #if DEBUG_QUEUE
-- 
2.27.0



[PATCH 04/18] scsi: esas2r: esas2r_log: Supply __printf(x, y) formatting for esas2r_log_master()

2021-03-17 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/scsi/esas2r/esas2r_log.c: In function ‘esas2r_log_master’:
 drivers/scsi/esas2r/esas2r_log.c:155:3: warning: function ‘esas2r_log_master’ 
might be a candidate for ‘gnu_printf’ format attribute 
[-Wsuggest-attribute=format]

Cc: Bradley Grove 
Cc: "James E.J. Bottomley" 
Cc: "Martin K. Petersen" 
Cc: linux-s...@vger.kernel.org
Signed-off-by: Lee Jones 
---
 drivers/scsi/esas2r/esas2r_log.c | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/drivers/scsi/esas2r/esas2r_log.c b/drivers/scsi/esas2r/esas2r_log.c
index b545798e400c4..d6c87a0bae098 100644
--- a/drivers/scsi/esas2r/esas2r_log.c
+++ b/drivers/scsi/esas2r/esas2r_log.c
@@ -101,6 +101,11 @@ static const char 
*translate_esas2r_event_level_to_kernel(const long level)
}
 }
 
+#pragma GCC diagnostic push
+#ifndef __clang__
+#pragma GCC diagnostic ignored "-Wsuggest-attribute=format"
+#endif
+
 /*
  * the master logging function.  this function will format the message as
  * outlined by the formatting string, the input device information and the
@@ -170,6 +175,8 @@ static int esas2r_log_master(const long level,
return 0;
 }
 
+#pragma GCC diagnostic pop
+
 /*
  * formats and logs a message to the system log.
  *
-- 
2.27.0



[PATCH 05/18] scsi: BusLogic: Supply __printf(x, y) formatting for blogic_msg()

2021-03-17 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

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

Cc: Khalid Aziz 
Cc: "James E.J. Bottomley" 
Cc: "Martin K. Petersen" 
Cc: "Leonard N. Zubkoff" 
Cc: linux-s...@vger.kernel.org
Signed-off-by: Lee Jones 
---
 drivers/scsi/BusLogic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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



[PATCH 03/18] scsi: bfa: bfa_fcs_lport: Move a large struct from the stack onto the heap

2021-03-17 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/scsi/bfa/bfa_fcs_lport.c: In function 
‘bfa_fcs_lport_fdmi_build_rhba_pyld’:
 drivers/scsi/bfa/bfa_fcs_lport.c:2152:1: warning: the frame size of 1200 bytes 
is larger than 1024 bytes [-Wframe-larger-than=]

Cc: Anil Gurumurthy 
Cc: Sudarsana Kalluru 
Cc: "James E.J. Bottomley" 
Cc: "Martin K. Petersen" 
Cc: linux-s...@vger.kernel.org
Signed-off-by: Lee Jones 
---
 drivers/scsi/bfa/bfa_fcs_lport.c | 20 ++--
 1 file changed, 14 insertions(+), 6 deletions(-)

diff --git a/drivers/scsi/bfa/bfa_fcs_lport.c b/drivers/scsi/bfa/bfa_fcs_lport.c
index 49a14157f123c..b12afcc4b1894 100644
--- a/drivers/scsi/bfa/bfa_fcs_lport.c
+++ b/drivers/scsi/bfa/bfa_fcs_lport.c
@@ -1408,7 +1408,7 @@ static void bfa_fcs_lport_fdmi_rpa_response(void 
*fcsarg,
   u32 resid_len,
   struct fchs_s *rsp_fchs);
 static void bfa_fcs_lport_fdmi_timeout(void *arg);
-static u16 bfa_fcs_lport_fdmi_build_rhba_pyld(struct bfa_fcs_lport_fdmi_s 
*fdmi,
+static int bfa_fcs_lport_fdmi_build_rhba_pyld(struct bfa_fcs_lport_fdmi_s 
*fdmi,
  u8 *pyld);
 static u16 bfa_fcs_lport_fdmi_build_rprt_pyld(struct bfa_fcs_lport_fdmi_s 
*fdmi,
  u8 *pyld);
@@ -1887,6 +1887,8 @@ bfa_fcs_lport_fdmi_send_rhba(void *fdmi_cbarg, struct 
bfa_fcxp_s *fcxp_alloced)
bfa_fcs_lport_fdmi_build_rhba_pyld(fdmi,
  (u8 *) ((struct ct_hdr_s *) pyld
   + 1));
+   if (attr_len < 0)
+   return;
 
bfa_fcxp_send(fcxp, NULL, port->fabric->vf_id, port->lp_tag, BFA_FALSE,
  FC_CLASS_3, (len + attr_len), &fchs,
@@ -1896,17 +1898,20 @@ bfa_fcs_lport_fdmi_send_rhba(void *fdmi_cbarg, struct 
bfa_fcxp_s *fcxp_alloced)
bfa_sm_send_event(fdmi, FDMISM_EVENT_RHBA_SENT);
 }
 
-static  u16
+static int
 bfa_fcs_lport_fdmi_build_rhba_pyld(struct bfa_fcs_lport_fdmi_s *fdmi, u8 *pyld)
 {
struct bfa_fcs_lport_s *port = fdmi->ms->port;
-   struct bfa_fcs_fdmi_hba_attr_s hba_attr;
-   struct bfa_fcs_fdmi_hba_attr_s *fcs_hba_attr = &hba_attr;
+   struct bfa_fcs_fdmi_hba_attr_s *fcs_hba_attr;
struct fdmi_rhba_s *rhba = (struct fdmi_rhba_s *) pyld;
struct fdmi_attr_s *attr;
+   intlen;
u8*curr_ptr;
-   u16len, count;
-   u16 templen;
+   u16 templen, count;
+
+   fcs_hba_attr = kzalloc(sizeof(*fcs_hba_attr), GFP_KERNEL);
+   if (!fcs_hba_attr)
+   return -ENOMEM;
 
/*
 * get hba attributes
@@ -2148,6 +2153,9 @@ bfa_fcs_lport_fdmi_build_rhba_pyld(struct 
bfa_fcs_lport_fdmi_s *fdmi, u8 *pyld)
len += ((sizeof(attr->type) + sizeof(attr->len)) * count);
 
rhba->hba_attr_blk.attr_count = cpu_to_be32(count);
+
+   kfree(fcs_hba_attr);
+
return len;
 }
 
-- 
2.27.0



[PATCH 02/18] scsi: mpt3sas: mpt3sas_scs: Move a little data from the stack onto the heap

2021-03-17 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/scsi/mpt3sas/mpt3sas_scsih.c: In function 
‘_scsih_scan_for_devices_after_reset’:
 drivers/scsi/mpt3sas/mpt3sas_scsih.c:10473:1: warning: the frame size of 1064 
bytes is larger than 1024 bytes [-Wframe-larger-than=]

Cc: Sathya Prakash 
Cc: Sreekanth Reddy 
Cc: Suganath Prabu Subramani 
Cc: "James E.J. Bottomley" 
Cc: "Martin K. Petersen" 
Cc: mpt-fusionlinux@avagotech.com
Cc: mpt-fusionlinux@broadcom.com
Cc: linux-s...@vger.kernel.org
Signed-off-by: Lee Jones 
---
 drivers/scsi/mpt3sas/mpt3sas_scsih.c | 38 +++-
 1 file changed, 26 insertions(+), 12 deletions(-)

diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c 
b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
index 7bd0a57e5b928..945531e94d7e4 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
@@ -10219,8 +10219,8 @@ _scsih_scan_for_devices_after_reset(struct 
MPT3SAS_ADAPTER *ioc)
Mpi2ExpanderPage0_t expander_pg0;
Mpi2SasDevicePage0_t sas_device_pg0;
Mpi26PCIeDevicePage0_t pcie_device_pg0;
-   Mpi2RaidVolPage1_t volume_pg1;
-   Mpi2RaidVolPage0_t volume_pg0;
+   Mpi2RaidVolPage1_t *volume_pg1;
+   Mpi2RaidVolPage0_t *volume_pg0;
Mpi2RaidPhysDiskPage0_t pd_pg0;
Mpi2EventIrConfigElement_t element;
Mpi2ConfigReply_t mpi_reply;
@@ -10235,6 +10235,16 @@ _scsih_scan_for_devices_after_reset(struct 
MPT3SAS_ADAPTER *ioc)
u8 retry_count;
unsigned long flags;
 
+   volume_pg0 = kzalloc(sizeof(*volume_pg0), GFP_KERNEL);
+   if (!volume_pg0)
+   return;
+
+   volume_pg1 = kzalloc(sizeof(*volume_pg1), GFP_KERNEL);
+   if (!volume_pg1) {
+   kfree(volume_pg0);
+   return;
+   }
+
ioc_info(ioc, "scan devices: start\n");
 
_scsih_sas_host_refresh(ioc);
@@ -10344,7 +10354,7 @@ _scsih_scan_for_devices_after_reset(struct 
MPT3SAS_ADAPTER *ioc)
/* volumes */
handle = 0x;
while (!(mpt3sas_config_get_raid_volume_pg1(ioc, &mpi_reply,
-   &volume_pg1, MPI2_RAID_VOLUME_PGAD_FORM_GET_NEXT_HANDLE, handle))) {
+   volume_pg1, MPI2_RAID_VOLUME_PGAD_FORM_GET_NEXT_HANDLE, handle))) {
ioc_status = le16_to_cpu(mpi_reply.IOCStatus) &
MPI2_IOCSTATUS_MASK;
if (ioc_status != MPI2_IOCSTATUS_SUCCESS) {
@@ -10352,15 +10362,15 @@ _scsih_scan_for_devices_after_reset(struct 
MPT3SAS_ADAPTER *ioc)
 ioc_status, le32_to_cpu(mpi_reply.IOCLogInfo));
break;
}
-   handle = le16_to_cpu(volume_pg1.DevHandle);
+   handle = le16_to_cpu(volume_pg1->DevHandle);
spin_lock_irqsave(&ioc->raid_device_lock, flags);
raid_device = _scsih_raid_device_find_by_wwid(ioc,
-   le64_to_cpu(volume_pg1.WWID));
+   le64_to_cpu(volume_pg1->WWID));
spin_unlock_irqrestore(&ioc->raid_device_lock, flags);
if (raid_device)
continue;
if (mpt3sas_config_get_raid_volume_pg0(ioc, &mpi_reply,
-   &volume_pg0, MPI2_RAID_VOLUME_PGAD_FORM_HANDLE, handle,
+   volume_pg0, MPI2_RAID_VOLUME_PGAD_FORM_HANDLE, handle,
 sizeof(Mpi2RaidVolPage0_t)))
continue;
ioc_status = le16_to_cpu(mpi_reply.IOCStatus) &
@@ -10370,17 +10380,17 @@ _scsih_scan_for_devices_after_reset(struct 
MPT3SAS_ADAPTER *ioc)
 ioc_status, le32_to_cpu(mpi_reply.IOCLogInfo));
break;
}
-   if (volume_pg0.VolumeState == MPI2_RAID_VOL_STATE_OPTIMAL ||
-   volume_pg0.VolumeState == MPI2_RAID_VOL_STATE_ONLINE ||
-   volume_pg0.VolumeState == MPI2_RAID_VOL_STATE_DEGRADED) {
+   if (volume_pg0->VolumeState == MPI2_RAID_VOL_STATE_OPTIMAL ||
+   volume_pg0->VolumeState == MPI2_RAID_VOL_STATE_ONLINE ||
+   volume_pg0->VolumeState == MPI2_RAID_VOL_STATE_DEGRADED) {
memset(&element, 0, sizeof(Mpi2EventIrConfigElement_t));
element.ReasonCode = MPI2_EVENT_IR_CHANGE_RC_ADDED;
-   element.VolDevHandle = volume_pg1.DevHandle;
+   element.VolDevHandle = volume_pg1->DevHandle;
ioc_info(ioc, "\tBEFORE adding volume: handle 
(0x%04x)\n",
-volume_pg1.DevHandle);
+volume_pg1->DevHandle);
_scsih_sas_volume_add(ioc, &element);
ioc_info(ioc, "\tAFTER adding volume: handle 
(0x%04x)\n",
-volu

[PATCH 01/18] scsi: aic94xx: aic94xx_dump: Remove code that has been unused for at least 13 years

2021-03-17 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/scsi/aic94xx/aic94xx_dump.c:731: warning: expecting prototype for 
asd_dump_ddb_site(). Prototype was for asd_dump_target_ddb() instead
 drivers/scsi/aic94xx/aic94xx_dump.c:875: warning: expecting prototype for 
ads_dump_seq_state(). Prototype was for asd_dump_seq_state() instead

Cc: "James E.J. Bottomley" 
Cc: "Martin K. Petersen" 
Cc: David Chaw 
Cc: Luben Tuikov 
Cc: linux-s...@vger.kernel.org
Signed-off-by: Lee Jones 
---
 drivers/scsi/aic94xx/aic94xx_dump.c | 184 
 1 file changed, 184 deletions(-)

diff --git a/drivers/scsi/aic94xx/aic94xx_dump.c 
b/drivers/scsi/aic94xx/aic94xx_dump.c
index 7c4c53a54b782..47a663a39dcce 100644
--- a/drivers/scsi/aic94xx/aic94xx_dump.c
+++ b/drivers/scsi/aic94xx/aic94xx_dump.c
@@ -720,152 +720,6 @@ static void asd_dump_lseq_state(struct asd_ha_struct 
*asd_ha, int lseq)
PRINT_LMIP_dword(asd_ha, lseq, DEV_PRES_TIMER_TERM_TS);
 }
 
-#if 0
-
-/**
- * asd_dump_ddb_site -- dump a CSEQ DDB site
- * @asd_ha: pointer to host adapter structure
- * @site_no: site number of interest
- */
-void asd_dump_target_ddb(struct asd_ha_struct *asd_ha, u16 site_no)
-{
-   if (site_no >= asd_ha->hw_prof.max_ddbs)
-   return;
-
-#define DDB_FIELDB(__name)\
-   asd_ddbsite_read_byte(asd_ha, site_no,\
- offsetof(struct asd_ddb_ssp_smp_target_port, 
__name))
-#define DDB2_FIELDB(__name)   \
-   asd_ddbsite_read_byte(asd_ha, site_no,\
- offsetof(struct asd_ddb_stp_sata_target_port, 
__name))
-#define DDB_FIELDW(__name)\
-   asd_ddbsite_read_word(asd_ha, site_no,\
- offsetof(struct asd_ddb_ssp_smp_target_port, 
__name))
-
-#define DDB_FIELDD(__name) \
-   asd_ddbsite_read_dword(asd_ha, site_no,\
-  offsetof(struct asd_ddb_ssp_smp_target_port, 
__name))
-
-   asd_printk("DDB: 0x%02x\n", site_no);
-   asd_printk("conn_type: 0x%02x\n", DDB_FIELDB(conn_type));
-   asd_printk("conn_rate: 0x%02x\n", DDB_FIELDB(conn_rate));
-   asd_printk("init_conn_tag: 0x%04x\n", 
be16_to_cpu(DDB_FIELDW(init_conn_tag)));
-   asd_printk("send_queue_head: 0x%04x\n", 
be16_to_cpu(DDB_FIELDW(send_queue_head)));
-   asd_printk("sq_suspended: 0x%02x\n", DDB_FIELDB(sq_suspended));
-   asd_printk("DDB Type: 0x%02x\n", DDB_FIELDB(ddb_type));
-   asd_printk("AWT Default: 0x%04x\n", DDB_FIELDW(awt_def));
-   asd_printk("compat_features: 0x%02x\n", DDB_FIELDB(compat_features));
-   asd_printk("Pathway Blocked Count: 0x%02x\n",
-  DDB_FIELDB(pathway_blocked_count));
-   asd_printk("arb_wait_time: 0x%04x\n", DDB_FIELDW(arb_wait_time));
-   asd_printk("more_compat_features: 0x%08x\n",
-  DDB_FIELDD(more_compat_features));
-   asd_printk("Conn Mask: 0x%02x\n", DDB_FIELDB(conn_mask));
-   asd_printk("flags: 0x%02x\n", DDB_FIELDB(flags));
-   asd_printk("flags2: 0x%02x\n", DDB2_FIELDB(flags2));
-   asd_printk("ExecQ Tail: 0x%04x\n",DDB_FIELDW(exec_queue_tail));
-   asd_printk("SendQ Tail: 0x%04x\n",DDB_FIELDW(send_queue_tail));
-   asd_printk("Active Task Count: 0x%04x\n",
-  DDB_FIELDW(active_task_count));
-   asd_printk("ITNL Reason: 0x%02x\n", DDB_FIELDB(itnl_reason));
-   asd_printk("ITNL Timeout Const: 0x%04x\n", DDB_FIELDW(itnl_timeout));
-   asd_printk("ITNL timestamp: 0x%08x\n", DDB_FIELDD(itnl_timestamp));
-}
-
-void asd_dump_ddb_0(struct asd_ha_struct *asd_ha)
-{
-#define DDB0_FIELDB(__name)  \
-   asd_ddbsite_read_byte(asd_ha, 0, \
- offsetof(struct asd_ddb_seq_shared, __name))
-#define DDB0_FIELDW(__name)  \
-   asd_ddbsite_read_word(asd_ha, 0, \
- offsetof(struct asd_ddb_seq_shared, __name))
-
-#define DDB0_FIELDD(__name)  \
-   asd_ddbsite_read_dword(asd_ha,0 ,\
-  offsetof(struct asd_ddb_seq_shared, __name))
-
-#define DDB0_FIELDA(__name, _o)  \
-   asd_ddbsite_read_byte(asd_ha, 0, \
- offsetof(struct asd_ddb_seq_shared, __name)+_o)
-
-
-   asd_printk("DDB: 0\n");
-   asd_printk("q_free_ddb_head:%04x\n", DDB0_FIELDW(q_free_d

Re: [RESEND 00/53] Rid GPU from W=1 warnings

2021-03-17 Thread Lee Jones
On Thu, 11 Mar 2021, Lee Jones wrote:

> On Thu, 11 Mar 2021, Daniel Vetter wrote:
> 
> > On Mon, Mar 08, 2021 at 09:19:32AM +0000, Lee Jones wrote:
> > > On Fri, 05 Mar 2021, Roland Scheidegger wrote:
> > > 
> > > > The vmwgfx ones look all good to me, so for
> > > > 23-53: Reviewed-by: Roland Scheidegger 
> > > > That said, they were already signed off by Zack, so not sure what
> > > > happened here.
> > > 
> > > Yes, they were accepted at one point, then dropped without a reason.
> > > 
> > > Since I rebased onto the latest -next, I had to pluck them back out of
> > > a previous one.
> > 
> > They should show up in linux-next again. We merge patches for next merge
> > window even during the current merge window, but need to make sure they
> > don't pollute linux-next. Occasionally the cut off is wrong so patches
> > show up, and then get pulled again.
> > 
> > Unfortunately especially the 5.12 merge cycle was very wobbly due to some
> > confusion here. But your patches should all be in linux-next again (they
> > are queued up for 5.13 in drm-misc-next, I checked that).
> > 
> > Sorry for the confusion here.
> 
> Oh, I see.  Well so long as they don't get dropped, I'll be happy.
> 
> Thanks for the explanation Daniel

After rebasing today, all of my GPU patches have remained.  Would
someone be kind enough to check that everything is still in order
please?

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


Re: [PATCH 00/30] [Set 2] Rid W=1 warnings in SCSI

2021-03-17 Thread Lee Jones
On Tue, 16 Mar 2021, Martin K. Petersen wrote:

> 
> Lee,
> 
> > Would you like them in 1 or 2 sets?
> 
> As long as they are trivial, one set is fine.
> 
> What does help is to split by complexity. In your two previous series I
> would have preferred the mpt3sas and bfa patches that actually change
> code to be posted separately. Just to make sure they don't get lost in a
> sea of trivial changes.
> 
> IOW, if the patches contain substantial functional changes I'd prefer
> them to be separate from all the kernel-doc, function prototype,
> etc. fixes.

At the moment, my process involves a script which opens each file and
works it's way through the reported issues.

I'll take a look through the remaining patches and try to pull out any
that are more complex.

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


Re: [PATCH v6 1/1] mfd: da9063: Support SMBus and I2C mode

2021-03-16 Thread Lee Jones
On Tue, 16 Mar 2021, Mark Jonas wrote:

> From: Hubert Streidl 
> 
> By default the PMIC DA9063 2-wire interface is SMBus compliant. This
> means the PMIC will automatically reset the interface when the clock
> signal ceases for more than the SMBus timeout of 35 ms.
> 
> If the I2C driver / device is not capable of creating atomic I2C
> transactions, a context change can cause a ceasing of the clock signal.
> This can happen if for example a real-time thread is scheduled. Then
> the DA9063 in SMBus mode will reset the 2-wire interface. Subsequently
> a write message could end up in the wrong register. This could cause
> unpredictable system behavior.
> 
> The DA9063 PMIC also supports an I2C compliant mode for the 2-wire
> interface. This mode does not reset the interface when the clock
> signal ceases. Thus the problem depicted above does not occur.
> 
> This patch tests for the bus functionality "I2C_FUNC_I2C". It can
> reasonably be assumed that the bus cannot obey SMBus timings if
> this functionality is set. SMBus commands most probably are emulated
> in this case which is prone to the latency issue described above.
> 
> This patch enables the I2C bus mode if I2C_FUNC_I2C is set or
> otherwise keeps the default SMBus mode.
> 
> Signed-off-by: Hubert Streidl 
> Signed-off-by: Mark Jonas 
> ---
> Changes in v6:
>   - Fixed checkpatch check 'unaligned broken line'.
> 
> Changes in v5:
>   - Restructured according to feedback by Lee Jones.
> 
> Changes in v4:
>   - Remove logging of selected 2-wire bus mode.
> 
> Changes in v3:
>   - busmode now contains the correct bit DA9063_TWOWIRE_TO
> 
> Changes in v2:
>   - Implement proposal by Adam Thomson and Wolfram Sang to check for
> functionality I2C_FUNC_I2C instead of introducing a new DT property.
> 
>  drivers/mfd/da9063-i2c.c         | 10 ++
>  include/linux/mfd/da9063/registers.h |  3 +++
>  2 files changed, 13 insertions(+)

Applied with Wolfram's RB, thanks.

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


Re: [RESEND PATCH] mfd: sec: initialize driver via module_platform_driver

2021-03-16 Thread Lee Jones
On Tue, 16 Mar 2021, Krzysztof Kozlowski wrote:

> From: Krzysztof Kozlowski 
> 
> The driver was using subsys_initcall() because in old times deferred
> probe was not supported everywhere and specific ordering was needed.
> Since probe deferral works fine and specific ordering is discouraged
> (hides dependencies between drivers and couples their boot order), the
> driver can be converted to regular module_platform_driver.
> 
> Signed-off-by: Krzysztof Kozlowski 
> Tested-by: Marek Szyprowski 
> ---
>  drivers/mfd/sec-core.c | 14 +-
>  1 file changed, 1 insertion(+), 13 deletions(-)

Applied, thanks.

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


Re: [PATCH RESEND v4] MAINTAINERS: move Milo Kim to credits

2021-03-16 Thread Lee Jones
On Tue, 16 Mar 2021, Krzysztof Kozlowski wrote:

> From: Krzysztof Kozlowski 
> 
> Milo Kim's email in TI bounces with permanent error (550: Invalid
> recipient).  Last email from him on LKML was in 2017.  Move Milo Kim to
> credits and remove the separate driver entries for:
>  - TI LP855x backlight driver,
>  - TI LP8727 charger driver,
>  - TI LP8788 MFD (ADC, LEDs, charger and regulator) drivers.
> 
> Signed-off-by: Krzysztof Kozlowski 
> Cc: Mark Brown 
> Cc: Jonathan Cameron 
> Cc: Jingoo Han 
> Cc: Lee Jones 
> Cc: Pavel Machek 
> Cc: Thierry Reding 
> Cc: Sebastian Reichel 
> Cc: Daniel Thompson 
> Acked-by: Sebastian Reichel 
> 
> ---
> 
> Dear Lee,
> 
> Could you take care about this patch?
> 
> Best regards,
> Krzysztof
> 
> Changes since v3:
> 1. Remove the entries as Dan Murphy won't be mainaining them.
> 
> Changes since v2:
> 1. Fix subject (TP -> TI).
> 
> Changes since v1:
> 1. Add Dan Murphy, do not remove the entries.
> ---
>  CREDITS |  3 +++
>  MAINTAINERS | 23 ---
>  2 files changed, 3 insertions(+), 23 deletions(-)

Applied, thanks.

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


Re: [PATCH v5] mfd: da9063: Support SMBus and I2C mode

2021-03-16 Thread Lee Jones
On Tue, 16 Mar 2021, Jonas Mark (BT-FIR/ENG1-Grb) wrote:

> Hi Lee,
> 
> > Code looks good to me now, thanks.
> > 
> > However, this doesn't look like it would pass checkpatch.
> > 
> > Have you tried to build with W=1 and checkpatch?
> 
> Yes, we used checkpatch.pl.
> 
> $ ./scripts/checkpatch.pl 0001-mfd-da9063-Support-SMBus-and-I2C-mode.v5
> total: 0 errors, 0 warnings, 25 lines checked
> 
> 0001-mfd-da9063-Support-SMBus-and-I2C-mode.v5 has no obvious style 
> problems and is ready for submission.
> 
> Using the option --strict we get a check hint that the broken line of the 
> regmap_clear_bits() is not aligned. We tried but were not able to make the 
> tool happy. This matches our experience with this check hint and previous 
> patches.
>  
> Also compiling Linux 5.10.14 with our patch and W=1 does not yield a warning.

FYI, you should be using -next for upstream development.

> $ make W=1
>   CALLscripts/checksyscalls.sh
>   CALLscripts/atomic/check-atomics.sh
>   CHK include/generated/compile.h
>   CC [M]  drivers/mfd/da9063-i2c.o
>   LD [M]  drivers/mfd/da9063.o
>   Kernel: arch/arm/boot/Image is ready
>   Kernel: arch/arm/boot/zImage is ready
>   MODPOST Module.symvers
>   LD [M]  drivers/mfd/da9063.ko

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


Re: [PATCH v5] mfd: da9063: Support SMBus and I2C mode

2021-03-16 Thread Lee Jones
On Tue, 16 Mar 2021, Jonas Mark (BT-FIR/ENG1-Grb) wrote:

> Hi Lee,
> 
> > Code looks good to me now, thanks.
> > 
> > However, this doesn't look like it would pass checkpatch.
> > 
> > Have you tried to build with W=1 and checkpatch?
> 
> Yes, we used checkpatch.pl.
> 
> $ ./scripts/checkpatch.pl 0001-mfd-da9063-Support-SMBus-and-I2C-mode.v5
> total: 0 errors, 0 warnings, 25 lines checked
> 
> 0001-mfd-da9063-Support-SMBus-and-I2C-mode.v5 has no obvious style 
> problems and is ready for submission.
> 
> Using the option --strict we get a check hint that the broken line
> of the regmap_clear_bits() is not aligned. We tried but were not
> able to make the tool happy. This matches our experience with this
> check hint and previous patches.

Lining up the first char of the broken line with the open parenthesis
will make checkpatch happy.  It's easier if you configure your editor
to always do this, rather than with strict tabs.

> Also compiling Linux 5.10.14 with our patch and W=1 does not yield a warning.
> 
> $ make W=1
>   CALLscripts/checksyscalls.sh
>   CALLscripts/atomic/check-atomics.sh
>   CHK include/generated/compile.h
>   CC [M]  drivers/mfd/da9063-i2c.o
>   LD [M]  drivers/mfd/da9063.o
>   Kernel: arch/arm/boot/Image is ready
>   Kernel: arch/arm/boot/zImage is ready
>   MODPOST Module.symvers
>   LD [M]  drivers/mfd/da9063.ko
> 
> > > diff --git a/drivers/mfd/da9063-i2c.c b/drivers/mfd/da9063-i2c.c index
> > > 3781d0bb7786..e8a022e697c5 100644
> > > --- a/drivers/mfd/da9063-i2c.c
> > > +++ b/drivers/mfd/da9063-i2c.c
> > > @@ -442,6 +442,16 @@ static int da9063_i2c_probe(struct i2c_client *i2c,
> > >   return ret;
> > >   }
> > >
> > > + /* If SMBus is not available and only I2C is possible, enter I2C mode */
> > > + if (i2c_check_functionality(i2c->adapter, I2C_FUNC_I2C)) {
> > > + ret = regmap_clear_bits(da9063->regmap,
> > DA9063_REG_CONFIG_J,
> > > +   DA9063_TWOWIRE_TO);
> > > + if (ret < 0) {
> > > + dev_err(da9063->dev, "Failed to set Two-Wire Bus
> > Mode.\n");
> > > + return -EIO;
> > > + }
> > > + }
> > > +
> > >   return da9063_device_init(da9063, i2c->irq);  }
> > >
> > > diff --git a/include/linux/mfd/da9063/registers.h
> > > b/include/linux/mfd/da9063/registers.h
> > > index 1dbabf1b3cb8..6e0f66a2e727 100644
> > > --- a/include/linux/mfd/da9063/registers.h
> > > +++ b/include/linux/mfd/da9063/registers.h
> > > @@ -1037,6 +1037,9 @@
> > >  #define      DA9063_NONKEY_PIN_AUTODOWN  0x02
> > >  #define  DA9063_NONKEY_PIN_AUTOFLPRT 0x03
> > >
> > > +/* DA9063_REG_CONFIG_J (addr=0x10F) */
> > > +#define DA9063_TWOWIRE_TO0x40
> > > +
> > >  /* DA9063_REG_MON_REG_5 (addr=0x116) */
> > >  #define DA9063_MON_A8_IDX_MASK   0x07
> > >  #define  DA9063_MON_A8_IDX_NONE  0x00
> 

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


Re: [PATCH v5] mfd: da9063: Support SMBus and I2C mode

2021-03-16 Thread Lee Jones
On Mon, 15 Mar 2021, Mark Jonas wrote:

> From: Hubert Streidl 
> 
> By default the PMIC DA9063 2-wire interface is SMBus compliant. This
> means the PMIC will automatically reset the interface when the clock
> signal ceases for more than the SMBus timeout of 35 ms.
> 
> If the I2C driver / device is not capable of creating atomic I2C
> transactions, a context change can cause a ceasing of the clock signal.
> This can happen if for example a real-time thread is scheduled. Then
> the DA9063 in SMBus mode will reset the 2-wire interface. Subsequently
> a write message could end up in the wrong register. This could cause
> unpredictable system behavior.
> 
> The DA9063 PMIC also supports an I2C compliant mode for the 2-wire
> interface. This mode does not reset the interface when the clock
> signal ceases. Thus the problem depicted above does not occur.
> 
> This patch tests for the bus functionality "I2C_FUNC_I2C". It can
> reasonably be assumed that the bus cannot obey SMBus timings if
> this functionality is set. SMBus commands most probably are emulated
> in this case which is prone to the latency issue described above.
> 
> This patch enables the I2C bus mode if I2C_FUNC_I2C is set or
> otherwise keeps the default SMBus mode.
> 
> Signed-off-by: Hubert Streidl 
> Signed-off-by: Mark Jonas 
> ---
>  drivers/mfd/da9063-i2c.c | 10 ++
>  include/linux/mfd/da9063/registers.h |  3 +++
>  2 files changed, 13 insertions(+)

Code looks good to me now, thanks.

However, this doesn't look like it would pass checkpatch.

Have you tried to build with W=1 and checkpatch?

> diff --git a/drivers/mfd/da9063-i2c.c b/drivers/mfd/da9063-i2c.c
> index 3781d0bb7786..e8a022e697c5 100644
> --- a/drivers/mfd/da9063-i2c.c
> +++ b/drivers/mfd/da9063-i2c.c
> @@ -442,6 +442,16 @@ static int da9063_i2c_probe(struct i2c_client *i2c,
>   return ret;
>   }
>  
> + /* If SMBus is not available and only I2C is possible, enter I2C mode */
> + if (i2c_check_functionality(i2c->adapter, I2C_FUNC_I2C)) {
> + ret = regmap_clear_bits(da9063->regmap, DA9063_REG_CONFIG_J,
> +   DA9063_TWOWIRE_TO);
> + if (ret < 0) {
> + dev_err(da9063->dev, "Failed to set Two-Wire Bus 
> Mode.\n");
> + return -EIO;
> + }
> + }
> +
>   return da9063_device_init(da9063, i2c->irq);
>  }
>  
> diff --git a/include/linux/mfd/da9063/registers.h 
> b/include/linux/mfd/da9063/registers.h
> index 1dbabf1b3cb8..6e0f66a2e727 100644
> --- a/include/linux/mfd/da9063/registers.h
> +++ b/include/linux/mfd/da9063/registers.h
> @@ -1037,6 +1037,9 @@
>  #define  DA9063_NONKEY_PIN_AUTODOWN  0x02
>  #define  DA9063_NONKEY_PIN_AUTOFLPRT 0x03
>  
> +/* DA9063_REG_CONFIG_J (addr=0x10F) */
> +#define DA9063_TWOWIRE_TO0x40
> +
>  /* DA9063_REG_MON_REG_5 (addr=0x116) */
>  #define DA9063_MON_A8_IDX_MASK   0x07
>  #define  DA9063_MON_A8_IDX_NONE  0x00

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


Re: [PATCH 00/30] [Set 2] Rid W=1 warnings in SCSI

2021-03-16 Thread Lee Jones
On Mon, 15 Mar 2021, Martin K. Petersen wrote:

> 
> Lee,
> 
> > This set is part of a larger effort attempting to clean-up W=1 kernel
> > builds, which are currently overwhelmingly riddled with niggly little
> > warnings.
> 
> Applied to 5.13/scsi-staging, thanks!

Superstar!  Thanks Martin.

Just FYI, there are more 44 more patches left until clean.

Would you like them in 1 or 2 sets?

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


Re: [PATCH v3] mfd: ntxec: Support for EC in Tolino Shine 2 HD

2021-03-15 Thread Lee Jones
On Mon, 15 Mar 2021, Andreas Kemnade wrote:

> On Mon, 15 Mar 2021 08:12:31 +
> Lee Jones  wrote:
> 
> [...]
> > >  static int ntxec_probe(struct i2c_client *client)
> > >  {
> > >   struct ntxec *ec;
> > >   unsigned int version;
> > >   int res;
> > > + const struct mfd_cell *subdevs = ntxec_subdev;
> > > + size_t n_subdevs = ARRAY_SIZE(ntxec_subdev);  
> > 
> > This is a little confusing.  I had to re-read to figure it out.
> > 
> > In my mind, it would be clearer to explicitly set these in the
> > switch, rather than have a default which can be over-written.
> > 
> yes, it is clearer. I was just afraid that your compiler cannot
> figure it out that things get initialized and getting comments like
> "This code has never seen a compiler."
> But I will throw it against several ones.

Don't think so.  Just ensure you error out in the default case.

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


Re: [PATCH v3] mfd: ntxec: Support for EC in Tolino Shine 2 HD

2021-03-15 Thread Lee Jones
On Sat, 13 Mar 2021, Andreas Kemnade wrote:

> Add the version of the EC in the Tolino Shine 2 HD
> to the supported versions. It seems not to have an RTC
> and does not ack data written to it.
> The vendor kernel happily ignores write errors, using
> I2C via userspace i2c-set also shows the error.
> So add a quirk to ignore that error.
> 
> PWM can be successfully configured despite of that error.
> 
> Signed-off-by: Andreas Kemnade 
> Reviewed-by: Jonathan Neuschäfer 
> ---
> Changes in v3:
> - remove have_rtc variable
> - rename subdevices again
> 
> Changes in v2:
> - more comments about stacking regmap construction
> - fix accidential line removal
> - better naming for subdevices
>  drivers/mfd/ntxec.c   | 55 ---
>  include/linux/mfd/ntxec.h |  1 +
>  2 files changed, 53 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/mfd/ntxec.c b/drivers/mfd/ntxec.c
> index 957de2b03529..ab6860ef3e9a 100644
> --- a/drivers/mfd/ntxec.c
> +++ b/drivers/mfd/ntxec.c
> @@ -96,6 +96,38 @@ static struct notifier_block ntxec_restart_handler = {
>   .priority = 128,
>  };
>  
> +static int regmap_ignore_write(void *context,
> +unsigned int reg, unsigned int val)
> +
> +{
> + struct regmap *regmap = context;
> +
> + regmap_write(regmap, reg, val);
> +
> + return 0;
> +}
> +
> +static int regmap_wrap_read(void *context, unsigned int reg,
> + unsigned int *val)
> +{
> + struct regmap *regmap = context;
> +
> + return regmap_read(regmap, reg, val);
> +}
> +
> +/*
> + * Some firmware versions do not ack written data, add a wrapper. It
> + * is used to stack another regmap on top.
> + */
> +static const struct regmap_config regmap_config_noack = {
> + .name = "ntxec_noack",
> + .reg_bits = 8,
> + .val_bits = 16,
> + .cache_type = REGCACHE_NONE,
> + .reg_write = regmap_ignore_write,
> + .reg_read = regmap_wrap_read
> +};
> +
>  static const struct regmap_config regmap_config = {
>   .name = "ntxec",
>   .reg_bits = 8,
> @@ -104,16 +136,22 @@ static const struct regmap_config regmap_config = {
>   .val_format_endian = REGMAP_ENDIAN_BIG,
>  };
>  
> -static const struct mfd_cell ntxec_subdevices[] = {
> +static const struct mfd_cell ntxec_subdev[] = {
>   { .name = "ntxec-rtc" },
>   { .name = "ntxec-pwm" },
>  };
>  
> +static const struct mfd_cell ntxec_subdev_no_rtc[] = {
> + { .name = "ntxec-pwm" },
> +};
> +
>  static int ntxec_probe(struct i2c_client *client)
>  {
>   struct ntxec *ec;
>   unsigned int version;
>   int res;
> + const struct mfd_cell *subdevs = ntxec_subdev;
> + size_t n_subdevs = ARRAY_SIZE(ntxec_subdev);

This is a little confusing.  I had to re-read to figure it out.

In my mind, it would be clearer to explicitly set these in the
switch, rather than have a default which can be over-written.

>   ec = devm_kmalloc(&client->dev, sizeof(*ec), GFP_KERNEL);
>   if (!ec)
> @@ -138,6 +176,16 @@ static int ntxec_probe(struct i2c_client *client)
>   switch (version) {
>   case NTXEC_VERSION_KOBO_AURA:
>   break;
> + case NTXEC_VERSION_TOLINO_SHINE2:
> + subdevs = ntxec_subdev_no_rtc;
> + n_subdevs = ARRAY_SIZE(ntxec_subdev_no_rtc);
> + /* Another regmap stacked on top of the other */
> + ec->regmap = devm_regmap_init(ec->dev, NULL,
> +   ec->regmap,
> +   ®map_config_noack);
> + if (IS_ERR(ec->regmap))
> + return PTR_ERR(ec->regmap);
> + break;
>   default:
>   dev_err(ec->dev,
>   "Netronix embedded controller version %04x is not 
> supported.\n",
> @@ -181,8 +229,9 @@ static int ntxec_probe(struct i2c_client *client)
>  
>   i2c_set_clientdata(client, ec);
>  
> - res = devm_mfd_add_devices(ec->dev, PLATFORM_DEVID_NONE, 
> ntxec_subdevices,
> -ARRAY_SIZE(ntxec_subdevices), NULL, 0, NULL);
> + res = devm_mfd_add_devices(ec->dev, PLATFORM_DEVID_NONE,
> +subdevs, n_subdevs,
> +NULL, 0, NULL);
>   if (res)
>   dev_err(ec->dev, "Failed to add subdevices: %d\n", res);
>  
> diff --git a/include/linux/mfd/ntxec.h b/include/linux/mfd/ntxec.h
> index 361204d125f1..26ab3b8eb612 100644
> --- a/include/linux/mfd/ntxec.h
> +++ b/include/linux/mfd/ntxec.h
> @@ -33,5 +33,6 @@ static inline __be16 ntxec_reg8(u8 value)
>  
>  /* Known firmware versions */
>  #define NTXEC_VERSION_KOBO_AURA  0xd726  /* found in Kobo Aura */
> +#define NTXEC_VERSION_TOLINO_SHINE2 0xf110 /* found in Tolino Shine 2 HD */
>  
>  #endif

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


Re: [PATCH 08/10] of: of_net: Demote non-conforming kernel-doc header

2021-03-12 Thread Lee Jones
On Fri, 12 Mar 2021, Andrew Lunn wrote:

> On Fri, Mar 12, 2021 at 11:07:56AM +0000, Lee Jones wrote:
> > Fixes the following W=1 kernel build warning(s):
> > 
> >  drivers/of/of_net.c:104: warning: Function parameter or member 'np' not 
> > described in 'of_get_mac_address'
> >  drivers/of/of_net.c:104: warning: expecting prototype for mac(). Prototype 
> > was for of_get_mac_address() instead
> > 
> > Cc: Andrew Lunn 
> > Cc: Heiner Kallweit 
> > Cc: Russell King 
> > Cc: Rob Herring 
> > Cc: Frank Rowand 
> > Cc: net...@vger.kernel.org
> > Cc: devicet...@vger.kernel.org
> > Signed-off-by: Lee Jones 
> > ---
> >  drivers/of/of_net.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/of/of_net.c b/drivers/of/of_net.c
> > index 6e411821583e4..9b41a343e88ab 100644
> > --- a/drivers/of/of_net.c
> > +++ b/drivers/of/of_net.c
> > @@ -78,7 +78,7 @@ static const void *of_get_mac_addr_nvmem(struct 
> > device_node *np)
> > return mac;
> >  }
> >  
> > -/**
> > +/*
> >   * Search the device tree for the best MAC address to use.  'mac-address' 
> > is
> >   * checked first, because that is supposed to contain to "most recent" MAC
> >   * address. If that isn't set, then 'local-mac-address' is checked next,
> 
> Hi Lee
> 
> of_get_mac_address() is a pretty important API function. So it would
> be better to add the missing header to make this valid kdoc.

Pretty important, yes.  Referenced/documented, no. :)

  `git grep kernel-doc:: | grep drivers/of`

> /**
>  * of_get_mac_address - Get MAC address from device tree
>  * @np: Pointer to the device_node of the interface
>  *
> 
>  Andrew

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


Re: [PATCH 07/10] of: fdt: Demote kernel-doc abuses

2021-03-12 Thread Lee Jones
On Fri, 12 Mar 2021, Rob Herring wrote:

> On Fri, Mar 12, 2021 at 4:08 AM Lee Jones  wrote:
> >
> > Fixes the following W=1 kernel build warning(s):
> >
> >  drivers/of/fdt.c:478: warning: Function parameter or member 'node' not 
> > described in '__reserved_mem_reserve_reg'
> >  drivers/of/fdt.c:478: warning: Function parameter or member 'uname' not 
> > described in '__reserved_mem_reserve_reg'
> >  drivers/of/fdt.c:525: warning: Function parameter or member 'node' not 
> > described in '__reserved_mem_check_root'
> >  drivers/of/fdt.c:547: warning: Function parameter or member 'node' not 
> > described in '__fdt_scan_reserved_mem'
> >  drivers/of/fdt.c:547: warning: Function parameter or member 'uname' not 
> > described in '__fdt_scan_reserved_mem'
> >  drivers/of/fdt.c:547: warning: Function parameter or member 'depth' not 
> > described in '__fdt_scan_reserved_mem'
> >  drivers/of/fdt.c:547: warning: Function parameter or member 'data' not 
> > described in '__fdt_scan_reserved_mem'
> >  drivers/of/fdt.c:547: warning: expecting prototype for 
> > fdt_scan_reserved_mem(). Prototype was for __fdt_scan_reserved_mem() instead
> >  drivers/of/fdt.c:663: warning: Function parameter or member 'parent' not 
> > described in 'of_scan_flat_dt_subnodes'
> >  drivers/of/fdt.c:708: warning: Function parameter or member 'node' not 
> > described in 'of_get_flat_dt_prop'
> >  drivers/of/fdt.c:708: warning: Function parameter or member 'name' not 
> > described in 'of_get_flat_dt_prop'
> >  drivers/of/fdt.c:708: warning: Function parameter or member 'size' not 
> > described in 'of_get_flat_dt_prop'
> >  drivers/of/fdt.c:758: warning: Function parameter or member 'node' not 
> > described in 'of_flat_dt_match'
> >  drivers/of/fdt.c:758: warning: Function parameter or member 'compat' not 
> > described in 'of_flat_dt_match'
> >  drivers/of/fdt.c:778: warning: Function parameter or member 'node' not 
> > described in 'of_get_flat_dt_phandle'
> >  drivers/of/fdt.c:778: warning: expecting prototype for 
> > of_get_flat_dt_prop(). Prototype was for of_get_flat_dt_phandle() instead
> >  drivers/of/fdt.c:955: warning: Function parameter or member 'node' not 
> > described in 'early_init_dt_scan_root'
> >  drivers/of/fdt.c:955: warning: Function parameter or member 'uname' not 
> > described in 'early_init_dt_scan_root'
> >  drivers/of/fdt.c:955: warning: Function parameter or member 'depth' not 
> > described in 'early_init_dt_scan_root'
> >  drivers/of/fdt.c:955: warning: Function parameter or member 'data' not 
> > described in 'early_init_dt_scan_root'
> >  drivers/of/fdt.c:991: warning: Function parameter or member 'node' not 
> > described in 'early_init_dt_scan_memory'
> >  drivers/of/fdt.c:991: warning: Function parameter or member 'uname' not 
> > described in 'early_init_dt_scan_memory'
> >  drivers/of/fdt.c:991: warning: Function parameter or member 'depth' not 
> > described in 'early_init_dt_scan_memory'
> >  drivers/of/fdt.c:991: warning: Function parameter or member 'data' not 
> > described in 'early_init_dt_scan_memory'
> >
> > Cc: Rob Herring 
> > Cc: Frank Rowand 
> > Cc: b...@kernel.crashing.org
> > Cc: devicet...@vger.kernel.org
> > Signed-off-by: Lee Jones 
> > ---
> >  drivers/of/fdt.c | 19 ++-
> >  1 file changed, 10 insertions(+), 9 deletions(-)
> >
> > diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
> > index dcc1dd96911a9..1fb3348eb9516 100644
> > --- a/drivers/of/fdt.c
> > +++ b/drivers/of/fdt.c
> > @@ -470,7 +470,7 @@ void *initial_boot_params __ro_after_init;
> >
> >  static u32 of_fdt_crc32;
> >
> > -/**
> > +/*
> >   * __reserved_mem_reserve_reg() - reserve all memory described in 'reg' 
> > property
> >   */
> >  static int __init __reserved_mem_reserve_reg(unsigned long node,
> > @@ -516,7 +516,7 @@ static int __init __reserved_mem_reserve_reg(unsigned 
> > long node,
> > return 0;
> >  }
> >
> > -/**
> > +/*
> >   * __reserved_mem_check_root() - check if #size-cells, #address-cells 
> > provided
> >   * in /reserved-memory matches the values supported by the current 
> > implementation,
> >   * also check if ranges property has been provided
> > @@ -539,7 +539,7 @@ static int __init __reserved_mem_check_root(unsigned 
> > long node)
> > return 0;
> >  }
> >
> > -/**
> > +/*
> >   * fdt_scan_reserved_mem() - scan a single FDT node for reserved memory
> 
> This is still wrong. Should be __fdt_scan_reserved_mem.

Ah, the warning went away because I demoted it.

Will fix.  The others too.

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


Re: [PATCH 01/10] of: device: Fix function name in header and demote kernel-doc abuse

2021-03-12 Thread Lee Jones
On Fri, 12 Mar 2021, Rob Herring wrote:

> On Fri, Mar 12, 2021 at 4:08 AM Lee Jones  wrote:
> >
> > Fixes the following W=1 kernel build warning(s):
> >
> >  drivers/of/device.c:72: warning: expecting prototype for 
> > of_dma_configure(). Prototype was for of_dma_configure_id() instead
> >  drivers/of/device.c:263: warning: Function parameter or member 'dev' not 
> > described in 'of_device_modalias'
> >  drivers/of/device.c:263: warning: Function parameter or member 'str' not 
> > described in 'of_device_modalias'
> >  drivers/of/device.c:263: warning: Function parameter or member 'len' not 
> > described in 'of_device_modalias'
> >  drivers/of/device.c:280: warning: Function parameter or member 'dev' not 
> > described in 'of_device_uevent'
> >  drivers/of/device.c:280: warning: Function parameter or member 'env' not 
> > described in 'of_device_uevent'
> >
> > Cc: Rob Herring 
> > Cc: Frank Rowand 
> > Cc: devicet...@vger.kernel.org
> > Signed-off-by: Lee Jones 
> > ---
> >  drivers/of/device.c | 6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/of/device.c b/drivers/of/device.c
> > index 6cb86de404f1c..64ee363abde24 100644
> > --- a/drivers/of/device.c
> > +++ b/drivers/of/device.c
> > @@ -53,7 +53,7 @@ int of_device_add(struct platform_device *ofdev)
> >  }
> >
> >  /**
> > - * of_dma_configure - Setup DMA configuration
> > + * of_dma_configure_id - Setup DMA configuration
> >   * @dev:   Device to apply DMA configuration
> >   * @np:Pointer to OF node having DMA configuration
> >   * @force_dma:  Whether device is to be set up by of_dma_configure() even 
> > if
> > @@ -256,7 +256,7 @@ int of_device_request_module(struct device *dev)
> >  }
> >  EXPORT_SYMBOL_GPL(of_device_request_module);
> >
> > -/**
> > +/*
> 
> We should fix the kerneldoc on public functions. Demoting is fine on
> static or internal to the DT code.

This file is not referenced by Kernel-Doc.

  `git grep kernel-doc:: | grep drivers/of`

> >   * of_device_modalias - Fill buffer with newline terminated modalias string
> >   */
> >  ssize_t of_device_modalias(struct device *dev, char *str, ssize_t len)
> > @@ -273,7 +273,7 @@ ssize_t of_device_modalias(struct device *dev, char 
> > *str, ssize_t len)
> >  }
> >  EXPORT_SYMBOL_GPL(of_device_modalias);
> >
> > -/**
> > +/*
> >   * of_device_uevent - Display OF related uevent information
> >   */
> >  void of_device_uevent(struct device *dev, struct kobj_uevent_env *env)
> >

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


[PATCH 4/4] ptp: ptp_p: Demote non-conformant kernel-doc headers and supply a param description

2021-03-12 Thread Lee Jones
#x27;exts1_enabled' not described in 'pch_dev'
 drivers/ptp/ptp_pch.c:121: warning: Function parameter or member 'mem_base' 
not described in 'pch_dev'
 drivers/ptp/ptp_pch.c:121: warning: Function parameter or member 'mem_size' 
not described in 'pch_dev'
 drivers/ptp/ptp_pch.c:121: warning: Function parameter or member 'irq' not 
described in 'pch_dev'
 drivers/ptp/ptp_pch.c:121: warning: Function parameter or member 'pdev' not 
described in 'pch_dev'
 drivers/ptp/ptp_pch.c:121: warning: Function parameter or member 
'register_lock' not described in 'pch_dev'
 drivers/ptp/ptp_pch.c:128: warning: Function parameter or member 'station' not 
described in 'pch_params'
 drivers/ptp/ptp_pch.c:291: warning: Function parameter or member 'pdev' not 
described in 'pch_set_station_address'

Cc: Richard Cochran 
Cc: LAPIS SEMICONDUCTOR 
Cc: net...@vger.kernel.org
Signed-off-by: Lee Jones 
---
 drivers/ptp/ptp_pch.c | 9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/ptp/ptp_pch.c b/drivers/ptp/ptp_pch.c
index fa4417ad02e0c..a17e8cc642c5f 100644
--- a/drivers/ptp/ptp_pch.c
+++ b/drivers/ptp/ptp_pch.c
@@ -37,7 +37,8 @@ enum pch_status {
PCH_FAILED,
PCH_UNSUPPORTED,
 };
-/**
+
+/*
  * struct pch_ts_regs - IEEE 1588 registers
  */
 struct pch_ts_regs {
@@ -103,7 +104,8 @@ struct pch_ts_regs {
 
 #define PCH_IEEE1588_ETH   (1 << 0)
 #define PCH_IEEE1588_CAN   (1 << 1)
-/**
+
+/*
  * struct pch_dev - Driver private data
  */
 struct pch_dev {
@@ -120,7 +122,7 @@ struct pch_dev {
spinlock_t register_lock;
 };
 
-/**
+/*
  * struct pch_params - 1588 module parameter
  */
 struct pch_params {
@@ -286,6 +288,7 @@ static void pch_reset(struct pch_dev *chip)
  * IEEE 1588 hardware when looking at PTP
  * traffic on the  ethernet interface
  * @addr:  dress which contain the column separated address to be used.
+ * @pdev:  PCI device.
  */
 int pch_set_station_address(u8 *addr, struct pci_dev *pdev)
 {
-- 
2.27.0



[PATCH 2/4] ptp_pch: Move 'pch_*()' prototypes to shared header

2021-03-12 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/ptp/ptp_pch.c:193:6: warning: no previous prototype for 
‘pch_ch_control_write’ [-Wmissing-prototypes]
 drivers/ptp/ptp_pch.c:201:5: warning: no previous prototype for 
‘pch_ch_event_read’ [-Wmissing-prototypes]
 drivers/ptp/ptp_pch.c:212:6: warning: no previous prototype for 
‘pch_ch_event_write’ [-Wmissing-prototypes]
 drivers/ptp/ptp_pch.c:220:5: warning: no previous prototype for 
‘pch_src_uuid_lo_read’ [-Wmissing-prototypes]
 drivers/ptp/ptp_pch.c:231:5: warning: no previous prototype for 
‘pch_src_uuid_hi_read’ [-Wmissing-prototypes]
 drivers/ptp/ptp_pch.c:242:5: warning: no previous prototype for 
‘pch_rx_snap_read’ [-Wmissing-prototypes]
 drivers/ptp/ptp_pch.c:259:5: warning: no previous prototype for 
‘pch_tx_snap_read’ [-Wmissing-prototypes]
 drivers/ptp/ptp_pch.c:300:5: warning: no previous prototype for 
‘pch_set_station_address’ [-Wmissing-prototypes]

Cc: Richard Cochran  (maintainer:PTP HARDWARE CLOCK 
SUPPORT)
Cc: "David S. Miller" 
Cc: Jakub Kicinski 
Cc: Flavio Suligoi 
Cc: net...@vger.kernel.org
Signed-off-by: Lee Jones 
---
 .../net/ethernet/oki-semi/pch_gbe/pch_gbe.h   |  8 ---
 .../ethernet/oki-semi/pch_gbe/pch_gbe_main.c  |  1 +
 drivers/ptp/ptp_pch.c |  1 +
 include/linux/ptp_pch.h   | 22 +++
 4 files changed, 24 insertions(+), 8 deletions(-)
 create mode 100644 include/linux/ptp_pch.h

diff --git a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe.h 
b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe.h
index 3ce4899a0417a..a6823c4d355d5 100644
--- a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe.h
+++ b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe.h
@@ -612,14 +612,6 @@ void pch_gbe_free_tx_resources(struct pch_gbe_adapter 
*adapter,
 void pch_gbe_free_rx_resources(struct pch_gbe_adapter *adapter,
   struct pch_gbe_rx_ring *rx_ring);
 void pch_gbe_update_stats(struct pch_gbe_adapter *adapter);
-void pch_ch_control_write(struct pci_dev *pdev, u32 val);
-u32 pch_ch_event_read(struct pci_dev *pdev);
-void pch_ch_event_write(struct pci_dev *pdev, u32 val);
-u32 pch_src_uuid_lo_read(struct pci_dev *pdev);
-u32 pch_src_uuid_hi_read(struct pci_dev *pdev);
-u64 pch_rx_snap_read(struct pci_dev *pdev);
-u64 pch_tx_snap_read(struct pci_dev *pdev);
-int pch_set_station_address(u8 *addr, struct pci_dev *pdev);
 
 /* pch_gbe_param.c */
 void pch_gbe_check_options(struct pch_gbe_adapter *adapter);
diff --git a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c 
b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c
index 140cee7c459d0..334af49e5add1 100644
--- a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c
+++ b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c
@@ -11,6 +11,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 #define DRV_VERSION "1.01"
diff --git a/drivers/ptp/ptp_pch.c b/drivers/ptp/ptp_pch.c
index f7ff7230623e0..fa4417ad02e0c 100644
--- a/drivers/ptp/ptp_pch.c
+++ b/drivers/ptp/ptp_pch.c
@@ -18,6 +18,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 #define STATION_ADDR_LEN   20
diff --git a/include/linux/ptp_pch.h b/include/linux/ptp_pch.h
new file mode 100644
index 0..51818198c2921
--- /dev/null
+++ b/include/linux/ptp_pch.h
@@ -0,0 +1,22 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/*
+ * PTP PCH
+ *
+ * Copyright 2019 Linaro Ltd.
+ *
+ * Author Lee Jones 
+ */
+
+#ifndef _PTP_PCH_H_
+#define _PTP_PCH_H_
+
+void pch_ch_control_write(struct pci_dev *pdev, u32 val);
+u32  pch_ch_event_read(struct pci_dev *pdev);
+void pch_ch_event_write(struct pci_dev *pdev, u32 val);
+u32  pch_src_uuid_lo_read(struct pci_dev *pdev);
+u32  pch_src_uuid_hi_read(struct pci_dev *pdev);
+u64  pch_rx_snap_read(struct pci_dev *pdev);
+u64  pch_tx_snap_read(struct pci_dev *pdev);
+int  pch_set_station_address(u8 *addr, struct pci_dev *pdev);
+
+#endif /* _PTP_PCH_H_ */
-- 
2.27.0



[PATCH 3/4] ptp: ptp_clockmatrix: Demote non-kernel-doc header to standard comment

2021-03-12 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/ptp/ptp_clockmatrix.c:1408: warning: Cannot understand  * @brief 
Maximum absolute value for write phase offset in picoseconds
 drivers/ptp/ptp_clockmatrix.c:1408: warning: Cannot understand  * @brief 
Maximum absolute value for write phase offset in picoseconds
 drivers/ptp/ptp_clockmatrix.c:1408: warning: Cannot understand  * @brief 
Maximum absolute value for write phase offset in picoseconds
 drivers/ptp/ptp_clockmatrix.c:1408: warning: Cannot understand  * @brief 
Maximum absolute value for write phase offset in picoseconds
 drivers/ptp/ptp_clockmatrix.c:1408: warning: Cannot understand  * @brief 
Maximum absolute value for write phase offset in picoseconds

Cc: Richard Cochran 
Cc: idt-support-1...@lm.renesas.com
Cc: net...@vger.kernel.org
Signed-off-by: Lee Jones 
---
 drivers/ptp/ptp_clockmatrix.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/ptp/ptp_clockmatrix.c b/drivers/ptp/ptp_clockmatrix.c
index 75463c2e2b867..fa636951169e5 100644
--- a/drivers/ptp/ptp_clockmatrix.c
+++ b/drivers/ptp/ptp_clockmatrix.c
@@ -1404,8 +1404,8 @@ static int idtcm_set_pll_mode(struct idtcm_channel 
*channel,
 
 /* PTP Hardware Clock interface */
 
-/**
- * @brief Maximum absolute value for write phase offset in picoseconds
+/*
+ * Maximum absolute value for write phase offset in picoseconds
  *
  * Destination signed register is 32-bit register in resolution of 50ps
  *
-- 
2.27.0



[PATCH 0/4] Rid W=1 warnings from PTP

2021-03-12 Thread 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.

Lee Jones (4):
  ptp_pch: Remove unused function 'pch_ch_control_read()'
  ptp_pch: Move 'pch_*()' prototypes to shared header
  ptp: ptp_clockmatrix: Demote non-kernel-doc header to standard comment
  ptp: ptp_p: Demote non-conformant kernel-doc headers and supply a
param description

 .../net/ethernet/oki-semi/pch_gbe/pch_gbe.h   |  9 
 .../ethernet/oki-semi/pch_gbe/pch_gbe_main.c  |  1 +
 drivers/ptp/ptp_clockmatrix.c |  4 ++--
 drivers/ptp/ptp_pch.c | 21 ++
 include/linux/ptp_pch.h   | 22 +++
 5 files changed, 32 insertions(+), 25 deletions(-)
 create mode 100644 include/linux/ptp_pch.h

Cc: "David S. Miller" 
Cc: Flavio Suligoi 
Cc: idt-support-1...@lm.renesas.com
Cc: Jakub Kicinski 
Cc: LAPIS SEMICONDUCTOR 
Cc: net...@vger.kernel.org
Cc: Richard Cochran 
Cc: Richard Cochran  (maintainer:PTP HARDWARE CLOCK 
SUPPORT)
-- 
2.27.0



[PATCH 1/4] ptp_pch: Remove unused function 'pch_ch_control_read()'

2021-03-12 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/ptp/ptp_pch.c:182:5: warning: no previous prototype for 
‘pch_ch_control_read’ [-Wmissing-prototypes]

Cc: Richard Cochran  (maintainer:PTP HARDWARE CLOCK 
SUPPORT)
Cc: "David S. Miller" 
Cc: Jakub Kicinski 
Cc: Flavio Suligoi 
Cc: net...@vger.kernel.org
Signed-off-by: Lee Jones 
---
 drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe.h |  1 -
 drivers/ptp/ptp_pch.c   | 11 ---
 2 files changed, 12 deletions(-)

diff --git a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe.h 
b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe.h
index 55cef5b16aa5f..3ce4899a0417a 100644
--- a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe.h
+++ b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe.h
@@ -612,7 +612,6 @@ void pch_gbe_free_tx_resources(struct pch_gbe_adapter 
*adapter,
 void pch_gbe_free_rx_resources(struct pch_gbe_adapter *adapter,
   struct pch_gbe_rx_ring *rx_ring);
 void pch_gbe_update_stats(struct pch_gbe_adapter *adapter);
-u32 pch_ch_control_read(struct pci_dev *pdev);
 void pch_ch_control_write(struct pci_dev *pdev, u32 val);
 u32 pch_ch_event_read(struct pci_dev *pdev);
 void pch_ch_event_write(struct pci_dev *pdev, u32 val);
diff --git a/drivers/ptp/ptp_pch.c b/drivers/ptp/ptp_pch.c
index ce10ecd41ba0f..f7ff7230623e0 100644
--- a/drivers/ptp/ptp_pch.c
+++ b/drivers/ptp/ptp_pch.c
@@ -179,17 +179,6 @@ static inline void pch_block_reset(struct pch_dev *chip)
iowrite32(val, (&chip->regs->control));
 }
 
-u32 pch_ch_control_read(struct pci_dev *pdev)
-{
-   struct pch_dev *chip = pci_get_drvdata(pdev);
-   u32 val;
-
-   val = ioread32(&chip->regs->ch_control);
-
-   return val;
-}
-EXPORT_SYMBOL(pch_ch_control_read);
-
 void pch_ch_control_write(struct pci_dev *pdev, u32 val)
 {
struct pch_dev *chip = pci_get_drvdata(pdev);
-- 
2.27.0



[PATCH 06/10] of: address: Demote non-conformant kernel-doc header

2021-03-12 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/of/address.c:868: warning: Function parameter or member 'dev' not 
described in 'of_address_to_resource'
 drivers/of/address.c:868: warning: Function parameter or member 'index' not 
described in 'of_address_to_resource'
 drivers/of/address.c:868: warning: Function parameter or member 'r' not 
described in 'of_address_to_resource'

Cc: Rob Herring 
Cc: Frank Rowand 
Cc: devicet...@vger.kernel.org
Signed-off-by: Lee Jones 
---
 drivers/of/address.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/of/address.c b/drivers/of/address.c
index 73ddf2540f3fe..9350697ae5aad 100644
--- a/drivers/of/address.c
+++ b/drivers/of/address.c
@@ -855,7 +855,7 @@ static int __of_address_to_resource(struct device_node *dev,
return 0;
 }
 
-/**
+/*
  * of_address_to_resource - Translate device tree address and return as 
resource
  *
  * Note that if your address is a PIO address, the conversion will fail if
-- 
2.27.0



[PATCH 10/10] of: of_reserved_mem: Demote kernel-doc abuses

2021-03-12 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/of/of_reserved_mem.c:53: warning: Function parameter or member 'node' 
not described in 'fdt_reserved_mem_save_node'
 drivers/of/of_reserved_mem.c:53: warning: Function parameter or member 'uname' 
not described in 'fdt_reserved_mem_save_node'
 drivers/of/of_reserved_mem.c:53: warning: Function parameter or member 'base' 
not described in 'fdt_reserved_mem_save_node'
 drivers/of/of_reserved_mem.c:53: warning: Function parameter or member 'size' 
not described in 'fdt_reserved_mem_save_node'
 drivers/of/of_reserved_mem.c:76: warning: Function parameter or member 'node' 
not described in '__reserved_mem_alloc_size'
 drivers/of/of_reserved_mem.c:76: warning: Function parameter or member 'uname' 
not described in '__reserved_mem_alloc_size'
 drivers/of/of_reserved_mem.c:76: warning: Function parameter or member 
'res_base' not described in '__reserved_mem_alloc_size'
 drivers/of/of_reserved_mem.c:76: warning: Function parameter or member 
'res_size' not described in '__reserved_mem_alloc_size'
 drivers/of/of_reserved_mem.c:171: warning: Function parameter or member 'rmem' 
not described in '__reserved_mem_init_node'

Cc: Rob Herring 
Cc: Frank Rowand 
Cc: Marek Szyprowski 
Cc: Josh Cartwright 
Cc: devicet...@vger.kernel.org
Signed-off-by: Lee Jones 
---
 drivers/of/of_reserved_mem.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/of/of_reserved_mem.c b/drivers/of/of_reserved_mem.c
index a7fbc5e37e19e..15e2417974d67 100644
--- a/drivers/of/of_reserved_mem.c
+++ b/drivers/of/of_reserved_mem.c
@@ -45,7 +45,7 @@ static int __init 
early_init_dt_alloc_reserved_memory_arch(phys_addr_t size,
return memblock_reserve(base, size);
 }
 
-/**
+/*
  * fdt_reserved_mem_save_node() - save fdt node for second pass initialization
  */
 void __init fdt_reserved_mem_save_node(unsigned long node, const char *uname,
@@ -67,7 +67,7 @@ void __init fdt_reserved_mem_save_node(unsigned long node, 
const char *uname,
return;
 }
 
-/**
+/*
  * __reserved_mem_alloc_size() - allocate reserved memory described by
  * 'size', 'alignment'  and 'alloc-ranges' properties.
  */
@@ -164,7 +164,7 @@ static int __init __reserved_mem_alloc_size(unsigned long 
node,
 static const struct of_device_id __rmem_of_table_sentinel
__used __section("__reservedmem_of_table_end");
 
-/**
+/*
  * __reserved_mem_init_node() - call region specific reserved memory init code
  */
 static int __init __reserved_mem_init_node(struct reserved_mem *rmem)
-- 
2.27.0



[PATCH 09/10] of: overlay: Fix function name disparity

2021-03-12 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/of/overlay.c:147: warning: expecting prototype for 
of_overlay_notifier_register(). Prototype was for 
of_overlay_notifier_unregister() instead

Cc: Pantelis Antoniou 
Cc: Frank Rowand 
Cc: Rob Herring 
Cc: devicet...@vger.kernel.org
Signed-off-by: Lee Jones 
---
 drivers/of/overlay.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/of/overlay.c b/drivers/of/overlay.c
index 50bbe0edf5380..1c867a5e4c7c2 100644
--- a/drivers/of/overlay.c
+++ b/drivers/of/overlay.c
@@ -140,7 +140,7 @@ int of_overlay_notifier_register(struct notifier_block *nb)
 EXPORT_SYMBOL_GPL(of_overlay_notifier_register);
 
 /**
- * of_overlay_notifier_register() - Unregister notifier for overlay operations
+ * of_overlay_notifier_unregister() - Unregister notifier for overlay 
operations
  * @nb:Notifier block to unregister
  */
 int of_overlay_notifier_unregister(struct notifier_block *nb)
-- 
2.27.0



[PATCH 07/10] of: fdt: Demote kernel-doc abuses

2021-03-12 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/of/fdt.c:478: warning: Function parameter or member 'node' not 
described in '__reserved_mem_reserve_reg'
 drivers/of/fdt.c:478: warning: Function parameter or member 'uname' not 
described in '__reserved_mem_reserve_reg'
 drivers/of/fdt.c:525: warning: Function parameter or member 'node' not 
described in '__reserved_mem_check_root'
 drivers/of/fdt.c:547: warning: Function parameter or member 'node' not 
described in '__fdt_scan_reserved_mem'
 drivers/of/fdt.c:547: warning: Function parameter or member 'uname' not 
described in '__fdt_scan_reserved_mem'
 drivers/of/fdt.c:547: warning: Function parameter or member 'depth' not 
described in '__fdt_scan_reserved_mem'
 drivers/of/fdt.c:547: warning: Function parameter or member 'data' not 
described in '__fdt_scan_reserved_mem'
 drivers/of/fdt.c:547: warning: expecting prototype for 
fdt_scan_reserved_mem(). Prototype was for __fdt_scan_reserved_mem() instead
 drivers/of/fdt.c:663: warning: Function parameter or member 'parent' not 
described in 'of_scan_flat_dt_subnodes'
 drivers/of/fdt.c:708: warning: Function parameter or member 'node' not 
described in 'of_get_flat_dt_prop'
 drivers/of/fdt.c:708: warning: Function parameter or member 'name' not 
described in 'of_get_flat_dt_prop'
 drivers/of/fdt.c:708: warning: Function parameter or member 'size' not 
described in 'of_get_flat_dt_prop'
 drivers/of/fdt.c:758: warning: Function parameter or member 'node' not 
described in 'of_flat_dt_match'
 drivers/of/fdt.c:758: warning: Function parameter or member 'compat' not 
described in 'of_flat_dt_match'
 drivers/of/fdt.c:778: warning: Function parameter or member 'node' not 
described in 'of_get_flat_dt_phandle'
 drivers/of/fdt.c:778: warning: expecting prototype for of_get_flat_dt_prop(). 
Prototype was for of_get_flat_dt_phandle() instead
 drivers/of/fdt.c:955: warning: Function parameter or member 'node' not 
described in 'early_init_dt_scan_root'
 drivers/of/fdt.c:955: warning: Function parameter or member 'uname' not 
described in 'early_init_dt_scan_root'
 drivers/of/fdt.c:955: warning: Function parameter or member 'depth' not 
described in 'early_init_dt_scan_root'
 drivers/of/fdt.c:955: warning: Function parameter or member 'data' not 
described in 'early_init_dt_scan_root'
 drivers/of/fdt.c:991: warning: Function parameter or member 'node' not 
described in 'early_init_dt_scan_memory'
 drivers/of/fdt.c:991: warning: Function parameter or member 'uname' not 
described in 'early_init_dt_scan_memory'
 drivers/of/fdt.c:991: warning: Function parameter or member 'depth' not 
described in 'early_init_dt_scan_memory'
 drivers/of/fdt.c:991: warning: Function parameter or member 'data' not 
described in 'early_init_dt_scan_memory'

Cc: Rob Herring 
Cc: Frank Rowand 
Cc: b...@kernel.crashing.org
Cc: devicet...@vger.kernel.org
Signed-off-by: Lee Jones 
---
 drivers/of/fdt.c | 19 ++-
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index dcc1dd96911a9..1fb3348eb9516 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -470,7 +470,7 @@ void *initial_boot_params __ro_after_init;
 
 static u32 of_fdt_crc32;
 
-/**
+/*
  * __reserved_mem_reserve_reg() - reserve all memory described in 'reg' 
property
  */
 static int __init __reserved_mem_reserve_reg(unsigned long node,
@@ -516,7 +516,7 @@ static int __init __reserved_mem_reserve_reg(unsigned long 
node,
return 0;
 }
 
-/**
+/*
  * __reserved_mem_check_root() - check if #size-cells, #address-cells provided
  * in /reserved-memory matches the values supported by the current 
implementation,
  * also check if ranges property has been provided
@@ -539,7 +539,7 @@ static int __init __reserved_mem_check_root(unsigned long 
node)
return 0;
 }
 
-/**
+/*
  * fdt_scan_reserved_mem() - scan a single FDT node for reserved memory
  */
 static int __init __fdt_scan_reserved_mem(unsigned long node, const char 
*uname,
@@ -650,6 +650,7 @@ int __init of_scan_flat_dt(int (*it)(unsigned long node,
 
 /**
  * of_scan_flat_dt_subnodes - scan sub-nodes of a node call callback on each.
+ * @parent: parent node
  * @it: callback function
  * @data: context data pointer
  *
@@ -689,7 +690,7 @@ int __init of_get_flat_dt_subnode_by_name(unsigned long 
node, const char *uname)
return fdt_subnode_offset(initial_boot_params, node, uname);
 }
 
-/**
+/*
  * of_get_flat_dt_root - find the root node in the flat blob
  */
 unsigned long __in

[PATCH 04/10] of: base: Fix some formatting issues and demote non-conformant kernel-doc headers

2021-03-12 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/of/base.c:315: warning: Function parameter or member 'cpun' not 
described in '__of_find_n_match_cpu_property'
 drivers/of/base.c:315: warning: Function parameter or member 'prop_name' not 
described in '__of_find_n_match_cpu_property'
 drivers/of/base.c:315: warning: Function parameter or member 'cpu' not 
described in '__of_find_n_match_cpu_property'
 drivers/of/base.c:315: warning: Function parameter or member 'thread' not 
described in '__of_find_n_match_cpu_property'
 drivers/of/base.c:315: warning: expecting prototype for property holds the 
physical id of the(). Prototype was for __of_find_n_match_cpu_property() instead
 drivers/of/base.c:1139: warning: Function parameter or member 'match' not 
described in 'of_find_matching_node_and_match'
 drivers/of/base.c:1779: warning: Function parameter or member 'np' not 
described in '__of_add_property'
 drivers/of/base.c:1779: warning: Function parameter or member 'prop' not 
described in '__of_add_property'
 drivers/of/base.c:1800: warning: Function parameter or member 'np' not 
described in 'of_add_property'
 drivers/of/base.c:1800: warning: Function parameter or member 'prop' not 
described in 'of_add_property'
 drivers/of/base.c:1849: warning: Function parameter or member 'np' not 
described in 'of_remove_property'
 drivers/of/base.c:1849: warning: Function parameter or member 'prop' not 
described in 'of_remove_property'
 drivers/of/base.c:2137: warning: Function parameter or member 'dn' not 
described in 'of_console_check'
 drivers/of/base.c:2137: warning: Function parameter or member 'name' not 
described in 'of_console_check'
 drivers/of/base.c:2137: warning: Function parameter or member 'index' not 
described in 'of_console_check'

Cc: Rob Herring 
Cc: Frank Rowand 
Cc: "David S. Miller" 
Cc: devicet...@vger.kernel.org
Signed-off-by: Lee Jones 
---
 drivers/of/base.c | 16 
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/of/base.c b/drivers/of/base.c
index 8a348f0d3c5e7..e0319e5f5793a 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -305,7 +305,7 @@ bool __weak arch_match_cpu_phys_id(int cpu, u64 phys_id)
return (u32)phys_id == cpu;
 }
 
-/**
+/*
  * Checks if the given "prop_name" property holds the physical id of the
  * core/thread corresponding to the logical cpu 'cpu'. If 'thread' is not
  * NULL, local thread number within the core is returned in it.
@@ -1128,7 +1128,7 @@ EXPORT_SYMBOL(of_match_node);
  * will; typically, you pass what the previous call
  * returned. of_node_put() will be called on it
  * @matches:   array of of device match structures to search in
- * @match  Updated to point at the matches entry which matched
+ * @match: Updated to point at the matches entry which matched
  *
  * Returns a node pointer with refcount incremented, use
  * of_node_put() on it when done.
@@ -1772,7 +1772,7 @@ int of_count_phandle_with_args(const struct device_node 
*np, const char *list_na
 }
 EXPORT_SYMBOL(of_count_phandle_with_args);
 
-/**
+/*
  * __of_add_property - Add a property to a node without lock operations
  */
 int __of_add_property(struct device_node *np, struct property *prop)
@@ -1793,7 +1793,7 @@ int __of_add_property(struct device_node *np, struct 
property *prop)
return 0;
 }
 
-/**
+/*
  * of_add_property - Add a property to a node
  */
 int of_add_property(struct device_node *np, struct property *prop)
@@ -1837,7 +1837,7 @@ int __of_remove_property(struct device_node *np, struct 
property *prop)
return 0;
 }
 
-/**
+/*
  * of_remove_property - Remove a property from a node.
  *
  * Note that we don't actually remove it, since we have given out
@@ -2125,9 +2125,9 @@ EXPORT_SYMBOL_GPL(of_alias_get_highest_id);
 
 /**
  * of_console_check() - Test and setup console for DT setup
- * @dn - Pointer to device node
- * @name - Name to use for preferred console without index. ex. "ttyS"
- * @index - Index to use for preferred console.
+ * @dn: Pointer to device node
+ * @name: Name to use for preferred console without index. ex. "ttyS"
+ * @index: Index to use for preferred console.
  *
  * Check if the given device node matches the stdout-path property in the
  * /chosen node. If it does then register it as the preferred console and 
return
-- 
2.27.0



[PATCH 08/10] of: of_net: Demote non-conforming kernel-doc header

2021-03-12 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/of/of_net.c:104: warning: Function parameter or member 'np' not 
described in 'of_get_mac_address'
 drivers/of/of_net.c:104: warning: expecting prototype for mac(). Prototype was 
for of_get_mac_address() instead

Cc: Andrew Lunn 
Cc: Heiner Kallweit 
Cc: Russell King 
Cc: Rob Herring 
Cc: Frank Rowand 
Cc: net...@vger.kernel.org
Cc: devicet...@vger.kernel.org
Signed-off-by: Lee Jones 
---
 drivers/of/of_net.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/of/of_net.c b/drivers/of/of_net.c
index 6e411821583e4..9b41a343e88ab 100644
--- a/drivers/of/of_net.c
+++ b/drivers/of/of_net.c
@@ -78,7 +78,7 @@ static const void *of_get_mac_addr_nvmem(struct device_node 
*np)
return mac;
 }
 
-/**
+/*
  * Search the device tree for the best MAC address to use.  'mac-address' is
  * checked first, because that is supposed to contain to "most recent" MAC
  * address. If that isn't set, then 'local-mac-address' is checked next,
-- 
2.27.0



[PATCH 01/10] of: device: Fix function name in header and demote kernel-doc abuse

2021-03-12 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/of/device.c:72: warning: expecting prototype for of_dma_configure(). 
Prototype was for of_dma_configure_id() instead
 drivers/of/device.c:263: warning: Function parameter or member 'dev' not 
described in 'of_device_modalias'
 drivers/of/device.c:263: warning: Function parameter or member 'str' not 
described in 'of_device_modalias'
 drivers/of/device.c:263: warning: Function parameter or member 'len' not 
described in 'of_device_modalias'
 drivers/of/device.c:280: warning: Function parameter or member 'dev' not 
described in 'of_device_uevent'
 drivers/of/device.c:280: warning: Function parameter or member 'env' not 
described in 'of_device_uevent'

Cc: Rob Herring 
Cc: Frank Rowand 
Cc: devicet...@vger.kernel.org
Signed-off-by: Lee Jones 
---
 drivers/of/device.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/of/device.c b/drivers/of/device.c
index 6cb86de404f1c..64ee363abde24 100644
--- a/drivers/of/device.c
+++ b/drivers/of/device.c
@@ -53,7 +53,7 @@ int of_device_add(struct platform_device *ofdev)
 }
 
 /**
- * of_dma_configure - Setup DMA configuration
+ * of_dma_configure_id - Setup DMA configuration
  * @dev:   Device to apply DMA configuration
  * @np:Pointer to OF node having DMA configuration
  * @force_dma:  Whether device is to be set up by of_dma_configure() even if
@@ -256,7 +256,7 @@ int of_device_request_module(struct device *dev)
 }
 EXPORT_SYMBOL_GPL(of_device_request_module);
 
-/**
+/*
  * of_device_modalias - Fill buffer with newline terminated modalias string
  */
 ssize_t of_device_modalias(struct device *dev, char *str, ssize_t len)
@@ -273,7 +273,7 @@ ssize_t of_device_modalias(struct device *dev, char *str, 
ssize_t len)
 }
 EXPORT_SYMBOL_GPL(of_device_modalias);
 
-/**
+/*
  * of_device_uevent - Display OF related uevent information
  */
 void of_device_uevent(struct device *dev, struct kobj_uevent_env *env)
-- 
2.27.0



[PATCH 05/10] of: property: Provide missing member description and remove excess param

2021-03-12 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/of/property.c:1239: warning: Function parameter or member 'optional' 
not described in 'supplier_bindings'
 drivers/of/property.c:1366: warning: Excess function parameter 'dev' 
description in 'of_link_property'

Cc: Rob Herring 
Cc: Frank Rowand 
Cc: "David S. Miller" 
Cc: devicet...@vger.kernel.org
Signed-off-by: Lee Jones 
---
 drivers/of/property.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/of/property.c b/drivers/of/property.c
index 5036a362f52e7..5faf24a791c9d 100644
--- a/drivers/of/property.c
+++ b/drivers/of/property.c
@@ -1225,6 +1225,7 @@ static struct device_node *parse_##fname(struct 
device_node *np,   \
  * @parse_prop.prop_name: Name of property holding a phandle value
  * @parse_prop.index: For properties holding a list of phandles, this is the
  *   index into the list
+ * @optional: Describes whether a supplier is mandatory or not
  *
  * Returns:
  * parse_prop() return values are
@@ -1344,7 +1345,6 @@ static const struct supplier_bindings 
of_supplier_bindings[] = {
 
 /**
  * of_link_property - Create device links to suppliers listed in a property
- * @dev: Consumer device
  * @con_np: The consumer device tree node which contains the property
  * @prop_name: Name of property to be parsed
  *
-- 
2.27.0



[PATCH 00/10] Rid W=1 warnings from OF

2021-03-12 Thread 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.

Lee Jones (10):
  of: device: Fix function name in header and demote kernel-doc abuse
  of: dynamic: Fix incorrect parameter name and demote kernel-doc abuse
  of: platform: Demote kernel-doc abuse
  of: base: Fix some formatting issues and demote non-conformant
kernel-doc headers
  of: property: Provide missing member description and remove excess
param
  of: address: Demote non-conformant kernel-doc header
  of: fdt: Demote kernel-doc abuses
  of: of_net: Demote non-conforming kernel-doc header
  of: overlay: Fix function name disparity
  of: of_reserved_mem: Demote kernel-doc abuses

 drivers/of/address.c |  2 +-
 drivers/of/base.c| 16 
 drivers/of/device.c  |  6 +++---
 drivers/of/dynamic.c |  6 +++---
 drivers/of/fdt.c | 19 ++-
 drivers/of/of_net.c  |  2 +-
 drivers/of/of_reserved_mem.c |  6 +++---
 drivers/of/overlay.c |  2 +-
 drivers/of/platform.c|  2 +-
 drivers/of/property.c|  2 +-
 10 files changed, 32 insertions(+), 31 deletions(-)

Cc: Andrew Lunn 
Cc: Anton Vorontsov 
Cc: b...@kernel.crashing.org
Cc: Colin Cross 
Cc: "David S. Miller" 
Cc: devicet...@vger.kernel.org
Cc: Frank Rowand 
Cc: Heiner Kallweit 
Cc: Josh Cartwright 
Cc: Kees Cook 
Cc: Marek Szyprowski 
Cc: net...@vger.kernel.org
Cc: Pantelis Antoniou 
Cc: Rob Herring 
Cc: Russell King 
Cc: Tony Luck 
-- 
2.27.0



[PATCH 03/10] of: platform: Demote kernel-doc abuse

2021-03-12 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/of/platform.c:298: warning: Function parameter or member 'lookup' not 
described in 'of_dev_lookup'
 drivers/of/platform.c:298: warning: Function parameter or member 'np' not 
described in 'of_dev_lookup'

Cc: Rob Herring 
Cc: Frank Rowand 
Cc: Kees Cook 
Cc: Anton Vorontsov 
Cc: Colin Cross 
Cc: Tony Luck 
Cc: b...@kernel.crashing.org
Cc: devicet...@vger.kernel.org
Signed-off-by: Lee Jones 
---
 drivers/of/platform.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/of/platform.c b/drivers/of/platform.c
index 0da86209ddaab..0ed46d301431b 100644
--- a/drivers/of/platform.c
+++ b/drivers/of/platform.c
@@ -290,7 +290,7 @@ static struct amba_device *of_amba_device_create(struct 
device_node *node,
 }
 #endif /* CONFIG_ARM_AMBA */
 
-/**
+/*
  * of_dev_lookup() - Given a device node, lookup the preferred Linux name
  */
 static const struct of_dev_auxdata *of_dev_lookup(const struct of_dev_auxdata 
*lookup,
-- 
2.27.0



[PATCH 02/10] of: dynamic: Fix incorrect parameter name and demote kernel-doc abuse

2021-03-12 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/of/dynamic.c:234: warning: Function parameter or member 'np' not 
described in 'of_attach_node'
 drivers/of/dynamic.c:286: warning: Function parameter or member 'np' not 
described in 'of_detach_node'
 drivers/of/dynamic.c:326: warning: Function parameter or member 'kobj' not 
described in 'of_node_release'
 drivers/of/dynamic.c:326: warning: Excess function parameter 'kref' 
description in 'of_node_release'

Cc: Rob Herring 
Cc: Frank Rowand 
Cc: devicet...@vger.kernel.org
Signed-off-by: Lee Jones 
---
 drivers/of/dynamic.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/of/dynamic.c b/drivers/of/dynamic.c
index 9a824decf61f1..93b35f3c92c18 100644
--- a/drivers/of/dynamic.c
+++ b/drivers/of/dynamic.c
@@ -227,7 +227,7 @@ static void __of_attach_node(struct device_node *np)
of_node_clear_flag(np, OF_DETACHED);
 }
 
-/**
+/*
  * of_attach_node() - Plug a device node into the tree and global list.
  */
 int of_attach_node(struct device_node *np)
@@ -279,7 +279,7 @@ void __of_detach_node(struct device_node *np)
__of_phandle_cache_inv_entry(np->phandle);
 }
 
-/**
+/*
  * of_detach_node() - "Unplug" a node from the device tree.
  */
 int of_detach_node(struct device_node *np)
@@ -318,7 +318,7 @@ static void property_list_free(struct property *prop_list)
 
 /**
  * of_node_release() - release a dynamically allocated node
- * @kref: kref element of the node to be released
+ * @kobj: kernel object of the node to be released
  *
  * In of_node_put() this function is passed to kref_put() as the destructor.
  */
-- 
2.27.0



[PATCH 2/6] pcmcia: cistpl: Demote non-conformant kernel-doc headers to standard comments

2021-03-12 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/pcmcia/cistpl.c:88: warning: Function parameter or member 's' not 
described in 'set_cis_map'
 drivers/pcmcia/cistpl.c:88: warning: Function parameter or member 
'card_offset' not described in 'set_cis_map'
 drivers/pcmcia/cistpl.c:88: warning: Function parameter or member 'flags' not 
described in 'set_cis_map'
 drivers/pcmcia/cistpl.c:136: warning: Function parameter or member 's' not 
described in 'pcmcia_read_cis_mem'
 drivers/pcmcia/cistpl.c:136: warning: Function parameter or member 'attr' not 
described in 'pcmcia_read_cis_mem'
 drivers/pcmcia/cistpl.c:136: warning: Function parameter or member 'addr' not 
described in 'pcmcia_read_cis_mem'
 drivers/pcmcia/cistpl.c:136: warning: Function parameter or member 'len' not 
described in 'pcmcia_read_cis_mem'
 drivers/pcmcia/cistpl.c:136: warning: Function parameter or member 'ptr' not 
described in 'pcmcia_read_cis_mem'
 drivers/pcmcia/cistpl.c:217: warning: Function parameter or member 's' not 
described in 'pcmcia_write_cis_mem'
 drivers/pcmcia/cistpl.c:217: warning: Function parameter or member 'attr' not 
described in 'pcmcia_write_cis_mem'
 drivers/pcmcia/cistpl.c:217: warning: Function parameter or member 'addr' not 
described in 'pcmcia_write_cis_mem'
 drivers/pcmcia/cistpl.c:217: warning: Function parameter or member 'len' not 
described in 'pcmcia_write_cis_mem'
 drivers/pcmcia/cistpl.c:217: warning: Function parameter or member 'ptr' not 
described in 'pcmcia_write_cis_mem'
 drivers/pcmcia/cistpl.c:289: warning: Function parameter or member 's' not 
described in 'read_cis_cache'
 drivers/pcmcia/cistpl.c:289: warning: Function parameter or member 'attr' not 
described in 'read_cis_cache'
 drivers/pcmcia/cistpl.c:289: warning: Function parameter or member 'addr' not 
described in 'read_cis_cache'
 drivers/pcmcia/cistpl.c:289: warning: Function parameter or member 'len' not 
described in 'read_cis_cache'
 drivers/pcmcia/cistpl.c:289: warning: Function parameter or member 'ptr' not 
described in 'read_cis_cache'
 drivers/pcmcia/cistpl.c:372: warning: Function parameter or member 's' not 
described in 'verify_cis_cache'
 drivers/pcmcia/cistpl.c:412: warning: Function parameter or member 's' not 
described in 'pcmcia_replace_cis'
 drivers/pcmcia/cistpl.c:412: warning: Function parameter or member 'data' not 
described in 'pcmcia_replace_cis'
 drivers/pcmcia/cistpl.c:412: warning: Function parameter or member 'len' not 
described in 'pcmcia_replace_cis'

Cc: Dominik Brodowski 
Cc: Tian Tao 
Cc: dahi...@users.sourceforge.net
Signed-off-by: Lee Jones 
---
 drivers/pcmcia/cistpl.c | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/pcmcia/cistpl.c b/drivers/pcmcia/cistpl.c
index e6939103991ba..948b763dc451e 100644
--- a/drivers/pcmcia/cistpl.c
+++ b/drivers/pcmcia/cistpl.c
@@ -75,7 +75,7 @@ void release_cis_mem(struct pcmcia_socket *s)
mutex_unlock(&s->ops_mutex);
 }
 
-/**
+/*
  * set_cis_map() - map the card memory at "card_offset" into virtual space.
  *
  * If flags & MAP_ATTRIB, map the attribute space, otherwise
@@ -126,7 +126,7 @@ static void __iomem *set_cis_map(struct pcmcia_socket *s,
 #define IS_ATTR1
 #define IS_INDIRECT8
 
-/**
+/*
  * pcmcia_read_cis_mem() - low-level function to read CIS memory
  *
  * must be called with ops_mutex held
@@ -206,7 +206,7 @@ int pcmcia_read_cis_mem(struct pcmcia_socket *s, int attr, 
u_int addr,
 }
 
 
-/**
+/*
  * pcmcia_write_cis_mem() - low-level function to write CIS memory
  *
  * Probably only useful for writing one-byte registers. Must be called
@@ -277,7 +277,7 @@ int pcmcia_write_cis_mem(struct pcmcia_socket *s, int attr, 
u_int addr,
 }
 
 
-/**
+/*
  * read_cis_cache() - read CIS memory or its associated cache
  *
  * This is a wrapper around read_cis_mem, with the same interface,
@@ -365,7 +365,7 @@ void destroy_cis_cache(struct pcmcia_socket *s)
}
 }
 
-/**
+/*
  * verify_cis_cache() - does the CIS match what is in the CIS cache?
  */
 int verify_cis_cache(struct pcmcia_socket *s)
@@ -401,7 +401,7 @@ int verify_cis_cache(struct pcmcia_socket *s)
return 0;
 }
 
-/**
+/*
  * pcmcia_replace_cis() - use a replacement CIS instead of the card's CIS
  *
  * For really bad cards, we provide a facility for uploading a
-- 
2.27.0



[PATCH 0/6] Rid W=1 warnings from PCMCIA

2021-03-12 Thread 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.

Lee Jones (6):
  pcmcia: rsrc_nonstatic: Demote kernel-doc abuses
  pcmcia: cistpl: Demote non-conformant kernel-doc headers to standard
comments
  pcmcia: pcmcia_cis: Demote non-conforming kernel-doc headers to
standard kernel-doc
  pcmcia: ds: Fix function name disparity in header
  pcmcia: pcmcia_resource: Fix some kernel-doc formatting/disparities
and demote others
  pcmcia: rsrc_nonstatic: Fix call-back function as reference formatting

 drivers/pcmcia/cistpl.c  | 12 ++--
 drivers/pcmcia/ds.c  |  2 +-
 drivers/pcmcia/pcmcia_cis.c  | 10 +-
 drivers/pcmcia/pcmcia_resource.c | 11 ++-
 drivers/pcmcia/rsrc_nonstatic.c  | 22 +++---
 5 files changed, 29 insertions(+), 28 deletions(-)

Cc: dahi...@users.sourceforge.net
Cc: Dominik Brodowski 
Cc: Takashi Iwai 
Cc: Tian Tao 
-- 
2.27.0



[PATCH 1/6] pcmcia: rsrc_nonstatic: Demote kernel-doc abuses

2021-03-12 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/pcmcia/rsrc_nonstatic.c:265: warning: Function parameter or member 's' 
not described in 'readable'
 drivers/pcmcia/rsrc_nonstatic.c:265: warning: Function parameter or member 
'res' not described in 'readable'
 drivers/pcmcia/rsrc_nonstatic.c:265: warning: Function parameter or member 
'count' not described in 'readable'
 drivers/pcmcia/rsrc_nonstatic.c:296: warning: Function parameter or member 's' 
not described in 'checksum'
 drivers/pcmcia/rsrc_nonstatic.c:296: warning: Function parameter or member 
'res' not described in 'checksum'
 drivers/pcmcia/rsrc_nonstatic.c:296: warning: Function parameter or member 
'value' not described in 'checksum'
 drivers/pcmcia/rsrc_nonstatic.c:349: warning: Function parameter or member 
'value' not described in 'do_validate_mem'
 drivers/pcmcia/rsrc_nonstatic.c:349: warning: Excess function parameter 
'validate' description in 'do_validate_mem'
 drivers/pcmcia/rsrc_nonstatic.c:407: warning: Function parameter or member 
'value' not described in 'do_mem_probe'
 drivers/pcmcia/rsrc_nonstatic.c:407: warning: Excess function parameter 
'validate' description in 'do_mem_probe'
 drivers/pcmcia/rsrc_nonstatic.c:407: warning: Excess function parameter 
'fallback' description in 'do_mem_probe'

Cc: Dominik Brodowski 
Cc: Takashi Iwai 
Cc: dahi...@users.sourceforge.net
Signed-off-by: Lee Jones 
---
 drivers/pcmcia/rsrc_nonstatic.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/pcmcia/rsrc_nonstatic.c b/drivers/pcmcia/rsrc_nonstatic.c
index 3b05760e69d62..55f9fed478eba 100644
--- a/drivers/pcmcia/rsrc_nonstatic.c
+++ b/drivers/pcmcia/rsrc_nonstatic.c
@@ -257,7 +257,7 @@ static void do_io_probe(struct pcmcia_socket *s, unsigned 
int base,
 
 /*==*/
 
-/**
+/*
  * readable() - iomem validation function for cards with a valid CIS
  */
 static int readable(struct pcmcia_socket *s, struct resource *res,
@@ -288,7 +288,7 @@ static int readable(struct pcmcia_socket *s, struct 
resource *res,
return 0;
 }
 
-/**
+/*
  * checksum() - iomem validation function for simple memory cards
  */
 static int checksum(struct pcmcia_socket *s, struct resource *res,
-- 
2.27.0



[PATCH 5/6] pcmcia: pcmcia_resource: Fix some kernel-doc formatting/disparities and demote others

2021-03-12 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/pcmcia/pcmcia_resource.c:160: warning: Function parameter or member 
'p_dev' not described in 'pcmcia_access_config'
 drivers/pcmcia/pcmcia_resource.c:160: warning: Function parameter or member 
'where' not described in 'pcmcia_access_config'
 drivers/pcmcia/pcmcia_resource.c:160: warning: Function parameter or member 
'val' not described in 'pcmcia_access_config'
 drivers/pcmcia/pcmcia_resource.c:160: warning: Function parameter or member 
'accessf' not described in 'pcmcia_access_config'
 drivers/pcmcia/pcmcia_resource.c:194: warning: Function parameter or member 
'p_dev' not described in 'pcmcia_read_config_byte'
 drivers/pcmcia/pcmcia_resource.c:194: warning: Function parameter or member 
'where' not described in 'pcmcia_read_config_byte'
 drivers/pcmcia/pcmcia_resource.c:194: warning: Function parameter or member 
'val' not described in 'pcmcia_read_config_byte'
 drivers/pcmcia/pcmcia_resource.c:207: warning: Function parameter or member 
'p_dev' not described in 'pcmcia_write_config_byte'
 drivers/pcmcia/pcmcia_resource.c:207: warning: Function parameter or member 
'where' not described in 'pcmcia_write_config_byte'
 drivers/pcmcia/pcmcia_resource.c:207: warning: Function parameter or member 
'val' not described in 'pcmcia_write_config_byte'
 drivers/pcmcia/pcmcia_resource.c:728: warning: Function parameter or member 
'p_dev' not described in 'pcmcia_setup_isa_irq'
 drivers/pcmcia/pcmcia_resource.c:728: warning: Function parameter or member 
'type' not described in 'pcmcia_setup_isa_irq'
 drivers/pcmcia/pcmcia_resource.c:793: warning: Function parameter or member 
'p_dev' not described in 'pcmcia_setup_irq'

Cc: Dominik Brodowski 
Cc: dahi...@users.sourceforge.net
Signed-off-by: Lee Jones 
---
 drivers/pcmcia/pcmcia_resource.c | 11 ++-
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/pcmcia/pcmcia_resource.c b/drivers/pcmcia/pcmcia_resource.c
index e3a6b6c8a5b01..c1c1972921114 100644
--- a/drivers/pcmcia/pcmcia_resource.c
+++ b/drivers/pcmcia/pcmcia_resource.c
@@ -144,7 +144,7 @@ static int alloc_io_space(struct pcmcia_socket *s, struct 
resource *res,
 }
 
 
-/**
+/*
  * pcmcia_access_config() - read or write card configuration registers
  *
  * pcmcia_access_config() reads and writes configuration registers in
@@ -184,7 +184,7 @@ static int pcmcia_access_config(struct pcmcia_device *p_dev,
 }
 
 
-/**
+/*
  * pcmcia_read_config_byte() - read a byte from a card configuration register
  *
  * pcmcia_read_config_byte() reads a byte from a configuration register in
@@ -197,7 +197,7 @@ int pcmcia_read_config_byte(struct pcmcia_device *p_dev, 
off_t where, u8 *val)
 EXPORT_SYMBOL(pcmcia_read_config_byte);
 
 
-/**
+/*
  * pcmcia_write_config_byte() - write a byte to a card configuration register
  *
  * pcmcia_write_config_byte() writes a byte to a configuration register in
@@ -720,7 +720,8 @@ static irqreturn_t test_action(int cpl, void *dev_id)
 
 /**
  * pcmcia_setup_isa_irq() - determine whether an ISA IRQ can be used
- * @p_dev - the associated PCMCIA device
+ * @p_dev: the associated PCMCIA device
+ * @type:  IRQ type (flags)
  *
  * locking note: must be called with ops_mutex locked.
  */
@@ -785,7 +786,7 @@ void pcmcia_cleanup_irq(struct pcmcia_socket *s)
 
 /**
  * pcmcia_setup_irq() - determine IRQ to be used for device
- * @p_dev - the associated PCMCIA device
+ * @p_dev: the associated PCMCIA device
  *
  * locking note: must be called with ops_mutex locked.
  */
-- 
2.27.0



[PATCH 6/6] pcmcia: rsrc_nonstatic: Fix call-back function as reference formatting

2021-03-12 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/pcmcia/rsrc_nonstatic.c:349: warning: Function parameter or member 
'value' not described in 'do_validate_mem'
 drivers/pcmcia/rsrc_nonstatic.c:349: warning: Excess function parameter 
'validate' description in 'do_validate_mem'
 drivers/pcmcia/rsrc_nonstatic.c:407: warning: Function parameter or member 
'value' not described in 'do_mem_probe'
 drivers/pcmcia/rsrc_nonstatic.c:407: warning: Excess function parameter 
'validate' description in 'do_mem_probe'
 drivers/pcmcia/rsrc_nonstatic.c:407: warning: Excess function parameter 
'fallback' description in 'do_mem_probe'

Cc: Dominik Brodowski 
Cc: dahi...@users.sourceforge.net
Signed-off-by: Lee Jones 
---
 drivers/pcmcia/rsrc_nonstatic.c | 18 +-
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/pcmcia/rsrc_nonstatic.c b/drivers/pcmcia/rsrc_nonstatic.c
index 55f9fed478eba..bb15a8bdbaab5 100644
--- a/drivers/pcmcia/rsrc_nonstatic.c
+++ b/drivers/pcmcia/rsrc_nonstatic.c
@@ -343,9 +343,9 @@ static int checksum(struct pcmcia_socket *s, struct 
resource *res,
  */
 static int do_validate_mem(struct pcmcia_socket *s,
   unsigned long base, unsigned long size,
-  int validate (struct pcmcia_socket *s,
-struct resource *res,
-unsigned int *value))
+  int (*validate)(struct pcmcia_socket *s,
+  struct resource *res,
+  unsigned int *value))
 {
struct socket_data *s_data = s->resource_data;
struct resource *res1, *res2;
@@ -398,12 +398,12 @@ static int do_validate_mem(struct pcmcia_socket *s,
  * function returns the size of the usable memory area.
  */
 static int do_mem_probe(struct pcmcia_socket *s, u_long base, u_long num,
-   int validate (struct pcmcia_socket *s,
- struct resource *res,
- unsigned int *value),
-   int fallback (struct pcmcia_socket *s,
- struct resource *res,
- unsigned int *value))
+   int (*validate)(struct pcmcia_socket *s,
+   struct resource *res,
+   unsigned int *value),
+   int (*fallback)(struct pcmcia_socket *s,
+   struct resource *res,
+   unsigned int *value))
 {
struct socket_data *s_data = s->resource_data;
u_long i, j, bad, fail, step;
-- 
2.27.0



[PATCH 4/6] pcmcia: ds: Fix function name disparity in header

2021-03-12 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/pcmcia/ds.c:96: warning: expecting prototype for 
pcmcia_store_new_id(). Prototype was for new_id_store() instead

Cc: Dominik Brodowski 
Cc: dahi...@users.sourceforge.net
Signed-off-by: Lee Jones 
---
 drivers/pcmcia/ds.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c
index 72114907c0e4d..c944eb91fdced 100644
--- a/drivers/pcmcia/ds.c
+++ b/drivers/pcmcia/ds.c
@@ -83,7 +83,7 @@ struct pcmcia_dynid {
 };
 
 /**
- * pcmcia_store_new_id - add a new PCMCIA device ID to this driver and 
re-probe devices
+ * new_id_store() - add a new PCMCIA device ID to this driver and re-probe 
devices
  * @driver: target device driver
  * @buf: buffer for scanning device ID data
  * @count: input size
-- 
2.27.0



<    1   2   3   4   5   6   7   8   9   10   >