* [RESEND 01/19] scsi: aic7xxx: aic79xx_osm: Remove unused variable 'saved_scsiid'
2020-11-02 14:23 [RESEND 00/19] Rid W=1 warnings in SCSI Lee Jones
@ 2020-11-02 14:23 ` Lee Jones
2020-11-02 14:23 ` [RESEND 02/19] scsi: mpt3sas: mpt3sas_scsih: Fix function documentation formatting Lee Jones
` (18 subsequent siblings)
19 siblings, 0 replies; 26+ messages in thread
From: Lee Jones @ 2020-11-02 14:23 UTC (permalink / raw)
To: martin.petersen, jejb
Cc: linux-kernel, linux-scsi, Lee Jones, Hannes Reinecke
Fixes the following W=1 kernel build warning(s):
drivers/scsi/aic7xxx/aic79xx_osm.c: In function ‘ahd_linux_queue_abort_cmd’:
drivers/scsi/aic7xxx/aic79xx_osm.c:2143:9: warning: variable ‘saved_scsiid’ set but not used [-Wunused-but-set-variable]
Cc: Hannes Reinecke <hare@suse.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
drivers/scsi/aic7xxx/aic79xx_osm.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/scsi/aic7xxx/aic79xx_osm.c b/drivers/scsi/aic7xxx/aic79xx_osm.c
index f32398939f74b..d413b1c5fdc54 100644
--- a/drivers/scsi/aic7xxx/aic79xx_osm.c
+++ b/drivers/scsi/aic7xxx/aic79xx_osm.c
@@ -2140,7 +2140,6 @@ ahd_linux_queue_abort_cmd(struct scsi_cmnd *cmd)
u_int saved_scbptr;
u_int active_scbptr;
u_int last_phase;
- u_int saved_scsiid;
u_int cdb_byte;
int retval = SUCCESS;
int was_paused;
@@ -2254,7 +2253,7 @@ ahd_linux_queue_abort_cmd(struct scsi_cmnd *cmd)
* passed in command. That command is currently active on the
* bus or is in the disconnected state.
*/
- saved_scsiid = ahd_inb(ahd, SAVED_SCSIID);
+ ahd_inb(ahd, SAVED_SCSIID);
if (last_phase != P_BUSFREE
&& SCB_GET_TAG(pending_scb) == active_scbptr) {
--
2.25.1
^ permalink raw reply related [flat|nested] 26+ messages in thread* [RESEND 02/19] scsi: mpt3sas: mpt3sas_scsih: Fix function documentation formatting
2020-11-02 14:23 [RESEND 00/19] Rid W=1 warnings in SCSI Lee Jones
2020-11-02 14:23 ` [RESEND 01/19] scsi: aic7xxx: aic79xx_osm: Remove unused variable 'saved_scsiid' Lee Jones
@ 2020-11-02 14:23 ` Lee Jones
2020-11-02 14:23 ` [RESEND 03/19] scsi: lpfc: lpfc_scsi: Fix a whole host of kernel-doc issues Lee Jones
` (17 subsequent siblings)
19 siblings, 0 replies; 26+ messages in thread
From: Lee Jones @ 2020-11-02 14:23 UTC (permalink / raw)
To: martin.petersen, jejb
Cc: linux-kernel, linux-scsi, Lee Jones, Sathya Prakash,
Sreekanth Reddy, Suganath Prabu Subramani, MPT-FusionLinux.pdl,
MPT-FusionLinux.pdl
Fixes the following W=1 kernel build warning(s):
drivers/scsi/mpt3sas/mpt3sas_scsih.c:2778: warning: Function parameter or member 'ioc' not described in 'scsih_tm_cmd_map_status'
drivers/scsi/mpt3sas/mpt3sas_scsih.c:2778: warning: Function parameter or member 'channel' not described in 'scsih_tm_cmd_map_status'
drivers/scsi/mpt3sas/mpt3sas_scsih.c:2829: warning: Function parameter or member 'ioc' not described in 'scsih_tm_post_processing'
drivers/scsi/mpt3sas/mpt3sas_scsih.c:2829: warning: Function parameter or member 'channel' not described in 'scsih_tm_post_processing'
Cc: Sathya Prakash <sathya.prakash@broadcom.com>
Cc: Sreekanth Reddy <sreekanth.reddy@broadcom.com>
Cc: Suganath Prabu Subramani <suganath-prabu.subramani@broadcom.com>
Cc: MPT-FusionLinux.pdl@avagotech.com
Cc: MPT-FusionLinux.pdl@broadcom.com
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
drivers/scsi/mpt3sas/mpt3sas_scsih.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
index 5f845d7094fcc..f01983dc73703 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
@@ -2762,8 +2762,8 @@ mpt3sas_scsih_clear_tm_flag(struct MPT3SAS_ADAPTER *ioc, u16 handle)
/**
* scsih_tm_cmd_map_status - map the target reset & LUN reset TM status
- * @ioc - per adapter object
- * @channel - the channel assigned by the OS
+ * @ioc: per adapter object
+ * @channel: the channel assigned by the OS
* @id: the id assigned by the OS
* @lun: lun number
* @type: MPI2_SCSITASKMGMT_TASKTYPE__XXX (defined in mpi2_init.h)
@@ -2808,9 +2808,9 @@ scsih_tm_cmd_map_status(struct MPT3SAS_ADAPTER *ioc, uint channel,
/**
* scsih_tm_post_processing - post processing of target & LUN reset
- * @ioc - per adapter object
+ * @ioc: per adapter object
* @handle: device handle
- * @channel - the channel assigned by the OS
+ * @channel: the channel assigned by the OS
* @id: the id assigned by the OS
* @lun: lun number
* @type: MPI2_SCSITASKMGMT_TASKTYPE__XXX (defined in mpi2_init.h)
--
2.25.1
^ permalink raw reply related [flat|nested] 26+ messages in thread* [RESEND 03/19] scsi: lpfc: lpfc_scsi: Fix a whole host of kernel-doc issues
2020-11-02 14:23 [RESEND 00/19] Rid W=1 warnings in SCSI Lee Jones
2020-11-02 14:23 ` [RESEND 01/19] scsi: aic7xxx: aic79xx_osm: Remove unused variable 'saved_scsiid' Lee Jones
2020-11-02 14:23 ` [RESEND 02/19] scsi: mpt3sas: mpt3sas_scsih: Fix function documentation formatting Lee Jones
@ 2020-11-02 14:23 ` Lee Jones
2020-11-02 14:23 ` [RESEND 04/19] scsi: lpfc: lpfc_attr: Demote kernel-doc format for redefined functions Lee Jones
` (16 subsequent siblings)
19 siblings, 0 replies; 26+ messages in thread
From: Lee Jones @ 2020-11-02 14:23 UTC (permalink / raw)
To: martin.petersen, jejb
Cc: linux-kernel, linux-scsi, Lee Jones, James Smart, Dick Kennedy
Fixes the following W=1 kernel build warning(s):
drivers/scsi/lpfc/lpfc_scsi.c:331: warning: Function parameter or member 'num_to_alloc' not described in 'lpfc_new_scsi_buf_s3'
drivers/scsi/lpfc/lpfc_scsi.c:331: warning: Excess function parameter 'num_to_allocate' description in 'lpfc_new_scsi_buf_s3'
drivers/scsi/lpfc/lpfc_scsi.c:507: warning: Function parameter or member 'idx' not described in 'lpfc_sli4_io_xri_aborted'
drivers/scsi/lpfc/lpfc_scsi.c:593: warning: Function parameter or member 'ndlp' not described in 'lpfc_get_scsi_buf_s3'
drivers/scsi/lpfc/lpfc_scsi.c:593: warning: Function parameter or member 'cmnd' not described in 'lpfc_get_scsi_buf_s3'
drivers/scsi/lpfc/lpfc_scsi.c:632: warning: Function parameter or member 'ndlp' not described in 'lpfc_get_scsi_buf_s4'
drivers/scsi/lpfc/lpfc_scsi.c:632: warning: Function parameter or member 'cmnd' not described in 'lpfc_get_scsi_buf_s4'
drivers/scsi/lpfc/lpfc_scsi.c:744: warning: Function parameter or member 'ndlp' not described in 'lpfc_get_scsi_buf'
drivers/scsi/lpfc/lpfc_scsi.c:744: warning: Function parameter or member 'cmnd' not described in 'lpfc_get_scsi_buf'
drivers/scsi/lpfc/lpfc_scsi.c:986: warning: Function parameter or member 'new_guard' not described in 'lpfc_bg_err_inject'
drivers/scsi/lpfc/lpfc_scsi.c:1393: warning: Function parameter or member 'txop' not described in 'lpfc_sc_to_bg_opcodes'
drivers/scsi/lpfc/lpfc_scsi.c:1393: warning: Function parameter or member 'rxop' not described in 'lpfc_sc_to_bg_opcodes'
drivers/scsi/lpfc/lpfc_scsi.c:1393: warning: Excess function parameter 'txopt' description in 'lpfc_sc_to_bg_opcodes'
drivers/scsi/lpfc/lpfc_scsi.c:1393: warning: Excess function parameter 'rxopt' description in 'lpfc_sc_to_bg_opcodes'
drivers/scsi/lpfc/lpfc_scsi.c:1473: warning: Function parameter or member 'txop' not described in 'lpfc_bg_err_opcodes'
drivers/scsi/lpfc/lpfc_scsi.c:1473: warning: Function parameter or member 'rxop' not described in 'lpfc_bg_err_opcodes'
drivers/scsi/lpfc/lpfc_scsi.c:1473: warning: Excess function parameter 'txopt' description in 'lpfc_bg_err_opcodes'
drivers/scsi/lpfc/lpfc_scsi.c:1473: warning: Excess function parameter 'rxopt' description in 'lpfc_bg_err_opcodes'
drivers/scsi/lpfc/lpfc_scsi.c:1565: warning: Function parameter or member 'datasegcnt' not described in 'lpfc_bg_setup_bpl'
drivers/scsi/lpfc/lpfc_scsi.c:1565: warning: Excess function parameter 'datacnt' description in 'lpfc_bg_setup_bpl'
drivers/scsi/lpfc/lpfc_scsi.c:1951: warning: Function parameter or member 'datasegcnt' not described in 'lpfc_bg_setup_sgl'
drivers/scsi/lpfc/lpfc_scsi.c:1951: warning: Function parameter or member 'lpfc_cmd' not described in 'lpfc_bg_setup_sgl'
drivers/scsi/lpfc/lpfc_scsi.c:1951: warning: Excess function parameter 'datacnt' description in 'lpfc_bg_setup_sgl'
drivers/scsi/lpfc/lpfc_scsi.c:2131: warning: Function parameter or member 'lpfc_cmd' not described in 'lpfc_bg_setup_sgl_prot'
drivers/scsi/lpfc/lpfc_scsi.c:4476: warning: Function parameter or member 't' not described in 'lpfc_poll_timeout'
drivers/scsi/lpfc/lpfc_scsi.c:4476: warning: Excess function parameter 'ptr' description in 'lpfc_poll_timeout'
drivers/scsi/lpfc/lpfc_scsi.c:4503: warning: Function parameter or member 'shost' not described in 'lpfc_queuecommand'
drivers/scsi/lpfc/lpfc_scsi.c:4503: warning: Excess function parameter 'done' description in 'lpfc_queuecommand'
drivers/scsi/lpfc/lpfc_scsi.c:5035: warning: Function parameter or member 'cmnd' not described in 'lpfc_send_taskmgmt'
drivers/scsi/lpfc/lpfc_scsi.c:5035: warning: Excess function parameter 'rdata' description in 'lpfc_send_taskmgmt'
drivers/scsi/lpfc/lpfc_scsi.c:5688: warning: Function parameter or member 'phba' not described in 'lpfc_create_device_data'
drivers/scsi/lpfc/lpfc_scsi.c:5688: warning: Function parameter or member 'pri' not described in 'lpfc_create_device_data'
drivers/scsi/lpfc/lpfc_scsi.c:5688: warning: Excess function parameter 'pha' description in 'lpfc_create_device_data'
drivers/scsi/lpfc/lpfc_scsi.c:5730: warning: Function parameter or member 'phba' not described in 'lpfc_delete_device_data'
drivers/scsi/lpfc/lpfc_scsi.c:5730: warning: Excess function parameter 'pha' description in 'lpfc_delete_device_data'
drivers/scsi/lpfc/lpfc_scsi.c:5762: warning: Function parameter or member 'phba' not described in '__lpfc_get_device_data'
drivers/scsi/lpfc/lpfc_scsi.c:5762: warning: Excess function parameter 'pha' description in '__lpfc_get_device_data'
drivers/scsi/lpfc/lpfc_scsi.c:5818: warning: Function parameter or member 'phba' not described in 'lpfc_find_next_oas_lun'
drivers/scsi/lpfc/lpfc_scsi.c:5818: warning: Function parameter or member 'found_lun_pri' not described in 'lpfc_find_next_oas_lun'
drivers/scsi/lpfc/lpfc_scsi.c:5818: warning: Excess function parameter 'pha' description in 'lpfc_find_next_oas_lun'
drivers/scsi/lpfc/lpfc_scsi.c:5909: warning: Function parameter or member 'phba' not described in 'lpfc_enable_oas_lun'
drivers/scsi/lpfc/lpfc_scsi.c:5909: warning: Function parameter or member 'pri' not described in 'lpfc_enable_oas_lun'
drivers/scsi/lpfc/lpfc_scsi.c:5909: warning: Excess function parameter 'pha' description in 'lpfc_enable_oas_lun'
drivers/scsi/lpfc/lpfc_scsi.c:5968: warning: Function parameter or member 'phba' not described in 'lpfc_disable_oas_lun'
drivers/scsi/lpfc/lpfc_scsi.c:5968: warning: Function parameter or member 'pri' not described in 'lpfc_disable_oas_lun'
drivers/scsi/lpfc/lpfc_scsi.c:5968: warning: Excess function parameter 'pha' description in 'lpfc_disable_oas_lun'
Cc: James Smart <james.smart@broadcom.com>
Cc: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
drivers/scsi/lpfc/lpfc_scsi.c | 48 ++++++++++++++++++++++-------------
1 file changed, 30 insertions(+), 18 deletions(-)
diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c
index 4ffdfd2c8604d..0f0ab86cf1923 100644
--- a/drivers/scsi/lpfc/lpfc_scsi.c
+++ b/drivers/scsi/lpfc/lpfc_scsi.c
@@ -313,7 +313,7 @@ lpfc_scsi_dev_block(struct lpfc_hba *phba)
/**
* lpfc_new_scsi_buf_s3 - Scsi buffer allocator for HBA with SLI3 IF spec
* @vport: The virtual port for which this call being executed.
- * @num_to_allocate: The requested number of buffers to allocate.
+ * @num_to_alloc: The requested number of buffers to allocate.
*
* This routine allocates a scsi buffer for device with SLI-3 interface spec,
* the scsi buffer contains all the necessary information needed to initiate
@@ -497,6 +497,7 @@ lpfc_sli4_vport_delete_fcp_xri_aborted(struct lpfc_vport *vport)
* lpfc_sli4_io_xri_aborted - Fast-path process of fcp xri abort
* @phba: pointer to lpfc hba data structure.
* @axri: pointer to the fcp xri abort wcqe structure.
+ * @idx: index into hdwq
*
* This routine is invoked by the worker thread to process a SLI4 fast-path
* FCP or NVME aborted xri.
@@ -579,6 +580,8 @@ lpfc_sli4_io_xri_aborted(struct lpfc_hba *phba,
/**
* lpfc_get_scsi_buf_s3 - Get a scsi buffer from lpfc_scsi_buf_list of the HBA
* @phba: The HBA for which this call is being executed.
+ * @ndlp: pointer to a node-list data structure.
+ * @cmnd: Pointer to scsi_cmnd data structure.
*
* This routine removes a scsi buffer from head of @phba lpfc_scsi_buf_list list
* and returns to caller.
@@ -618,6 +621,8 @@ lpfc_get_scsi_buf_s3(struct lpfc_hba *phba, struct lpfc_nodelist *ndlp,
/**
* lpfc_get_scsi_buf_s4 - Get a scsi buffer from io_buf_list of the HBA
* @phba: The HBA for which this call is being executed.
+ * @ndlp: pointer to a node-list data structure.
+ * @cmnd: Pointer to scsi_cmnd data structure.
*
* This routine removes a scsi buffer from head of @hdwq io_buf_list
* and returns to caller.
@@ -730,6 +735,8 @@ lpfc_get_scsi_buf_s4(struct lpfc_hba *phba, struct lpfc_nodelist *ndlp,
/**
* lpfc_get_scsi_buf - Get a scsi buffer from lpfc_scsi_buf_list of the HBA
* @phba: The HBA for which this call is being executed.
+ * @ndlp: pointer to a node-list data structure.
+ * @cmnd: Pointer to scsi_cmnd data structure.
*
* This routine removes a scsi buffer from head of @phba lpfc_scsi_buf_list list
* and returns to caller.
@@ -976,7 +983,7 @@ lpfc_scsi_prep_dma_buf_s3(struct lpfc_hba *phba, struct lpfc_io_buf *lpfc_cmd)
* @sc: The SCSI command to examine
* @reftag: (out) BlockGuard reference tag for transmitted data
* @apptag: (out) BlockGuard application tag for transmitted data
- * @new_guard (in) Value to replace CRC with if needed
+ * @new_guard: (in) Value to replace CRC with if needed
*
* Returns BG_ERR_* bit mask or 0 if request ignored
**/
@@ -1381,8 +1388,8 @@ lpfc_bg_err_inject(struct lpfc_hba *phba, struct scsi_cmnd *sc,
* the specified SCSI command.
* @phba: The Hba for which this call is being executed.
* @sc: The SCSI command to examine
- * @txopt: (out) BlockGuard operation for transmitted data
- * @rxopt: (out) BlockGuard operation for received data
+ * @txop: (out) BlockGuard operation for transmitted data
+ * @rxop: (out) BlockGuard operation for received data
*
* Returns: zero on success; non-zero if tx and/or rx op cannot be determined
*
@@ -1461,8 +1468,8 @@ lpfc_sc_to_bg_opcodes(struct lpfc_hba *phba, struct scsi_cmnd *sc,
* the specified SCSI command in order to force a guard tag error.
* @phba: The Hba for which this call is being executed.
* @sc: The SCSI command to examine
- * @txopt: (out) BlockGuard operation for transmitted data
- * @rxopt: (out) BlockGuard operation for received data
+ * @txop: (out) BlockGuard operation for transmitted data
+ * @rxop: (out) BlockGuard operation for received data
*
* Returns: zero on success; non-zero if tx and/or rx op cannot be determined
*
@@ -1533,7 +1540,7 @@ lpfc_bg_err_opcodes(struct lpfc_hba *phba, struct scsi_cmnd *sc,
* @phba: The Hba for which this call is being executed.
* @sc: pointer to scsi command we're working on
* @bpl: pointer to buffer list for protection groups
- * @datacnt: number of segments of data that have been dma mapped
+ * @datasegcnt: number of segments of data that have been dma mapped
*
* This function sets up BPL buffer list for protection groups of
* type LPFC_PG_TYPE_NO_DIF
@@ -1920,7 +1927,8 @@ lpfc_bg_setup_bpl_prot(struct lpfc_hba *phba, struct scsi_cmnd *sc,
* @phba: The Hba for which this call is being executed.
* @sc: pointer to scsi command we're working on
* @sgl: pointer to buffer list for protection groups
- * @datacnt: number of segments of data that have been dma mapped
+ * @datasegcnt: number of segments of data that have been dma mapped
+ * @lpfc_cmd: lpfc scsi command object pointer.
*
* This function sets up SGL buffer list for protection groups of
* type LPFC_PG_TYPE_NO_DIF
@@ -2094,6 +2102,7 @@ lpfc_bg_setup_sgl(struct lpfc_hba *phba, struct scsi_cmnd *sc,
* @sgl: pointer to buffer list for protection groups
* @datacnt: number of segments of data that have been dma mapped
* @protcnt: number of segment of protection data that have been dma mapped
+ * @lpfc_cmd: lpfc scsi command object pointer.
*
* This function sets up SGL buffer list for protection groups of
* type LPFC_PG_TYPE_DIF
@@ -4465,12 +4474,11 @@ void lpfc_poll_start_timer(struct lpfc_hba * phba)
/**
* lpfc_poll_timeout - Restart polling timer
- * @ptr: Map to lpfc_hba data structure pointer.
+ * @t: Timer construct where lpfc_hba data structure pointer is obtained.
*
* This routine restarts fcp_poll timer, when FCP ring polling is enable
* and FCP Ring interrupt is disable.
**/
-
void lpfc_poll_timeout(struct timer_list *t)
{
struct lpfc_hba *phba = from_timer(phba, t, fcp_poll_timer);
@@ -4486,8 +4494,8 @@ void lpfc_poll_timeout(struct timer_list *t)
/**
* lpfc_queuecommand - scsi_host_template queuecommand entry point
+ * @shost: kernel scsi host pointer.
* @cmnd: Pointer to scsi_cmnd data structure.
- * @done: Pointer to done routine.
*
* Driver registers this routine to scsi midlayer to submit a @cmd to process.
* This routine prepares an IOCB from scsi command and provides to firmware.
@@ -5015,7 +5023,7 @@ lpfc_check_fcp_rsp(struct lpfc_vport *vport, struct lpfc_io_buf *lpfc_cmd)
/**
* lpfc_send_taskmgmt - Generic SCSI Task Mgmt Handler
* @vport: The virtual port for which this call is being executed.
- * @rdata: Pointer to remote port local data
+ * @cmnd: Pointer to scsi_cmnd data structure.
* @tgt_id: Target ID of remote device.
* @lun_id: Lun number for the TMF
* @task_mgmt_cmd: type of TMF to send
@@ -5664,10 +5672,11 @@ lpfc_slave_destroy(struct scsi_device *sdev)
/**
* lpfc_create_device_data - creates and initializes device data structure for OAS
- * @pha: Pointer to host bus adapter structure.
+ * @phba: Pointer to host bus adapter structure.
* @vport_wwpn: Pointer to vport's wwpn information
* @target_wwpn: Pointer to target's wwpn information
* @lun: Lun on target
+ * @pri: Priority
* @atomic_create: Flag to indicate if memory should be allocated using the
* GFP_ATOMIC flag or not.
*
@@ -5717,7 +5726,7 @@ lpfc_create_device_data(struct lpfc_hba *phba, struct lpfc_name *vport_wwpn,
/**
* lpfc_delete_device_data - frees a device data structure for OAS
- * @pha: Pointer to host bus adapter structure.
+ * @phba: Pointer to host bus adapter structure.
* @lun_info: Pointer to device data structure to free.
*
* This routine frees the previously allocated device data structure passed.
@@ -5740,7 +5749,7 @@ lpfc_delete_device_data(struct lpfc_hba *phba,
/**
* __lpfc_get_device_data - returns the device data for the specified lun
- * @pha: Pointer to host bus adapter structure.
+ * @phba: Pointer to host bus adapter structure.
* @list: Point to list to search.
* @vport_wwpn: Pointer to vport's wwpn information
* @target_wwpn: Pointer to target's wwpn information
@@ -5782,7 +5791,7 @@ __lpfc_get_device_data(struct lpfc_hba *phba, struct list_head *list,
/**
* lpfc_find_next_oas_lun - searches for the next oas lun
- * @pha: Pointer to host bus adapter structure.
+ * @phba: Pointer to host bus adapter structure.
* @vport_wwpn: Pointer to vport's wwpn information
* @target_wwpn: Pointer to target's wwpn information
* @starting_lun: Pointer to the lun to start searching for
@@ -5790,6 +5799,7 @@ __lpfc_get_device_data(struct lpfc_hba *phba, struct list_head *list,
* @found_target_wwpn: Pointer to the found lun's target wwpn information
* @found_lun: Pointer to the found lun.
* @found_lun_status: Pointer to status of the found lun.
+ * @found_lun_pri: Pointer to priority of the found lun.
*
* This routine searches the luns list for the specified lun
* or the first lun for the vport/target. If the vport wwpn contains
@@ -5884,10 +5894,11 @@ lpfc_find_next_oas_lun(struct lpfc_hba *phba, struct lpfc_name *vport_wwpn,
/**
* lpfc_enable_oas_lun - enables a lun for OAS operations
- * @pha: Pointer to host bus adapter structure.
+ * @phba: Pointer to host bus adapter structure.
* @vport_wwpn: Pointer to vport's wwpn information
* @target_wwpn: Pointer to target's wwpn information
* @lun: Lun
+ * @pri: Priority
*
* This routine enables a lun for oas operations. The routines does so by
* doing the following :
@@ -5944,10 +5955,11 @@ lpfc_enable_oas_lun(struct lpfc_hba *phba, struct lpfc_name *vport_wwpn,
/**
* lpfc_disable_oas_lun - disables a lun for OAS operations
- * @pha: Pointer to host bus adapter structure.
+ * @phba: Pointer to host bus adapter structure.
* @vport_wwpn: Pointer to vport's wwpn information
* @target_wwpn: Pointer to target's wwpn information
* @lun: Lun
+ * @pri: Priority
*
* This routine disables a lun for oas operations. The routines does so by
* doing the following :
--
2.25.1
^ permalink raw reply related [flat|nested] 26+ messages in thread* [RESEND 04/19] scsi: lpfc: lpfc_attr: Demote kernel-doc format for redefined functions
2020-11-02 14:23 [RESEND 00/19] Rid W=1 warnings in SCSI Lee Jones
` (2 preceding siblings ...)
2020-11-02 14:23 ` [RESEND 03/19] scsi: lpfc: lpfc_scsi: Fix a whole host of kernel-doc issues Lee Jones
@ 2020-11-02 14:23 ` Lee Jones
2020-11-02 14:23 ` [RESEND 05/19] scsi: lpfc: lpfc_attr: Fix-up a bunch of kernel-doc misdemeanours Lee Jones
` (15 subsequent siblings)
19 siblings, 0 replies; 26+ messages in thread
From: Lee Jones @ 2020-11-02 14:23 UTC (permalink / raw)
To: martin.petersen, jejb
Cc: linux-kernel, linux-scsi, Lee Jones, James Smart, Dick Kennedy
Kernel-doc does not understand this use-case.
Fixes the following W=1 kernel build warning(s):
from drivers/scsi/lpfc/lpfc_attr.c:26:
inlined from ‘lpfc_stat_data_ctrl_store’ at drivers/scsi/lpfc/lpfc_attr.c:4164:3:
drivers/scsi/lpfc/lpfc_attr.c:2315: warning: Excess function parameter 'dev' description in 'lpfc_param_show'
drivers/scsi/lpfc/lpfc_attr.c:2315: warning: Excess function parameter 'buf' description in 'lpfc_param_show'
drivers/scsi/lpfc/lpfc_attr.c:2343: warning: Excess function parameter 'dev' description in 'lpfc_param_hex_show'
drivers/scsi/lpfc/lpfc_attr.c:2343: warning: Excess function parameter 'buf' description in 'lpfc_param_hex_show'
drivers/scsi/lpfc/lpfc_attr.c:2377: warning: Function parameter or member 'attr' not described in 'lpfc_param_init'
drivers/scsi/lpfc/lpfc_attr.c:2377: warning: Function parameter or member 'default' not described in 'lpfc_param_init'
drivers/scsi/lpfc/lpfc_attr.c:2377: warning: Function parameter or member 'minval' not described in 'lpfc_param_init'
drivers/scsi/lpfc/lpfc_attr.c:2377: warning: Function parameter or member 'maxval' not described in 'lpfc_param_init'
drivers/scsi/lpfc/lpfc_attr.c:2377: warning: Excess function parameter 'phba' description in 'lpfc_param_init'
drivers/scsi/lpfc/lpfc_attr.c:2377: warning: Excess function parameter 'val' description in 'lpfc_param_init'
drivers/scsi/lpfc/lpfc_attr.c:2414: warning: Function parameter or member 'attr' not described in 'lpfc_param_set'
drivers/scsi/lpfc/lpfc_attr.c:2414: warning: Function parameter or member 'default' not described in 'lpfc_param_set'
drivers/scsi/lpfc/lpfc_attr.c:2414: warning: Function parameter or member 'minval' not described in 'lpfc_param_set'
drivers/scsi/lpfc/lpfc_attr.c:2414: warning: Function parameter or member 'maxval' not described in 'lpfc_param_set'
drivers/scsi/lpfc/lpfc_attr.c:2414: warning: Excess function parameter 'phba' description in 'lpfc_param_set'
drivers/scsi/lpfc/lpfc_attr.c:2414: warning: Excess function parameter 'val' description in 'lpfc_param_set'
drivers/scsi/lpfc/lpfc_attr.c:2454: warning: Excess function parameter 'dev' description in 'lpfc_param_store'
drivers/scsi/lpfc/lpfc_attr.c:2454: warning: Excess function parameter 'buf' description in 'lpfc_param_store'
drivers/scsi/lpfc/lpfc_attr.c:2454: warning: Excess function parameter 'count' description in 'lpfc_param_store'
drivers/scsi/lpfc/lpfc_attr.c:2478: warning: Excess function parameter 'dev' description in 'lpfc_vport_param_show'
drivers/scsi/lpfc/lpfc_attr.c:2478: warning: Excess function parameter 'buf' description in 'lpfc_vport_param_show'
drivers/scsi/lpfc/lpfc_attr.c:2503: warning: Excess function parameter 'dev' description in 'lpfc_vport_param_hex_show'
drivers/scsi/lpfc/lpfc_attr.c:2503: warning: Excess function parameter 'buf' description in 'lpfc_vport_param_hex_show'
drivers/scsi/lpfc/lpfc_attr.c:2536: warning: Function parameter or member 'attr' not described in 'lpfc_vport_param_init'
drivers/scsi/lpfc/lpfc_attr.c:2536: warning: Function parameter or member 'default' not described in 'lpfc_vport_param_init'
drivers/scsi/lpfc/lpfc_attr.c:2536: warning: Function parameter or member 'minval' not described in 'lpfc_vport_param_init'
drivers/scsi/lpfc/lpfc_attr.c:2536: warning: Function parameter or member 'maxval' not described in 'lpfc_vport_param_init'
drivers/scsi/lpfc/lpfc_attr.c:2536: warning: Excess function parameter 'phba' description in 'lpfc_vport_param_init'
drivers/scsi/lpfc/lpfc_attr.c:2536: warning: Excess function parameter 'val' description in 'lpfc_vport_param_init'
drivers/scsi/lpfc/lpfc_attr.c:2572: warning: Function parameter or member 'attr' not described in 'lpfc_vport_param_set'
drivers/scsi/lpfc/lpfc_attr.c:2572: warning: Function parameter or member 'default' not described in 'lpfc_vport_param_set'
drivers/scsi/lpfc/lpfc_attr.c:2572: warning: Function parameter or member 'minval' not described in 'lpfc_vport_param_set'
drivers/scsi/lpfc/lpfc_attr.c:2572: warning: Function parameter or member 'maxval' not described in 'lpfc_vport_param_set'
drivers/scsi/lpfc/lpfc_attr.c:2572: warning: Excess function parameter 'phba' description in 'lpfc_vport_param_set'
drivers/scsi/lpfc/lpfc_attr.c:2572: warning: Excess function parameter 'val' description in 'lpfc_vport_param_set'
drivers/scsi/lpfc/lpfc_attr.c:2607: warning: Function parameter or member 'attr' not described in 'lpfc_vport_param_store'
drivers/scsi/lpfc/lpfc_attr.c:2607: warning: Excess function parameter 'cdev' description in 'lpfc_vport_param_store'
drivers/scsi/lpfc/lpfc_attr.c:2607: warning: Excess function parameter 'buf' description in 'lpfc_vport_param_store'
drivers/scsi/lpfc/lpfc_attr.c:2607: warning: Excess function parameter 'count' description in 'lpfc_vport_param_store'
drivers/scsi/lpfc/lpfc_attr.c:7081: warning: Function parameter or member 'field' not described in 'lpfc_rport_show_function'
drivers/scsi/lpfc/lpfc_attr.c:7081: warning: Function parameter or member 'format_string' not described in 'lpfc_rport_show_function'
drivers/scsi/lpfc/lpfc_attr.c:7081: warning: Function parameter or member 'sz' not described in 'lpfc_rport_show_function'
drivers/scsi/lpfc/lpfc_attr.c:7081: warning: Function parameter or member 'cast' not described in 'lpfc_rport_show_function'
drivers/scsi/lpfc/lpfc_attr.c:7081: warning: Excess function parameter 'cdev' description in 'lpfc_rport_show_function'
drivers/scsi/lpfc/lpfc_attr.c:7081: warning: Excess function parameter 'buf' description in 'lpfc_rport_show_function'
Cc: James Smart <james.smart@broadcom.com>
Cc: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
drivers/scsi/lpfc/lpfc_attr.c | 23 ++++++++++++-----------
1 file changed, 12 insertions(+), 11 deletions(-)
diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c
index 0673d944c2a81..6a33f0607cc8b 100644
--- a/drivers/scsi/lpfc/lpfc_attr.c
+++ b/drivers/scsi/lpfc/lpfc_attr.c
@@ -1501,6 +1501,7 @@ lpfc_sli4_pdev_status_reg_wait(struct lpfc_hba *phba)
/**
* lpfc_sli4_pdev_reg_request - Request physical dev to perform a register acc
* @phba: lpfc_hba pointer.
+ * @opcode: The sli4 config command opcode.
*
* Description:
* Request SLI4 interface type-2 device to perform a physical register set
@@ -2284,7 +2285,7 @@ lpfc_enable_bbcr_set(struct lpfc_hba *phba, uint val)
return -EINVAL;
}
-/**
+/*
* lpfc_param_show - Return a cfg attribute value in decimal
*
* Description:
@@ -2310,7 +2311,7 @@ lpfc_##attr##_show(struct device *dev, struct device_attribute *attr, \
phba->cfg_##attr);\
}
-/**
+/*
* lpfc_param_hex_show - Return a cfg attribute value in hex
*
* Description:
@@ -2338,7 +2339,7 @@ lpfc_##attr##_show(struct device *dev, struct device_attribute *attr, \
phba->cfg_##attr);\
}
-/**
+/*
* lpfc_param_init - Initializes a cfg attribute
*
* Description:
@@ -2372,7 +2373,7 @@ lpfc_##attr##_init(struct lpfc_hba *phba, uint val) \
return -EINVAL;\
}
-/**
+/*
* lpfc_param_set - Set a cfg attribute value
*
* Description:
@@ -2409,7 +2410,7 @@ lpfc_##attr##_set(struct lpfc_hba *phba, uint val) \
return -EINVAL;\
}
-/**
+/*
* lpfc_param_store - Set a vport attribute value
*
* Description:
@@ -2449,7 +2450,7 @@ lpfc_##attr##_store(struct device *dev, struct device_attribute *attr, \
return -EINVAL;\
}
-/**
+/*
* lpfc_vport_param_show - Return decimal formatted cfg attribute value
*
* Description:
@@ -2473,7 +2474,7 @@ lpfc_##attr##_show(struct device *dev, struct device_attribute *attr, \
return scnprintf(buf, PAGE_SIZE, "%d\n", vport->cfg_##attr);\
}
-/**
+/*
* lpfc_vport_param_hex_show - Return hex formatted attribute value
*
* Description:
@@ -2498,7 +2499,7 @@ lpfc_##attr##_show(struct device *dev, struct device_attribute *attr, \
return scnprintf(buf, PAGE_SIZE, "%#x\n", vport->cfg_##attr);\
}
-/**
+/*
* lpfc_vport_param_init - Initialize a vport cfg attribute
*
* Description:
@@ -2531,7 +2532,7 @@ lpfc_##attr##_init(struct lpfc_vport *vport, uint val) \
return -EINVAL;\
}
-/**
+/*
* lpfc_vport_param_set - Set a vport cfg attribute
*
* Description:
@@ -2567,7 +2568,7 @@ lpfc_##attr##_set(struct lpfc_vport *vport, uint val) \
return -EINVAL;\
}
-/**
+/*
* lpfc_vport_param_store - Set a vport attribute
*
* Description:
@@ -7061,7 +7062,7 @@ lpfc_set_rport_loss_tmo(struct fc_rport *rport, uint32_t timeout)
#endif
}
-/**
+/*
* lpfc_rport_show_function - Return rport target information
*
* Description:
--
2.25.1
^ permalink raw reply related [flat|nested] 26+ messages in thread* [RESEND 05/19] scsi: lpfc: lpfc_attr: Fix-up a bunch of kernel-doc misdemeanours
2020-11-02 14:23 [RESEND 00/19] Rid W=1 warnings in SCSI Lee Jones
` (3 preceding siblings ...)
2020-11-02 14:23 ` [RESEND 04/19] scsi: lpfc: lpfc_attr: Demote kernel-doc format for redefined functions Lee Jones
@ 2020-11-02 14:23 ` Lee Jones
2020-11-02 14:23 ` [RESEND 06/19] scsi: lpfc: lpfc_debugfs: Fix a couple of function documentation issues Lee Jones
` (14 subsequent siblings)
19 siblings, 0 replies; 26+ messages in thread
From: Lee Jones @ 2020-11-02 14:23 UTC (permalink / raw)
To: martin.petersen, jejb
Cc: linux-kernel, linux-scsi, Lee Jones, James Smart, Dick Kennedy
Fixes the following W=1 kernel build warning(s):
from drivers/scsi/lpfc/lpfc_attr.c:26:
inlined from ‘lpfc_stat_data_ctrl_store’ at drivers/scsi/lpfc/lpfc_attr.c:4165:3:
drivers/scsi/lpfc/lpfc_attr.c:2537: warning: Function parameter or member 'attr' not described in 'lpfc_vport_param_init'
drivers/scsi/lpfc/lpfc_attr.c:2537: warning: Function parameter or member 'default' not described in 'lpfc_vport_param_init'
drivers/scsi/lpfc/lpfc_attr.c:2537: warning: Function parameter or member 'minval' not described in 'lpfc_vport_param_init'
drivers/scsi/lpfc/lpfc_attr.c:2537: warning: Function parameter or member 'maxval' not described in 'lpfc_vport_param_init'
drivers/scsi/lpfc/lpfc_attr.c:2537: warning: Excess function parameter 'phba' description in 'lpfc_vport_param_init'
drivers/scsi/lpfc/lpfc_attr.c:2537: warning: Excess function parameter 'val' description in 'lpfc_vport_param_init'
drivers/scsi/lpfc/lpfc_attr.c:2792: warning: Function parameter or member 'dev' not described in 'lpfc_soft_wwpn_store'
drivers/scsi/lpfc/lpfc_attr.c:2886: warning: Function parameter or member 'dev' not described in 'lpfc_soft_wwnn_store'
drivers/scsi/lpfc/lpfc_attr.c:2886: warning: Function parameter or member 'attr' not described in 'lpfc_soft_wwnn_store'
drivers/scsi/lpfc/lpfc_attr.c:2886: warning: Excess function parameter 'cdev' description in 'lpfc_soft_wwnn_store'
drivers/scsi/lpfc/lpfc_attr.c:3224: warning: Function parameter or member 'vpt_wwpn' not described in 'lpfc_oas_lun_state_set'
drivers/scsi/lpfc/lpfc_attr.c:3224: warning: Function parameter or member 'tgt_wwpn' not described in 'lpfc_oas_lun_state_set'
drivers/scsi/lpfc/lpfc_attr.c:3224: warning: Function parameter or member 'pri' not described in 'lpfc_oas_lun_state_set'
drivers/scsi/lpfc/lpfc_attr.c:3224: warning: Excess function parameter 'ndlp' description in 'lpfc_oas_lun_state_set'
drivers/scsi/lpfc/lpfc_attr.c:3264: warning: Function parameter or member 'lun_pri' not described in 'lpfc_oas_lun_get_next'
drivers/scsi/lpfc/lpfc_attr.c:3302: warning: Function parameter or member 'pri' not described in 'lpfc_oas_lun_state_change'
drivers/scsi/lpfc/lpfc_attr.c:3376: warning: Function parameter or member 'count' not described in 'lpfc_oas_lun_store'
drivers/scsi/lpfc/lpfc_attr.c:3835: warning: Function parameter or member 'vport' not described in 'lpfc_tgt_queue_depth_set'
drivers/scsi/lpfc/lpfc_attr.c:3835: warning: Excess function parameter 'phba' description in 'lpfc_tgt_queue_depth_set'
drivers/scsi/lpfc/lpfc_attr.c:4026: warning: Function parameter or member 'dev' not described in 'lpfc_topology_store'
drivers/scsi/lpfc/lpfc_attr.c:4026: warning: Function parameter or member 'attr' not described in 'lpfc_topology_store'
drivers/scsi/lpfc/lpfc_attr.c:4026: warning: Function parameter or member 'buf' not described in 'lpfc_topology_store'
drivers/scsi/lpfc/lpfc_attr.c:4026: warning: Function parameter or member 'count' not described in 'lpfc_topology_store'
drivers/scsi/lpfc/lpfc_attr.c:4026: warning: Excess function parameter 'phba' description in 'lpfc_topology_store'
drivers/scsi/lpfc/lpfc_attr.c:4026: warning: Excess function parameter 'val' description in 'lpfc_topology_store'
drivers/scsi/lpfc/lpfc_attr.c:4148: warning: Function parameter or member 'attr' not described in 'lpfc_stat_data_ctrl_store'
drivers/scsi/lpfc/lpfc_attr.c:4302: warning: Function parameter or member 'attr' not described in 'lpfc_stat_data_ctrl_show'
drivers/scsi/lpfc/lpfc_attr.c:4383: warning: Function parameter or member 'buf' not described in 'sysfs_drvr_stat_data_read'
drivers/scsi/lpfc/lpfc_attr.c:4383: warning: Excess function parameter 'buff' description in 'sysfs_drvr_stat_data_read'
drivers/scsi/lpfc/lpfc_attr.c:4476: warning: Function parameter or member 'dev' not described in 'lpfc_link_speed_store'
drivers/scsi/lpfc/lpfc_attr.c:4476: warning: Function parameter or member 'attr' not described in 'lpfc_link_speed_store'
drivers/scsi/lpfc/lpfc_attr.c:4476: warning: Function parameter or member 'buf' not described in 'lpfc_link_speed_store'
drivers/scsi/lpfc/lpfc_attr.c:4476: warning: Function parameter or member 'count' not described in 'lpfc_link_speed_store'
drivers/scsi/lpfc/lpfc_attr.c:4476: warning: Excess function parameter 'phba' description in 'lpfc_link_speed_store'
drivers/scsi/lpfc/lpfc_attr.c:4476: warning: Excess function parameter 'val' description in 'lpfc_link_speed_store'
drivers/scsi/lpfc/lpfc_attr.c:7117: warning: Function parameter or member 'verbose' not described in 'lpfc_hba_log_verbose_init'
Cc: James Smart <james.smart@broadcom.com>
Cc: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
drivers/scsi/lpfc/lpfc_attr.c | 33 +++++++++++++++++++++++----------
1 file changed, 23 insertions(+), 10 deletions(-)
diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c
index 6a33f0607cc8b..ada231d4f0c6a 100644
--- a/drivers/scsi/lpfc/lpfc_attr.c
+++ b/drivers/scsi/lpfc/lpfc_attr.c
@@ -2771,7 +2771,7 @@ lpfc_soft_wwpn_show(struct device *dev, struct device_attribute *attr,
/**
* lpfc_soft_wwpn_store - Set the ww port name of the adapter
- * @dev class device that is converted into a Scsi_host.
+ * @dev: class device that is converted into a Scsi_host.
* @attr: device attribute, not used.
* @buf: contains the wwpn in hexadecimal.
* @count: number of wwpn bytes in buf
@@ -2868,7 +2868,8 @@ lpfc_soft_wwnn_show(struct device *dev, struct device_attribute *attr,
/**
* lpfc_soft_wwnn_store - sets the ww node name of the adapter
- * @cdev: class device that is converted into a Scsi_host.
+ * @dev: class device that is converted into a Scsi_host.
+ * @attr: device attribute, not used.
* @buf: contains the ww node name in hexadecimal.
* @count: number of wwnn bytes in buf.
*
@@ -3204,9 +3205,11 @@ static DEVICE_ATTR(lpfc_xlane_lun_status, S_IRUGO,
* lpfc_oas_lun_state_set - enable or disable a lun for Optimized Access Storage
* (OAS) operations.
* @phba: lpfc_hba pointer.
- * @ndlp: pointer to fcp target node.
+ * @vpt_wwpn: wwpn of the vport associated with the returned lun
+ * @tgt_wwpn: wwpn of the target associated with the returned lun
* @lun: the fc lun for setting oas state.
* @oas_state: the oas state to be set to the lun.
+ * @pri: priority
*
* Returns:
* SUCCESS : 0
@@ -3244,6 +3247,7 @@ lpfc_oas_lun_state_set(struct lpfc_hba *phba, uint8_t vpt_wwpn[],
* @vpt_wwpn: wwpn of the vport associated with the returned lun
* @tgt_wwpn: wwpn of the target associated with the returned lun
* @lun_status: status of the lun returned lun
+ * @lun_pri: priority of the lun returned lun
*
* Returns the first or next lun enabled for OAS operations for the vport/target
* specified. If a lun is found, its vport wwpn, target wwpn and status is
@@ -3282,6 +3286,7 @@ lpfc_oas_lun_get_next(struct lpfc_hba *phba, uint8_t vpt_wwpn[],
* @tgt_wwpn: target wwpn by reference.
* @lun: the fc lun for setting oas state.
* @oas_state: the oas state to be set to the oas_lun.
+ * @pri: priority
*
* This routine enables (OAS_LUN_ENABLE) or disables (OAS_LUN_DISABLE)
* a lun for OAS operations.
@@ -3356,6 +3361,7 @@ lpfc_oas_lun_show(struct device *dev, struct device_attribute *attr,
* @dev: class device that is converted into a Scsi_host.
* @attr: device attribute, not used.
* @buf: buffer for passing information.
+ * @count: size of the formatting string
*
* This function sets the OAS state for lun. Before this function is called,
* the vport wwpn, target wwpn, and oas state need to be set.
@@ -3817,7 +3823,7 @@ lpfc_vport_param_init(tgt_queue_depth, LPFC_MAX_TGT_QDEPTH,
/**
* lpfc_tgt_queue_depth_store: Sets an attribute value.
- * @phba: pointer the the adapter structure.
+ * @vport: lpfc vport structure pointer.
* @val: integer attribute value.
*
* Description: Sets the parameter to the new value.
@@ -4002,8 +4008,10 @@ LPFC_ATTR(topology, 0, 0, 6,
/**
* lpfc_topology_set - Set the adapters topology field
- * @phba: lpfc_hba pointer.
- * @val: topology value.
+ * @dev: class device that is converted into a scsi_host.
+ * @attr:device attribute, not used.
+ * @buf: buffer for passing information.
+ * @count: size of the data buffer.
*
* Description:
* If val is in a valid range then set the adapter's topology field and
@@ -4122,6 +4130,7 @@ static DEVICE_ATTR_RO(lpfc_static_vport);
/**
* lpfc_stat_data_ctrl_store - write call back for lpfc_stat_data_ctrl sysfs file
* @dev: Pointer to class device.
+ * @attr: Unused.
* @buf: Data buffer.
* @count: Size of the data buffer.
*
@@ -4285,7 +4294,8 @@ lpfc_stat_data_ctrl_store(struct device *dev, struct device_attribute *attr,
/**
* lpfc_stat_data_ctrl_show - Read function for lpfc_stat_data_ctrl sysfs file
- * @dev: Pointer to class device object.
+ * @dev: Pointer to class device.
+ * @attr: Unused.
* @buf: Data buffer.
*
* This function is the read call back function for
@@ -4364,7 +4374,7 @@ static DEVICE_ATTR_RW(lpfc_stat_data_ctrl);
* @filp: sysfs file
* @kobj: Pointer to the kernel object
* @bin_attr: Attribute object
- * @buff: Buffer pointer
+ * @buf: Buffer pointer
* @off: File offset
* @count: Buffer size
*
@@ -4451,8 +4461,10 @@ static struct bin_attribute sysfs_drvr_stat_data_attr = {
*/
/**
* lpfc_link_speed_set - Set the adapters link speed
- * @phba: lpfc_hba pointer.
- * @val: link speed value.
+ * @dev: Pointer to class device.
+ * @attr: Unused.
+ * @buf: Data buffer.
+ * @count: Size of the data buffer.
*
* Description:
* If val is in a valid range then set the adapter's link speed field and
@@ -7111,6 +7123,7 @@ lpfc_set_vport_symbolic_name(struct fc_vport *fc_vport)
/**
* lpfc_hba_log_verbose_init - Set hba's log verbose level
* @phba: Pointer to lpfc_hba struct.
+ * @verbose: Verbose level to set.
*
* This function is called by the lpfc_get_cfgparam() routine to set the
* module lpfc_log_verbose into the @phba cfg_log_verbose for use with
--
2.25.1
^ permalink raw reply related [flat|nested] 26+ messages in thread* [RESEND 06/19] scsi: lpfc: lpfc_debugfs: Fix a couple of function documentation issues
2020-11-02 14:23 [RESEND 00/19] Rid W=1 warnings in SCSI Lee Jones
` (4 preceding siblings ...)
2020-11-02 14:23 ` [RESEND 05/19] scsi: lpfc: lpfc_attr: Fix-up a bunch of kernel-doc misdemeanours Lee Jones
@ 2020-11-02 14:23 ` Lee Jones
2020-11-02 14:23 ` [RESEND 07/19] scsi: lpfc: lpfc_bsg: Provide correct documentation for a bunch of functions Lee Jones
` (13 subsequent siblings)
19 siblings, 0 replies; 26+ messages in thread
From: Lee Jones @ 2020-11-02 14:23 UTC (permalink / raw)
To: martin.petersen, jejb
Cc: linux-kernel, linux-scsi, Lee Jones, James Smart, Dick Kennedy
Fixes the following W=1 kernel build warning(s):
drivers/scsi/lpfc/lpfc_debugfs.c:4204: warning: Function parameter or member 'len' not described in 'lpfc_idiag_queacc_read_qe'
drivers/scsi/lpfc/lpfc_debugfs.c:4781: warning: Function parameter or member 'ctlregid' not described in 'lpfc_idiag_ctlacc_read_reg'
drivers/scsi/lpfc/lpfc_debugfs.c:4781: warning: Excess function parameter 'drbregid' description in 'lpfc_idiag_ctlacc_read_reg'
Cc: James Smart <james.smart@broadcom.com>
Cc: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
drivers/scsi/lpfc/lpfc_debugfs.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/scsi/lpfc/lpfc_debugfs.c b/drivers/scsi/lpfc/lpfc_debugfs.c
index 325081ac65539..5a354abcbafc4 100644
--- a/drivers/scsi/lpfc/lpfc_debugfs.c
+++ b/drivers/scsi/lpfc/lpfc_debugfs.c
@@ -4186,6 +4186,7 @@ lpfc_idiag_que_param_check(struct lpfc_queue *q, int index, int count)
/**
* lpfc_idiag_queacc_read_qe - read a single entry from the given queue index
* @pbuffer: The pointer to buffer to copy the read data into.
+ * @len: Length of the buffer.
* @pque: The pointer to the queue to be read.
* @index: The index into the queue entry.
*
@@ -4762,7 +4763,7 @@ lpfc_idiag_drbacc_write(struct file *file, const char __user *buf,
* @phba: The pointer to hba structure.
* @pbuffer: The pointer to the buffer to copy the data to.
* @len: The length of bytes to copied.
- * @drbregid: The id to doorbell registers.
+ * @ctlregid: The id to doorbell registers.
*
* Description:
* This routine reads a control register and copies its content to the
--
2.25.1
^ permalink raw reply related [flat|nested] 26+ messages in thread* [RESEND 07/19] scsi: lpfc: lpfc_bsg: Provide correct documentation for a bunch of functions
2020-11-02 14:23 [RESEND 00/19] Rid W=1 warnings in SCSI Lee Jones
` (5 preceding siblings ...)
2020-11-02 14:23 ` [RESEND 06/19] scsi: lpfc: lpfc_debugfs: Fix a couple of function documentation issues Lee Jones
@ 2020-11-02 14:23 ` Lee Jones
2020-11-02 14:23 ` [RESEND 08/19] scsi: esas2r: esas2r_disc: Place brackets around a potentially empty if() Lee Jones
` (12 subsequent siblings)
19 siblings, 0 replies; 26+ messages in thread
From: Lee Jones @ 2020-11-02 14:23 UTC (permalink / raw)
To: martin.petersen, jejb
Cc: linux-kernel, linux-scsi, Lee Jones, James Smart, Dick Kennedy
Fixes the following W=1 kernel build warning(s):
drivers/scsi/lpfc/lpfc_bsg.c:917: warning: Function parameter or member 'phba' not described in 'lpfc_bsg_ct_unsol_event'
drivers/scsi/lpfc/lpfc_bsg.c:917: warning: Function parameter or member 'pring' not described in 'lpfc_bsg_ct_unsol_event'
drivers/scsi/lpfc/lpfc_bsg.c:1484: warning: Function parameter or member 'cmp' not described in 'lpfc_issue_ct_rsp'
drivers/scsi/lpfc/lpfc_bsg.c:3900: warning: Function parameter or member 'job' not described in 'lpfc_bsg_sli_cfg_read_cmd_ext'
drivers/scsi/lpfc/lpfc_bsg.c:3900: warning: Function parameter or member 'dmabuf' not described in 'lpfc_bsg_sli_cfg_read_cmd_ext'
drivers/scsi/lpfc/lpfc_bsg.c:3900: warning: Excess function parameter 'mb' description in 'lpfc_bsg_sli_cfg_read_cmd_ext'
drivers/scsi/lpfc/lpfc_bsg.c:3900: warning: Excess function parameter 'dmabuff' description in 'lpfc_bsg_sli_cfg_read_cmd_ext'
drivers/scsi/lpfc/lpfc_bsg.c:4088: warning: Function parameter or member 'job' not described in 'lpfc_bsg_sli_cfg_write_cmd_ext'
drivers/scsi/lpfc/lpfc_bsg.c:4088: warning: Function parameter or member 'nemb_tp' not described in 'lpfc_bsg_sli_cfg_write_cmd_ext'
drivers/scsi/lpfc/lpfc_bsg.c:4088: warning: Function parameter or member 'dmabuf' not described in 'lpfc_bsg_sli_cfg_write_cmd_ext'
drivers/scsi/lpfc/lpfc_bsg.c:4088: warning: Excess function parameter 'mb' description in 'lpfc_bsg_sli_cfg_write_cmd_ext'
drivers/scsi/lpfc/lpfc_bsg.c:4088: warning: Excess function parameter 'dmabuff' description in 'lpfc_bsg_sli_cfg_write_cmd_ext'
drivers/scsi/lpfc/lpfc_bsg.c:4254: warning: Function parameter or member 'job' not described in 'lpfc_bsg_handle_sli_cfg_mbox'
drivers/scsi/lpfc/lpfc_bsg.c:4254: warning: Function parameter or member 'dmabuf' not described in 'lpfc_bsg_handle_sli_cfg_mbox'
drivers/scsi/lpfc/lpfc_bsg.c:4254: warning: Excess function parameter 'mb' description in 'lpfc_bsg_handle_sli_cfg_mbox'
drivers/scsi/lpfc/lpfc_bsg.c:4254: warning: Excess function parameter 'dmabuff' description in 'lpfc_bsg_handle_sli_cfg_mbox'
drivers/scsi/lpfc/lpfc_bsg.c:4403: warning: Function parameter or member 'job' not described in 'lpfc_bsg_read_ebuf_get'
drivers/scsi/lpfc/lpfc_bsg.c:4403: warning: Excess function parameter 'dmabuf' description in 'lpfc_bsg_read_ebuf_get'
drivers/scsi/lpfc/lpfc_bsg.c:4474: warning: Function parameter or member 'job' not described in 'lpfc_bsg_write_ebuf_set'
drivers/scsi/lpfc/lpfc_bsg.c:4600: warning: Function parameter or member 'job' not described in 'lpfc_bsg_handle_sli_cfg_ebuf'
drivers/scsi/lpfc/lpfc_bsg.c:4600: warning: Function parameter or member 'dmabuf' not described in 'lpfc_bsg_handle_sli_cfg_ebuf'
drivers/scsi/lpfc/lpfc_bsg.c:4600: warning: Excess function parameter 'mb' description in 'lpfc_bsg_handle_sli_cfg_ebuf'
drivers/scsi/lpfc/lpfc_bsg.c:4600: warning: Excess function parameter 'dmabuff' description in 'lpfc_bsg_handle_sli_cfg_ebuf'
drivers/scsi/lpfc/lpfc_bsg.c:4645: warning: Function parameter or member 'job' not described in 'lpfc_bsg_handle_sli_cfg_ext'
drivers/scsi/lpfc/lpfc_bsg.c:4645: warning: Function parameter or member 'dmabuf' not described in 'lpfc_bsg_handle_sli_cfg_ext'
drivers/scsi/lpfc/lpfc_bsg.c:4645: warning: Excess function parameter 'mb' description in 'lpfc_bsg_handle_sli_cfg_ext'
drivers/scsi/lpfc/lpfc_bsg.c:4645: warning: Excess function parameter 'dmabuff' description in 'lpfc_bsg_handle_sli_cfg_ext'
drivers/scsi/lpfc/lpfc_bsg.c:4723: warning: Function parameter or member 'job' not described in 'lpfc_bsg_issue_mbox'
drivers/scsi/lpfc/lpfc_bsg.c:4723: warning: Excess function parameter 'mb' description in 'lpfc_bsg_issue_mbox'
Cc: James Smart <james.smart@broadcom.com>
Cc: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
drivers/scsi/lpfc/lpfc_bsg.c | 34 +++++++++++++++++-----------------
1 file changed, 17 insertions(+), 17 deletions(-)
diff --git a/drivers/scsi/lpfc/lpfc_bsg.c b/drivers/scsi/lpfc/lpfc_bsg.c
index 5b66b8ea83635..abe7c53f8caa4 100644
--- a/drivers/scsi/lpfc/lpfc_bsg.c
+++ b/drivers/scsi/lpfc/lpfc_bsg.c
@@ -902,11 +902,8 @@ diag_cmd_data_free(struct lpfc_hba *phba, struct lpfc_dmabufext *mlist)
return 0;
}
-/**
+/*
* lpfc_bsg_ct_unsol_event - process an unsolicited CT command
- * @phba:
- * @pring:
- * @piocbq:
*
* This function is called when an unsolicited CT command is received. It
* forwards the event to any processes registered to receive CT events.
@@ -1455,7 +1452,8 @@ lpfc_issue_ct_rsp_cmp(struct lpfc_hba *phba,
* @phba: Pointer to HBA context object.
* @job: Pointer to the job object.
* @tag: tag index value into the ports context exchange array.
- * @bmp: Pointer to a dma buffer descriptor.
+ * @cmp: Pointer to a cmp dma buffer descriptor.
+ * @bmp: Pointer to a bmp dma buffer descriptor.
* @num_entry: Number of enties in the bde.
**/
static int
@@ -3867,9 +3865,9 @@ lpfc_bsg_sli_cfg_dma_desc_setup(struct lpfc_hba *phba, enum nemb_type nemb_tp,
/**
* lpfc_bsg_sli_cfg_mse_read_cmd_ext - sli_config non-embedded mailbox cmd read
* @phba: Pointer to HBA context object.
- * @mb: Pointer to a BSG mailbox object.
+ * @job: Pointer to the job object.
* @nemb_tp: Enumerate of non-embedded mailbox command type.
- * @dmabuff: Pointer to a DMA buffer descriptor.
+ * @dmabuf: Pointer to a DMA buffer descriptor.
*
* This routine performs SLI_CONFIG (0x9B) read mailbox command operation with
* non-embedded external bufffers.
@@ -4056,8 +4054,9 @@ lpfc_bsg_sli_cfg_read_cmd_ext(struct lpfc_hba *phba, struct bsg_job *job,
/**
* lpfc_bsg_sli_cfg_write_cmd_ext - sli_config non-embedded mailbox cmd write
* @phba: Pointer to HBA context object.
- * @mb: Pointer to a BSG mailbox object.
- * @dmabuff: Pointer to a DMA buffer descriptor.
+ * @job: Pointer to the job object.
+ * @nemb_tp: Enumerate of non-embedded mailbox command type.
+ * @dmabuf: Pointer to a DMA buffer descriptor.
*
* This routine performs SLI_CONFIG (0x9B) write mailbox command operation with
* non-embedded external bufffers.
@@ -4222,8 +4221,8 @@ lpfc_bsg_sli_cfg_write_cmd_ext(struct lpfc_hba *phba, struct bsg_job *job,
/**
* lpfc_bsg_handle_sli_cfg_mbox - handle sli-cfg mailbox cmd with ext buffer
* @phba: Pointer to HBA context object.
- * @mb: Pointer to a BSG mailbox object.
- * @dmabuff: Pointer to a DMA buffer descriptor.
+ * @job: Pointer to the job object.
+ * @dmabuf: Pointer to a DMA buffer descriptor.
*
* This routine handles SLI_CONFIG (0x9B) mailbox command with non-embedded
* external bufffers, including both 0x9B with non-embedded MSEs and 0x9B
@@ -4374,7 +4373,7 @@ lpfc_bsg_mbox_ext_abort(struct lpfc_hba *phba)
/**
* lpfc_bsg_read_ebuf_get - get the next mailbox read external buffer
* @phba: Pointer to HBA context object.
- * @dmabuf: Pointer to a DMA buffer descriptor.
+ * @job: Pointer to the job object.
*
* This routine extracts the next mailbox read external buffer back to
* user space through BSG.
@@ -4444,6 +4443,7 @@ lpfc_bsg_read_ebuf_get(struct lpfc_hba *phba, struct bsg_job *job)
/**
* lpfc_bsg_write_ebuf_set - set the next mailbox write external buffer
* @phba: Pointer to HBA context object.
+ * @job: Pointer to the job object.
* @dmabuf: Pointer to a DMA buffer descriptor.
*
* This routine sets up the next mailbox read external buffer obtained
@@ -4569,8 +4569,8 @@ lpfc_bsg_write_ebuf_set(struct lpfc_hba *phba, struct bsg_job *job,
/**
* lpfc_bsg_handle_sli_cfg_ebuf - handle ext buffer with sli-cfg mailbox cmd
* @phba: Pointer to HBA context object.
- * @mb: Pointer to a BSG mailbox object.
- * @dmabuff: Pointer to a DMA buffer descriptor.
+ * @job: Pointer to the job object.
+ * @dmabuf: Pointer to a DMA buffer descriptor.
*
* This routine handles the external buffer with SLI_CONFIG (0x9B) mailbox
* command with multiple non-embedded external buffers.
@@ -4614,8 +4614,8 @@ lpfc_bsg_handle_sli_cfg_ebuf(struct lpfc_hba *phba, struct bsg_job *job,
/**
* lpfc_bsg_handle_sli_cfg_ext - handle sli-cfg mailbox with external buffer
* @phba: Pointer to HBA context object.
- * @mb: Pointer to a BSG mailbox object.
- * @dmabuff: Pointer to a DMA buffer descriptor.
+ * @job: Pointer to the job object.
+ * @dmabuf: Pointer to a DMA buffer descriptor.
*
* This routine checkes and handles non-embedded multi-buffer SLI_CONFIG
* (0x9B) mailbox commands and external buffers.
@@ -4688,7 +4688,7 @@ lpfc_bsg_handle_sli_cfg_ext(struct lpfc_hba *phba, struct bsg_job *job,
/**
* lpfc_bsg_issue_mbox - issues a mailbox command on behalf of an app
* @phba: Pointer to HBA context object.
- * @mb: Pointer to a mailbox object.
+ * @job: Pointer to the job object.
* @vport: Pointer to a vport object.
*
* Allocate a tracking object, mailbox command memory, get a mailbox
--
2.25.1
^ permalink raw reply related [flat|nested] 26+ messages in thread* [RESEND 08/19] scsi: esas2r: esas2r_disc: Place brackets around a potentially empty if()
2020-11-02 14:23 [RESEND 00/19] Rid W=1 warnings in SCSI Lee Jones
` (6 preceding siblings ...)
2020-11-02 14:23 ` [RESEND 07/19] scsi: lpfc: lpfc_bsg: Provide correct documentation for a bunch of functions Lee Jones
@ 2020-11-02 14:23 ` Lee Jones
2020-11-02 14:23 ` [RESEND 09/19] scsi: esas2r: esas2r_init: " Lee Jones
` (11 subsequent siblings)
19 siblings, 0 replies; 26+ messages in thread
From: Lee Jones @ 2020-11-02 14:23 UTC (permalink / raw)
To: martin.petersen, jejb; +Cc: linux-kernel, linux-scsi, Lee Jones, Bradley Grove
Fixes the following W=1 kernel build warning(s):
drivers/scsi/esas2r/esas2r_disc.c: In function ‘esas2r_disc_get_phys_addr’:
drivers/scsi/esas2r/esas2r_disc.c:1035:17: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]
Cc: Bradley Grove <linuxdrivers@attotech.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
drivers/scsi/esas2r/esas2r_disc.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/scsi/esas2r/esas2r_disc.c b/drivers/scsi/esas2r/esas2r_disc.c
index 1c079f4300a56..ba42536d1e87a 100644
--- a/drivers/scsi/esas2r/esas2r_disc.c
+++ b/drivers/scsi/esas2r/esas2r_disc.c
@@ -1031,8 +1031,9 @@ static u32 esas2r_disc_get_phys_addr(struct esas2r_sg_context *sgc, u64 *addr)
{
struct esas2r_adapter *a = sgc->adapter;
- if (sgc->length > ESAS2R_DISC_BUF_LEN)
+ if (sgc->length > ESAS2R_DISC_BUF_LEN) {
esas2r_bugon();
+ }
*addr = a->uncached_phys
+ (u64)((u8 *)a->disc_buffer - a->uncached);
--
2.25.1
^ permalink raw reply related [flat|nested] 26+ messages in thread* [RESEND 09/19] scsi: esas2r: esas2r_init: Place brackets around a potentially empty if()
2020-11-02 14:23 [RESEND 00/19] Rid W=1 warnings in SCSI Lee Jones
` (7 preceding siblings ...)
2020-11-02 14:23 ` [RESEND 08/19] scsi: esas2r: esas2r_disc: Place brackets around a potentially empty if() Lee Jones
@ 2020-11-02 14:23 ` Lee Jones
2020-11-02 14:23 ` [RESEND 10/19] scsi: lpfc: lpfc_nvme: Remove unused variable 'phba' Lee Jones
` (10 subsequent siblings)
19 siblings, 0 replies; 26+ messages in thread
From: Lee Jones @ 2020-11-02 14:23 UTC (permalink / raw)
To: martin.petersen, jejb; +Cc: linux-kernel, linux-scsi, Lee Jones, Bradley Grove
Fixes the following W=1 kernel build warning(s):
drivers/scsi/esas2r/esas2r_init.c: In function ‘esas2r_init_adapter’:
drivers/scsi/esas2r/esas2r_init.c:418:41: warning: suggest braces around empty body in an ‘else’ statement [-Wempty-body]
Cc: Bradley Grove <linuxdrivers@attotech.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
drivers/scsi/esas2r/esas2r_init.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/esas2r/esas2r_init.c b/drivers/scsi/esas2r/esas2r_init.c
index 09c5c24bf391f..4b91db7ba919c 100644
--- a/drivers/scsi/esas2r/esas2r_init.c
+++ b/drivers/scsi/esas2r/esas2r_init.c
@@ -412,10 +412,11 @@ int esas2r_init_adapter(struct Scsi_Host *host, struct pci_dev *pcid,
esas2r_disable_chip_interrupts(a);
esas2r_check_adapter(a);
- if (!esas2r_init_adapter_hw(a, true))
+ if (!esas2r_init_adapter_hw(a, true)) {
esas2r_log(ESAS2R_LOG_CRIT, "failed to initialize hardware!");
- else
+ } else {
esas2r_debug("esas2r_init_adapter ok");
+ }
esas2r_claim_interrupts(a);
--
2.25.1
^ permalink raw reply related [flat|nested] 26+ messages in thread* [RESEND 10/19] scsi: lpfc: lpfc_nvme: Remove unused variable 'phba'
2020-11-02 14:23 [RESEND 00/19] Rid W=1 warnings in SCSI Lee Jones
` (8 preceding siblings ...)
2020-11-02 14:23 ` [RESEND 09/19] scsi: esas2r: esas2r_init: " Lee Jones
@ 2020-11-02 14:23 ` Lee Jones
2020-11-02 14:23 ` [RESEND 11/19] scsi: ufs: ufshcd: Fix some function doc-rot Lee Jones
` (9 subsequent siblings)
19 siblings, 0 replies; 26+ messages in thread
From: Lee Jones @ 2020-11-02 14:23 UTC (permalink / raw)
To: martin.petersen, jejb
Cc: linux-kernel, linux-scsi, Lee Jones, James Smart, Dick Kennedy
Fixes the following W=1 kernel build warning(s):
drivers/scsi/lpfc/lpfc_nvme.c: In function ‘lpfc_nvme_ls_abort’:
drivers/scsi/lpfc/lpfc_nvme.c:943:19: warning: variable ‘phba’ set but not used [-Wunused-but-set-variable]
Cc: James Smart <james.smart@broadcom.com>
Cc: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
drivers/scsi/lpfc/lpfc_nvme.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/scsi/lpfc/lpfc_nvme.c b/drivers/scsi/lpfc/lpfc_nvme.c
index 69f1a0457f51e..33d007ca5c8e6 100644
--- a/drivers/scsi/lpfc/lpfc_nvme.c
+++ b/drivers/scsi/lpfc/lpfc_nvme.c
@@ -940,7 +940,6 @@ lpfc_nvme_ls_abort(struct nvme_fc_local_port *pnvme_lport,
{
struct lpfc_nvme_lport *lport;
struct lpfc_vport *vport;
- struct lpfc_hba *phba;
struct lpfc_nodelist *ndlp;
int ret;
@@ -948,7 +947,6 @@ lpfc_nvme_ls_abort(struct nvme_fc_local_port *pnvme_lport,
if (unlikely(!lport))
return;
vport = lport->vport;
- phba = vport->phba;
if (vport->load_flag & FC_UNLOADING)
return;
--
2.25.1
^ permalink raw reply related [flat|nested] 26+ messages in thread* [RESEND 11/19] scsi: ufs: ufshcd: Fix some function doc-rot
2020-11-02 14:23 [RESEND 00/19] Rid W=1 warnings in SCSI Lee Jones
` (9 preceding siblings ...)
2020-11-02 14:23 ` [RESEND 10/19] scsi: lpfc: lpfc_nvme: Remove unused variable 'phba' Lee Jones
@ 2020-11-02 14:23 ` Lee Jones
2020-11-02 14:23 ` [RESEND 12/19] scsi: lpfc: lpfc_nvme: Fix some kernel-doc related issues Lee Jones
` (8 subsequent siblings)
19 siblings, 0 replies; 26+ messages in thread
From: Lee Jones @ 2020-11-02 14:23 UTC (permalink / raw)
To: martin.petersen, jejb
Cc: linux-kernel, linux-scsi, Lee Jones, Alim Akhtar, Avri Altman,
Santosh Yaraganavi, Vinayak Holikatti
Fixes the following W=1 kernel build warning(s):
drivers/scsi/ufs/ufshcd.c:6603: warning: Function parameter or member 'hba' not described in 'ufshcd_try_to_abort_task'
drivers/scsi/ufs/ufshcd.c:6603: warning: Function parameter or member 'tag' not described in 'ufshcd_try_to_abort_task'
drivers/scsi/ufs/ufshcd.c:6603: warning: Excess function parameter 'cmd' description in 'ufshcd_try_to_abort_task'
Cc: Alim Akhtar <alim.akhtar@samsung.com>
Cc: Avri Altman <avri.altman@wdc.com>
Cc: Santosh Yaraganavi <santosh.sy@samsung.com>
Cc: Vinayak Holikatti <h.vinayak@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
drivers/scsi/ufs/ufshcd.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index 2309253d3101c..7ba3e923eb585 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -6594,7 +6594,8 @@ static void ufshcd_set_req_abort_skip(struct ufs_hba *hba, unsigned long bitmap)
/**
* ufshcd_try_to_abort_task - abort a specific task
- * @cmd: SCSI command pointer
+ * @hba: Pointer to adapter instance
+ * @tag: Task tag/index to be aborted
*
* Abort the pending command in device by sending UFS_ABORT_TASK task management
* command, and in host controller by clearing the door-bell register. There can
--
2.25.1
^ permalink raw reply related [flat|nested] 26+ messages in thread* [RESEND 12/19] scsi: lpfc: lpfc_nvme: Fix some kernel-doc related issues
2020-11-02 14:23 [RESEND 00/19] Rid W=1 warnings in SCSI Lee Jones
` (10 preceding siblings ...)
2020-11-02 14:23 ` [RESEND 11/19] scsi: ufs: ufshcd: Fix some function doc-rot Lee Jones
@ 2020-11-02 14:23 ` Lee Jones
2020-11-02 14:23 ` [RESEND 13/19] scsi: esas2r: esas2r_int: Add brackets around potentially empty if()s Lee Jones
` (7 subsequent siblings)
19 siblings, 0 replies; 26+ messages in thread
From: Lee Jones @ 2020-11-02 14:23 UTC (permalink / raw)
To: martin.petersen, jejb
Cc: linux-kernel, linux-scsi, Lee Jones, James Smart, Dick Kennedy
Fixes the following W=1 kernel build warning(s):
drivers/scsi/lpfc/lpfc_nvme.c: In function ‘lpfc_nvme_ls_abort’:
drivers/scsi/lpfc/lpfc_nvme.c:943:19: warning: variable ‘phba’ set but not used [-Wunused-but-set-variable]
drivers/scsi/lpfc/lpfc_nvme.c:256: warning: Excess function parameter 'lpfc_pnvme' description in 'lpfc_nvme_create_queue'
drivers/scsi/lpfc/lpfc_nvme.c:804: warning: Function parameter or member 'pnvme_rport' not described in 'lpfc_nvme_ls_req'
drivers/scsi/lpfc/lpfc_nvme.c:804: warning: Excess function parameter 'nvme_rport' description in 'lpfc_nvme_ls_req'
drivers/scsi/lpfc/lpfc_nvme.c:1312: warning: Function parameter or member 'lpfc_ncmd' not described in 'lpfc_nvme_prep_io_cmd'
drivers/scsi/lpfc/lpfc_nvme.c:1312: warning: Excess function parameter 'lpfcn_cmd' description in 'lpfc_nvme_prep_io_cmd'
drivers/scsi/lpfc/lpfc_nvme.c:1416: warning: Function parameter or member 'lpfc_ncmd' not described in 'lpfc_nvme_prep_io_dma'
drivers/scsi/lpfc/lpfc_nvme.c:1416: warning: Excess function parameter 'lpfcn_cmd' description in 'lpfc_nvme_prep_io_dma'
drivers/scsi/lpfc/lpfc_nvme.c:1594: warning: bad line: indicated in @lpfc_nvme_rport.
drivers/scsi/lpfc/lpfc_nvme.c:1605: warning: Function parameter or member 'pnvme_lport' not described in 'lpfc_nvme_fcp_io_submit'
drivers/scsi/lpfc/lpfc_nvme.c:1605: warning: Function parameter or member 'pnvme_rport' not described in 'lpfc_nvme_fcp_io_submit'
drivers/scsi/lpfc/lpfc_nvme.c:1605: warning: Function parameter or member 'pnvme_fcreq' not described in 'lpfc_nvme_fcp_io_submit'
drivers/scsi/lpfc/lpfc_nvme.c:1605: warning: Excess function parameter 'lpfc_pnvme' description in 'lpfc_nvme_fcp_io_submit'
drivers/scsi/lpfc/lpfc_nvme.c:1605: warning: Excess function parameter 'lpfc_nvme_lport' description in 'lpfc_nvme_fcp_io_submit'
drivers/scsi/lpfc/lpfc_nvme.c:1605: warning: Excess function parameter 'lpfc_nvme_rport' description in 'lpfc_nvme_fcp_io_submit'
drivers/scsi/lpfc/lpfc_nvme.c:1605: warning: Excess function parameter 'lpfc_nvme_fcreq' description in 'lpfc_nvme_fcp_io_submit'
drivers/scsi/lpfc/lpfc_nvme.c:1852: warning: Function parameter or member 'abts_cmpl' not described in 'lpfc_nvme_abort_fcreq_cmpl'
drivers/scsi/lpfc/lpfc_nvme.c:1852: warning: Excess function parameter 'rspiocb' description in 'lpfc_nvme_abort_fcreq_cmpl'
drivers/scsi/lpfc/lpfc_nvme.c:1888: warning: Function parameter or member 'pnvme_lport' not described in 'lpfc_nvme_fcp_abort'
drivers/scsi/lpfc/lpfc_nvme.c:1888: warning: Function parameter or member 'pnvme_rport' not described in 'lpfc_nvme_fcp_abort'
drivers/scsi/lpfc/lpfc_nvme.c:1888: warning: Function parameter or member 'pnvme_fcreq' not described in 'lpfc_nvme_fcp_abort'
drivers/scsi/lpfc/lpfc_nvme.c:1888: warning: Excess function parameter 'lpfc_pnvme' description in 'lpfc_nvme_fcp_abort'
drivers/scsi/lpfc/lpfc_nvme.c:1888: warning: Excess function parameter 'lpfc_nvme_lport' description in 'lpfc_nvme_fcp_abort'
drivers/scsi/lpfc/lpfc_nvme.c:1888: warning: Excess function parameter 'lpfc_nvme_rport' description in 'lpfc_nvme_fcp_abort'
drivers/scsi/lpfc/lpfc_nvme.c:1888: warning: Excess function parameter 'lpfc_nvme_fcreq' description in 'lpfc_nvme_fcp_abort'
drivers/scsi/lpfc/lpfc_nvme.c:2089: warning: Function parameter or member 'ndlp' not described in 'lpfc_get_nvme_buf'
drivers/scsi/lpfc/lpfc_nvme.c:2089: warning: Function parameter or member 'idx' not described in 'lpfc_get_nvme_buf'
drivers/scsi/lpfc/lpfc_nvme.c:2089: warning: Function parameter or member 'expedite' not described in 'lpfc_get_nvme_buf'
drivers/scsi/lpfc/lpfc_nvme.c:2193: warning: Function parameter or member 'vport' not described in 'lpfc_nvme_create_localport'
drivers/scsi/lpfc/lpfc_nvme.c:2326: warning: Function parameter or member 'vport' not described in 'lpfc_nvme_destroy_localport'
drivers/scsi/lpfc/lpfc_nvme.c:2326: warning: Excess function parameter 'pnvme' description in 'lpfc_nvme_destroy_localport'
drivers/scsi/lpfc/lpfc_nvme.c:2544: warning: Function parameter or member 'vport' not described in 'lpfc_nvme_rescan_port'
drivers/scsi/lpfc/lpfc_nvme.c:2544: warning: Function parameter or member 'ndlp' not described in 'lpfc_nvme_rescan_port'
Cc: James Smart <james.smart@broadcom.com>
Cc: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
drivers/scsi/lpfc/lpfc_nvme.c | 35 +++++++++++++++--------------------
1 file changed, 15 insertions(+), 20 deletions(-)
diff --git a/drivers/scsi/lpfc/lpfc_nvme.c b/drivers/scsi/lpfc/lpfc_nvme.c
index 33d007ca5c8e6..42eb144fed0d1 100644
--- a/drivers/scsi/lpfc/lpfc_nvme.c
+++ b/drivers/scsi/lpfc/lpfc_nvme.c
@@ -235,7 +235,6 @@ lpfc_nvme_prep_abort_wqe(struct lpfc_iocbq *pwqeq, u16 xritag, u8 opt)
/**
* lpfc_nvme_create_queue -
* @pnvme_lport: Transport localport that LS is to be issued from
- * @lpfc_pnvme: Pointer to the driver's nvme instance data
* @qidx: An cpu index used to affinitize IO queues and MSIX vectors.
* @qsize: Size of the queue in bytes
* @handle: An opaque driver handle used in follow-up calls.
@@ -787,7 +786,7 @@ __lpfc_nvme_ls_req(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
/**
* lpfc_nvme_ls_req - Issue an NVME Link Service request
* @pnvme_lport: Transport localport that LS is to be issued from.
- * @nvme_rport: Transport remoteport that LS is to be sent to.
+ * @pnvme_rport: Transport remoteport that LS is to be sent to.
* @pnvme_lsreq: the transport nvme_ls_req structure for the LS
*
* Driver registers this routine to handle any link service request
@@ -1290,7 +1289,7 @@ lpfc_nvme_io_cmd_wqe_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *pwqeIn,
/**
* lpfc_nvme_prep_io_cmd - Issue an NVME-over-FCP IO
* @vport: pointer to a host virtual N_Port data structure
- * @lpfcn_cmd: Pointer to lpfc scsi command
+ * @lpfc_ncmd: Pointer to lpfc scsi command
* @pnode: pointer to a node-list data structure
* @cstat: pointer to the control status structure
*
@@ -1398,7 +1397,7 @@ lpfc_nvme_prep_io_cmd(struct lpfc_vport *vport,
/**
* lpfc_nvme_prep_io_dma - Issue an NVME-over-FCP IO
* @vport: pointer to a host virtual N_Port data structure
- * @lpfcn_cmd: Pointer to lpfc scsi command
+ * @lpfc_ncmd: Pointer to lpfc scsi command
*
* Driver registers this routine as it io request handler. This
* routine issues an fcp WQE with data from the @lpfc_nvme_fcpreq
@@ -1580,16 +1579,14 @@ lpfc_nvme_prep_io_dma(struct lpfc_vport *vport,
/**
* lpfc_nvme_fcp_io_submit - Issue an NVME-over-FCP IO
- * @lpfc_pnvme: Pointer to the driver's nvme instance data
- * @lpfc_nvme_lport: Pointer to the driver's local port data
- * @lpfc_nvme_rport: Pointer to the rport getting the @lpfc_nvme_ereq
- * @lpfc_nvme_fcreq: IO request from nvme fc to driver.
+ * @pnvme_lport: Pointer to the driver's local port data
+ * @pnvme_rport: Pointer to the rport getting the @lpfc_nvme_ereq
* @hw_queue_handle: Driver-returned handle in lpfc_nvme_create_queue
+ * @pnvme_fcreq: IO request from nvme fc to driver.
*
* Driver registers this routine as it io request handler. This
* routine issues an fcp WQE with data from the @lpfc_nvme_fcpreq
- * data structure to the rport
- indicated in @lpfc_nvme_rport.
+ * data structure to the rport indicated in @lpfc_nvme_rport.
*
* Return value :
* 0 - Success
@@ -1837,7 +1834,7 @@ lpfc_nvme_fcp_io_submit(struct nvme_fc_local_port *pnvme_lport,
* lpfc_nvme_abort_fcreq_cmpl - Complete an NVME FCP abort request.
* @phba: Pointer to HBA context object
* @cmdiocb: Pointer to command iocb object.
- * @rspiocb: Pointer to response iocb object.
+ * @abts_cmpl: Pointer to wcqe complete object.
*
* This is the callback function for any NVME FCP IO that was aborted.
*
@@ -1863,11 +1860,10 @@ lpfc_nvme_abort_fcreq_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
/**
* lpfc_nvme_fcp_abort - Issue an NVME-over-FCP ABTS
- * @lpfc_pnvme: Pointer to the driver's nvme instance data
- * @lpfc_nvme_lport: Pointer to the driver's local port data
- * @lpfc_nvme_rport: Pointer to the rport getting the @lpfc_nvme_ereq
- * @lpfc_nvme_fcreq: IO request from nvme fc to driver.
+ * @pnvme_lport: Pointer to the driver's local port data
+ * @pnvme_rport: Pointer to the rport getting the @lpfc_nvme_ereq
* @hw_queue_handle: Driver-returned handle in lpfc_nvme_create_queue
+ * @pnvme_fcreq: IO request from nvme fc to driver.
*
* Driver registers this routine as its nvme request io abort handler. This
* routine issues an fcp Abort WQE with data from the @lpfc_nvme_fcpreq
@@ -2070,9 +2066,8 @@ static struct nvme_fc_port_template lpfc_nvme_template = {
.fcprqst_priv_sz = sizeof(struct lpfc_nvme_fcpreq_priv),
};
-/**
+/*
* lpfc_get_nvme_buf - Get a nvme buffer from io_buf_list of the HBA
- * @phba: The HBA for which this call is being executed.
*
* This routine removes a nvme buffer from head of @hdwq io_buf_list
* and returns to caller.
@@ -2172,7 +2167,7 @@ lpfc_release_nvme_buf(struct lpfc_hba *phba, struct lpfc_io_buf *lpfc_ncmd)
/**
* lpfc_nvme_create_localport - Create/Bind an nvme localport instance.
- * @pvport - the lpfc_vport instance requesting a localport.
+ * @vport - the lpfc_vport instance requesting a localport.
*
* This routine is invoked to create an nvme localport instance to bind
* to the nvme_fc_transport. It is called once during driver load
@@ -2319,7 +2314,7 @@ lpfc_nvme_lport_unreg_wait(struct lpfc_vport *vport,
/**
* lpfc_nvme_destroy_localport - Destroy lpfc_nvme bound to nvme transport.
- * @pnvme: pointer to lpfc nvme data structure.
+ * @vport: pointer to a host virtual N_Port data structure
*
* This routine is invoked to destroy all lports bound to the phba.
* The lport memory was allocated by the nvme fc transport and is
@@ -2538,7 +2533,7 @@ lpfc_nvme_register_port(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp)
#endif
}
-/**
+/*
* lpfc_nvme_rescan_port - Check to see if we should rescan this remoteport
*
* If the ndlp represents an NVME Target, that we are logged into,
--
2.25.1
^ permalink raw reply related [flat|nested] 26+ messages in thread* [RESEND 13/19] scsi: esas2r: esas2r_int: Add brackets around potentially empty if()s
2020-11-02 14:23 [RESEND 00/19] Rid W=1 warnings in SCSI Lee Jones
` (11 preceding siblings ...)
2020-11-02 14:23 ` [RESEND 12/19] scsi: lpfc: lpfc_nvme: Fix some kernel-doc related issues Lee Jones
@ 2020-11-02 14:23 ` Lee Jones
2020-11-02 14:23 ` [RESEND 14/19] scsi: lpfc: lpfc_nvmet: Fix-up some formatting and doc-rot issues Lee Jones
` (6 subsequent siblings)
19 siblings, 0 replies; 26+ messages in thread
From: Lee Jones @ 2020-11-02 14:23 UTC (permalink / raw)
To: martin.petersen, jejb; +Cc: linux-kernel, linux-scsi, Lee Jones, Bradley Grove
Fixes the following W=1 kernel build warning(s):
drivers/scsi/esas2r/esas2r_int.c: In function ‘esas2r_doorbell_interrupt’:
drivers/scsi/esas2r/esas2r_int.c:692:22: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]
drivers/scsi/esas2r/esas2r_int.c: In function ‘esas2r_send_reset_ae’:
drivers/scsi/esas2r/esas2r_int.c:868:44: warning: suggest braces around empty body in an ‘else’ statement [-Wempty-body]
Cc: Bradley Grove <linuxdrivers@attotech.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
drivers/scsi/esas2r/esas2r_int.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/scsi/esas2r/esas2r_int.c b/drivers/scsi/esas2r/esas2r_int.c
index f16d6bcf9bb6d..5281d93563275 100644
--- a/drivers/scsi/esas2r/esas2r_int.c
+++ b/drivers/scsi/esas2r/esas2r_int.c
@@ -688,8 +688,9 @@ static void esas2r_doorbell_interrupt(struct esas2r_adapter *a, u32 doorbell)
esas2r_local_reset_adapter(a);
}
- if (!(doorbell & DRBL_FORCE_INT))
+ if (!(doorbell & DRBL_FORCE_INT)) {
esas2r_trace_exit();
+ }
}
void esas2r_force_interrupt(struct esas2r_adapter *a)
@@ -862,10 +863,11 @@ void esas2r_send_reset_ae(struct esas2r_adapter *a, bool pwr_mgt)
ae.byflags = 0;
ae.bylength = (u8)sizeof(struct atto_vda_ae_hdr);
- if (pwr_mgt)
+ if (pwr_mgt) {
esas2r_hdebug("*** sending power management AE ***");
- else
+ } else {
esas2r_hdebug("*** sending reset AE ***");
+ }
esas2r_queue_fw_event(a, fw_event_vda_ae, &ae,
sizeof(union atto_vda_ae));
--
2.25.1
^ permalink raw reply related [flat|nested] 26+ messages in thread* [RESEND 14/19] scsi: lpfc: lpfc_nvmet: Fix-up some formatting and doc-rot issues
2020-11-02 14:23 [RESEND 00/19] Rid W=1 warnings in SCSI Lee Jones
` (12 preceding siblings ...)
2020-11-02 14:23 ` [RESEND 13/19] scsi: esas2r: esas2r_int: Add brackets around potentially empty if()s Lee Jones
@ 2020-11-02 14:23 ` Lee Jones
2020-11-02 14:23 ` [RESEND 15/19] scsi: esas2r: esas2r_main: Demote non-conformant kernel-doc header Lee Jones
` (5 subsequent siblings)
19 siblings, 0 replies; 26+ messages in thread
From: Lee Jones @ 2020-11-02 14:23 UTC (permalink / raw)
To: martin.petersen, jejb
Cc: linux-kernel, linux-scsi, Lee Jones, James Smart, Dick Kennedy
Fixes the following W=1 kernel build warning(s):
drivers/scsi/lpfc/lpfc_nvmet.c:386: warning: Function parameter or member 'ctx_buf' not described in 'lpfc_nvmet_ctxbuf_post'
drivers/scsi/lpfc/lpfc_nvmet.c:386: warning: Excess function parameter 'ctxp' description in 'lpfc_nvmet_ctxbuf_post'
drivers/scsi/lpfc/lpfc_nvmet.c:386: warning: Excess function parameter 'mp' description in 'lpfc_nvmet_ctxbuf_post'
drivers/scsi/lpfc/lpfc_nvmet.c:1310: warning: Function parameter or member 'targetport' not described in 'lpfc_nvmet_ls_req'
drivers/scsi/lpfc/lpfc_nvmet.c:1310: warning: Function parameter or member 'hosthandle' not described in 'lpfc_nvmet_ls_req'
drivers/scsi/lpfc/lpfc_nvmet.c:1310: warning: Function parameter or member 'pnvme_lsreq' not described in 'lpfc_nvmet_ls_req'
drivers/scsi/lpfc/lpfc_nvmet.c:1350: warning: Function parameter or member 'hosthandle' not described in 'lpfc_nvmet_ls_abort'
drivers/scsi/lpfc/lpfc_nvmet.c:1350: warning: Function parameter or member 'pnvme_lsreq' not described in 'lpfc_nvmet_ls_abort'
drivers/scsi/lpfc/lpfc_nvmet.c:3607: warning: Function parameter or member 'phba' not described in 'lpfc_nvmet_invalidate_host'
drivers/scsi/lpfc/lpfc_nvmet.c:3607: warning: Function parameter or member 'ndlp' not described in 'lpfc_nvmet_invalidate_host'
Cc: James Smart <james.smart@broadcom.com>
Cc: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
drivers/scsi/lpfc/lpfc_nvmet.c | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/drivers/scsi/lpfc/lpfc_nvmet.c b/drivers/scsi/lpfc/lpfc_nvmet.c
index d4ade7cdb93a9..675253093e877 100644
--- a/drivers/scsi/lpfc/lpfc_nvmet.c
+++ b/drivers/scsi/lpfc/lpfc_nvmet.c
@@ -371,8 +371,7 @@ lpfc_nvmet_xmt_ls_rsp_cmp(struct lpfc_hba *phba, struct lpfc_iocbq *cmdwqe,
/**
* lpfc_nvmet_ctxbuf_post - Repost a NVMET RQ DMA buffer and clean up context
* @phba: HBA buffer is associated with
- * @ctxp: context to clean up
- * @mp: Buffer to free
+ * @ctx_buf: ctx buffer context
*
* Description: Frees the given DMA buffer in the appropriate way given by
* reposting it to its associated RQ so it can be reused.
@@ -1291,10 +1290,10 @@ lpfc_nvmet_ls_req_cmp(struct lpfc_hba *phba, struct lpfc_iocbq *cmdwqe,
/**
* lpfc_nvmet_ls_req - Issue an Link Service request
- * @targetport - pointer to target instance registered with nvmet transport.
- * @hosthandle - hosthandle set by the driver in a prior ls_rqst_rcv.
+ * @targetport: pointer to target instance registered with nvmet transport.
+ * @hosthandle: hosthandle set by the driver in a prior ls_rqst_rcv.
* Driver sets this value to the ndlp pointer.
- * @pnvme_lsreq - the transport nvme_ls_req structure for the LS
+ * @pnvme_lsreq: the transport nvme_ls_req structure for the LS
*
* Driver registers this routine to handle any link service request
* from the nvme_fc transport to a remote nvme-aware port.
@@ -1336,9 +1335,9 @@ lpfc_nvmet_ls_req(struct nvmet_fc_target_port *targetport,
/**
* lpfc_nvmet_ls_abort - Abort a prior NVME LS request
* @targetport: Transport targetport, that LS was issued from.
- * @hosthandle - hosthandle set by the driver in a prior ls_rqst_rcv.
+ * @hosthandle: hosthandle set by the driver in a prior ls_rqst_rcv.
* Driver sets this value to the ndlp pointer.
- * @pnvme_lsreq - the transport nvme_ls_req structure for LS to be aborted
+ * @pnvme_lsreq: the transport nvme_ls_req structure for LS to be aborted
*
* Driver registers this routine to abort an NVME LS request that is
* in progress (from the transports perspective).
@@ -3596,8 +3595,8 @@ lpfc_nvme_unsol_ls_issue_abort(struct lpfc_hba *phba,
/**
* lpfc_nvmet_invalidate_host
*
- * @phba - pointer to the driver instance bound to an adapter port.
- * @ndlp - pointer to an lpfc_nodelist type
+ * @phba: pointer to the driver instance bound to an adapter port.
+ * @ndlp: pointer to an lpfc_nodelist type
*
* This routine upcalls the nvmet transport to invalidate an NVME
* host to which this target instance had active connections.
--
2.25.1
^ permalink raw reply related [flat|nested] 26+ messages in thread* [RESEND 15/19] scsi: esas2r: esas2r_main: Demote non-conformant kernel-doc header
2020-11-02 14:23 [RESEND 00/19] Rid W=1 warnings in SCSI Lee Jones
` (13 preceding siblings ...)
2020-11-02 14:23 ` [RESEND 14/19] scsi: lpfc: lpfc_nvmet: Fix-up some formatting and doc-rot issues Lee Jones
@ 2020-11-02 14:23 ` Lee Jones
2020-11-02 14:23 ` [RESEND 16/19] scsi: advansys: Relocate or remove unused variables Lee Jones
` (4 subsequent siblings)
19 siblings, 0 replies; 26+ messages in thread
From: Lee Jones @ 2020-11-02 14:23 UTC (permalink / raw)
To: martin.petersen, jejb; +Cc: linux-kernel, linux-scsi, Lee Jones, Bradley Grove
Fixes the following W=1 kernel build warning(s):
drivers/scsi/esas2r/esas2r_main.c:911: warning: Function parameter or member 'a' not described in 'esas2r_check_active_queue'
drivers/scsi/esas2r/esas2r_main.c:911: warning: Function parameter or member 'abort_request' not described in 'esas2r_check_active_queue'
drivers/scsi/esas2r/esas2r_main.c:911: warning: Function parameter or member 'cmd' not described in 'esas2r_check_active_queue'
drivers/scsi/esas2r/esas2r_main.c:911: warning: Function parameter or member 'queue' not described in 'esas2r_check_active_queue'
Cc: Bradley Grove <linuxdrivers@attotech.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
drivers/scsi/esas2r/esas2r_main.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/scsi/esas2r/esas2r_main.c b/drivers/scsi/esas2r/esas2r_main.c
index 7b49e2e9fcdec..923e6e5ddbf90 100644
--- a/drivers/scsi/esas2r/esas2r_main.c
+++ b/drivers/scsi/esas2r/esas2r_main.c
@@ -894,15 +894,11 @@ static void complete_task_management_request(struct esas2r_adapter *a,
esas2r_free_request(a, rq);
}
-/**
+/*
* Searches the specified queue for the specified queue for the command
* to abort.
*
- * @param [in] a
- * @param [in] abort_request
- * @param [in] cmd
- * t
- * @return 0 on failure, 1 if command was not found, 2 if command was found
+ * Return 0 on failure, 1 if command was not found, 2 if command was found
*/
static int esas2r_check_active_queue(struct esas2r_adapter *a,
struct esas2r_request **abort_request,
--
2.25.1
^ permalink raw reply related [flat|nested] 26+ messages in thread* [RESEND 16/19] scsi: advansys: Relocate or remove unused variables
2020-11-02 14:23 [RESEND 00/19] Rid W=1 warnings in SCSI Lee Jones
` (14 preceding siblings ...)
2020-11-02 14:23 ` [RESEND 15/19] scsi: esas2r: esas2r_main: Demote non-conformant kernel-doc header Lee Jones
@ 2020-11-02 14:23 ` Lee Jones
2020-11-02 14:23 ` [RESEND 17/19] scsi: dc395x: Remove a few " Lee Jones
` (3 subsequent siblings)
19 siblings, 0 replies; 26+ messages in thread
From: Lee Jones @ 2020-11-02 14:23 UTC (permalink / raw)
To: martin.petersen, jejb
Cc: linux-kernel, linux-scsi, Lee Jones, Matthew Wilcox,
Hannes Reinecke
Fixes the following W=1 kernel build warning(s):
drivers/scsi/advansys.c: In function ‘asc_prt_asc_board_eeprom’:
drivers/scsi/advansys.c:2879:15: warning: variable ‘asc_dvc_varp’ set but not used [-Wunused-but-set-variable]
drivers/scsi/advansys.c: In function ‘asc_prt_driver_conf’:
drivers/scsi/advansys.c:3174:6: warning: variable ‘chip_scsi_id’ set but not used [-Wunused-but-set-variable]
drivers/scsi/advansys.c: In function ‘AdvISR’:
drivers/scsi/advansys.c:6114:9: warning: variable ‘target_bit’ set but not used [-Wunused-but-set-variable]
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Hannes Reinecke <hare@suse.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
drivers/scsi/advansys.c | 16 +++-------------
1 file changed, 3 insertions(+), 13 deletions(-)
diff --git a/drivers/scsi/advansys.c b/drivers/scsi/advansys.c
index c2c7850ff7b42..79830e77afa97 100644
--- a/drivers/scsi/advansys.c
+++ b/drivers/scsi/advansys.c
@@ -2876,15 +2876,15 @@ static int asc_get_eeprom_string(ushort *serialnum, uchar *cp)
static void asc_prt_asc_board_eeprom(struct seq_file *m, struct Scsi_Host *shost)
{
struct asc_board *boardp = shost_priv(shost);
- ASC_DVC_VAR *asc_dvc_varp;
ASCEEP_CONFIG *ep;
int i;
+ uchar serialstr[13];
#ifdef CONFIG_ISA
+ ASC_DVC_VAR *asc_dvc_varp;
int isa_dma_speed[] = { 10, 8, 7, 6, 5, 4, 3, 2 };
-#endif /* CONFIG_ISA */
- uchar serialstr[13];
asc_dvc_varp = &boardp->dvc_var.asc_dvc_var;
+#endif /* CONFIG_ISA */
ep = &boardp->eep_config.asc_eep;
seq_printf(m,
@@ -3171,7 +3171,6 @@ static void asc_prt_adv_board_eeprom(struct seq_file *m, struct Scsi_Host *shost
static void asc_prt_driver_conf(struct seq_file *m, struct Scsi_Host *shost)
{
struct asc_board *boardp = shost_priv(shost);
- int chip_scsi_id;
seq_printf(m,
"\nLinux Driver Configuration and Information for AdvanSys SCSI Host %d:\n",
@@ -3197,12 +3196,6 @@ static void asc_prt_driver_conf(struct seq_file *m, struct Scsi_Host *shost)
boardp->asc_n_io_port);
seq_printf(m, " io_port 0x%lx\n", shost->io_port);
-
- if (ASC_NARROW_BOARD(boardp)) {
- chip_scsi_id = boardp->dvc_cfg.asc_dvc_cfg.chip_scsi_id;
- } else {
- chip_scsi_id = boardp->dvc_var.adv_dvc_var.chip_scsi_id;
- }
}
/*
@@ -6111,7 +6104,6 @@ static int AdvISR(ADV_DVC_VAR *asc_dvc)
{
AdvPortAddr iop_base;
uchar int_stat;
- ushort target_bit;
ADV_CARR_T *free_carrp;
__le32 irq_next_vpa;
ADV_SCSI_REQ_Q *scsiq;
@@ -6198,8 +6190,6 @@ static int AdvISR(ADV_DVC_VAR *asc_dvc)
asc_dvc->carr_freelist = free_carrp;
asc_dvc->carr_pending_cnt--;
- target_bit = ADV_TID_TO_TIDMASK(scsiq->target_id);
-
/*
* Clear request microcode control flag.
*/
--
2.25.1
^ permalink raw reply related [flat|nested] 26+ messages in thread* [RESEND 17/19] scsi: dc395x: Remove a few unused variables
2020-11-02 14:23 [RESEND 00/19] Rid W=1 warnings in SCSI Lee Jones
` (15 preceding siblings ...)
2020-11-02 14:23 ` [RESEND 16/19] scsi: advansys: Relocate or remove unused variables Lee Jones
@ 2020-11-02 14:23 ` Lee Jones
2020-11-02 14:23 ` [RESEND 18/19] scsi: dc395x: Mark 's_stat2' as __maybe_unused Lee Jones
` (2 subsequent siblings)
19 siblings, 0 replies; 26+ messages in thread
From: Lee Jones @ 2020-11-02 14:23 UTC (permalink / raw)
To: martin.petersen, jejb
Cc: linux-kernel, linux-scsi, Lee Jones, Oliver Neukum, Ali Akcaagac,
Jamie Lenehan, C.L. Huang, Erich Chen, Kurt Garloff, dc395x
Fixes the following W=1 kernel build warning(s):
drivers/scsi/dc395x.c: In function ‘data_io_transfer’:
drivers/scsi/dc395x.c:2400:16: warning: variable ‘data2’ set but not used [-Wunused-but-set-variable]
drivers/scsi/dc395x.c:2400:6: warning: variable ‘data’ set but not used [-Wunused-but-set-variable]
drivers/scsi/dc395x.c: In function ‘reselect’:
drivers/scsi/dc395x.c:2992:5: warning: variable ‘arblostflag’ set but not used [-Wunused-but-set-variable]
drivers/scsi/dc395x.c: In function ‘doing_srb_done’:
drivers/scsi/dc395x.c:3393:28: warning: variable ‘dir’ set but not used [-Wunused-but-set-variable]
Cc: Oliver Neukum <oliver@neukum.org>
Cc: Ali Akcaagac <aliakc@web.de>
Cc: Jamie Lenehan <lenehan@twibble.org>
Cc: "C.L. Huang" <ching@tekram.com.tw>
Cc: Erich Chen <erich@tekram.com.tw>
Cc: Kurt Garloff <garloff@suse.de>
Cc: dc395x@twibble.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
drivers/scsi/dc395x.c | 13 ++++---------
1 file changed, 4 insertions(+), 9 deletions(-)
diff --git a/drivers/scsi/dc395x.c b/drivers/scsi/dc395x.c
index fa16894d8758c..f838fe8d74578 100644
--- a/drivers/scsi/dc395x.c
+++ b/drivers/scsi/dc395x.c
@@ -2397,7 +2397,6 @@ static void data_io_transfer(struct AdapterCtlBlk *acb,
}
#endif /* DC395x_LASTPIO */
else { /* xfer pad */
- u8 data = 0, data2 = 0;
if (srb->sg_count) {
srb->adapter_status = H_OVER_UNDER_RUN;
srb->status |= OVER_RUN;
@@ -2412,8 +2411,8 @@ static void data_io_transfer(struct AdapterCtlBlk *acb,
DC395x_write8(acb, TRM_S1040_SCSI_CONFIG2,
CFG2_WIDEFIFO);
if (io_dir & DMACMD_DIR) {
- data = DC395x_read8(acb, TRM_S1040_SCSI_FIFO);
- data2 = DC395x_read8(acb, TRM_S1040_SCSI_FIFO);
+ DC395x_read8(acb, TRM_S1040_SCSI_FIFO);
+ DC395x_read8(acb, TRM_S1040_SCSI_FIFO);
} else {
/* Danger, Robinson: If you find KGs
* scattered over the wide disk, the driver
@@ -2427,7 +2426,7 @@ static void data_io_transfer(struct AdapterCtlBlk *acb,
/* Danger, Robinson: If you find a collection of Ks on your disk
* something broke :-( */
if (io_dir & DMACMD_DIR)
- data = DC395x_read8(acb, TRM_S1040_SCSI_FIFO);
+ DC395x_read8(acb, TRM_S1040_SCSI_FIFO);
else
DC395x_write8(acb, TRM_S1040_SCSI_FIFO, 'K');
}
@@ -2989,7 +2988,6 @@ static void reselect(struct AdapterCtlBlk *acb)
struct ScsiReqBlk *srb = NULL;
u16 rsel_tar_lun_id;
u8 id, lun;
- u8 arblostflag = 0;
dprintkdbg(DBG_0, "reselect: acb=%p\n", acb);
clear_fifo(acb, "reselect");
@@ -3011,7 +3009,6 @@ static void reselect(struct AdapterCtlBlk *acb)
srb->cmd, dcb->target_id,
dcb->target_lun, rsel_tar_lun_id,
DC395x_read16(acb, TRM_S1040_SCSI_STATUS));
- arblostflag = 1;
/*srb->state |= SRB_DISCONNECT; */
srb->state = SRB_READY;
@@ -3042,7 +3039,7 @@ static void reselect(struct AdapterCtlBlk *acb)
"disconnection? <%02i-%i>\n",
dcb->target_id, dcb->target_lun);
- if (dcb->sync_mode & EN_TAG_QUEUEING /*&& !arblostflag */) {
+ if (dcb->sync_mode & EN_TAG_QUEUEING) {
srb = acb->tmp_srb;
dcb->active_srb = srb;
} else {
@@ -3390,11 +3387,9 @@ static void doing_srb_done(struct AdapterCtlBlk *acb, u8 did_flag,
struct scsi_cmnd *p;
list_for_each_entry_safe(srb, tmp, &dcb->srb_going_list, list) {
- enum dma_data_direction dir;
int result;
p = srb->cmd;
- dir = p->sc_data_direction;
result = MK_RES(0, did_flag, 0, 0);
printk("G:%p(%02i-%i) ", p,
p->device->id, (u8)p->device->lun);
--
2.25.1
^ permalink raw reply related [flat|nested] 26+ messages in thread* [RESEND 18/19] scsi: dc395x: Mark 's_stat2' as __maybe_unused
2020-11-02 14:23 [RESEND 00/19] Rid W=1 warnings in SCSI Lee Jones
` (16 preceding siblings ...)
2020-11-02 14:23 ` [RESEND 17/19] scsi: dc395x: Remove a few " Lee Jones
@ 2020-11-02 14:23 ` Lee Jones
2020-11-02 14:23 ` [RESEND 19/19] scsi: hpsa: Strip out a bunch of set but unused variables Lee Jones
2020-11-11 3:30 ` [RESEND 00/19] Rid W=1 warnings in SCSI Martin K. Petersen
19 siblings, 0 replies; 26+ messages in thread
From: Lee Jones @ 2020-11-02 14:23 UTC (permalink / raw)
To: martin.petersen, jejb
Cc: linux-kernel, linux-scsi, Lee Jones, Oliver Neukum, Ali Akcaagac,
Jamie Lenehan, C.L. Huang, Erich Chen, Kurt Garloff, dc395x
It's only utilised when debugging is enabled.
Fixes the following W=1 kernel build warning(s):
drivers/scsi/dc395x.c: In function ‘start_scsi’:
drivers/scsi/dc395x.c:1359:6: warning: variable ‘s_stat2’ set but not used [-Wunused-but-set-variable]
Cc: Oliver Neukum <oliver@neukum.org>
Cc: Ali Akcaagac <aliakc@web.de>
Cc: Jamie Lenehan <lenehan@twibble.org>
Cc: "C.L. Huang" <ching@tekram.com.tw>
Cc: Erich Chen <erich@tekram.com.tw>
Cc: Kurt Garloff <garloff@suse.de>
Cc: dc395x@twibble.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
drivers/scsi/dc395x.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/dc395x.c b/drivers/scsi/dc395x.c
index f838fe8d74578..7b522ff345d5e 100644
--- a/drivers/scsi/dc395x.c
+++ b/drivers/scsi/dc395x.c
@@ -1356,7 +1356,7 @@ void selection_timeout_missed(unsigned long ptr)
static u8 start_scsi(struct AdapterCtlBlk* acb, struct DeviceCtlBlk* dcb,
struct ScsiReqBlk* srb)
{
- u16 s_stat2, return_code;
+ u16 __maybe_unused s_stat2, return_code;
u8 s_stat, scsicommand, i, identify_message;
u8 *ptr;
dprintkdbg(DBG_0, "start_scsi: (0x%p) <%02i-%i> srb=%p\n",
--
2.25.1
^ permalink raw reply related [flat|nested] 26+ messages in thread* [RESEND 19/19] scsi: hpsa: Strip out a bunch of set but unused variables
2020-11-02 14:23 [RESEND 00/19] Rid W=1 warnings in SCSI Lee Jones
` (17 preceding siblings ...)
2020-11-02 14:23 ` [RESEND 18/19] scsi: dc395x: Mark 's_stat2' as __maybe_unused Lee Jones
@ 2020-11-02 14:23 ` Lee Jones
2020-11-03 21:27 ` kernel test robot
` (2 more replies)
2020-11-11 3:30 ` [RESEND 00/19] Rid W=1 warnings in SCSI Martin K. Petersen
19 siblings, 3 replies; 26+ messages in thread
From: Lee Jones @ 2020-11-02 14:23 UTC (permalink / raw)
To: martin.petersen, jejb
Cc: linux-kernel, linux-scsi, Lee Jones, Don Brace, Bugfixes to,
storagedev
Fixes the following W=1 kernel build warning(s):
drivers/scsi/hpsa.c: In function ‘hpsa_volume_offline’:
drivers/scsi/hpsa.c:3885:5: warning: variable ‘scsi_status’ set but not used [-Wunused-but-set-variable]
drivers/scsi/hpsa.c:3884:6: warning: variable ‘cmd_status’ set but not used [-Wunused-but-set-variable]
drivers/scsi/hpsa.c: In function ‘hpsa_update_scsi_devices’:
drivers/scsi/hpsa.c:4354:9: warning: variable ‘n_ext_target_devs’ set but not used [-Wunused-but-set-variable]
drivers/scsi/hpsa.c: In function ‘hpsa_scatter_gather’:
drivers/scsi/hpsa.c:4583:36: warning: variable ‘last_sg’ set but not used [-Wunused-but-set-variable]
drivers/scsi/hpsa.c: In function ‘hpsa_init_one’:
drivers/scsi/hpsa.c:8639:6: warning: variable ‘dac’ set but not used [-Wunused-but-set-variable]
drivers/scsi/hpsa.c: In function ‘hpsa_enter_performant_mode’:
drivers/scsi/hpsa.c:9300:7: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable]
Cc: Don Brace <don.brace@microchip.com>
Cc: Bugfixes to <esc.storagedev@microsemi.com>
Cc: storagedev@microchip.com
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
drivers/scsi/hpsa.c | 25 +++++++------------------
1 file changed, 7 insertions(+), 18 deletions(-)
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index 16fd378285d27..02e20bed8a484 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -3881,8 +3881,6 @@ static unsigned char hpsa_volume_offline(struct ctlr_info *h,
u8 sense_key, asc, ascq;
int sense_len;
int rc, ldstat = 0;
- u16 cmd_status;
- u8 scsi_status;
#define ASC_LUN_NOT_READY 0x04
#define ASCQ_LUN_NOT_READY_FORMAT_IN_PROGRESS 0x04
#define ASCQ_LUN_NOT_READY_INITIALIZING_CMD_REQ 0x02
@@ -3902,8 +3900,6 @@ static unsigned char hpsa_volume_offline(struct ctlr_info *h,
else
sense_len = c->err_info->SenseLen;
decode_sense_data(sense, sense_len, &sense_key, &asc, &ascq);
- cmd_status = c->err_info->CommandStatus;
- scsi_status = c->err_info->ScsiStatus;
cmd_free(h, c);
/* Determine the reason for not ready state */
@@ -4351,7 +4347,7 @@ static void hpsa_update_scsi_devices(struct ctlr_info *h)
u32 ndev_allocated = 0;
struct hpsa_scsi_dev_t **currentsd, *this_device, *tmpdevice;
int ncurrent = 0;
- int i, n_ext_target_devs, ndevs_to_allocate;
+ int i, ndevs_to_allocate;
int raid_ctlr_position;
bool physical_device;
DECLARE_BITMAP(lunzerobits, MAX_EXT_TARGETS);
@@ -4416,7 +4412,6 @@ static void hpsa_update_scsi_devices(struct ctlr_info *h)
raid_ctlr_position = nphysicals + nlogicals;
/* adjust our table of devices */
- n_ext_target_devs = 0;
for (i = 0; i < nphysicals + nlogicals + 1; i++) {
u8 *lunaddrbytes, is_OBDR = 0;
int rc = 0;
@@ -4580,7 +4575,7 @@ static int hpsa_scatter_gather(struct ctlr_info *h,
struct scsi_cmnd *cmd)
{
struct scatterlist *sg;
- int use_sg, i, sg_limit, chained, last_sg;
+ int use_sg, i, sg_limit, chained;
struct SGDescriptor *curr_sg;
BUG_ON(scsi_sg_count(cmd) > h->maxsgentries);
@@ -4602,7 +4597,6 @@ static int hpsa_scatter_gather(struct ctlr_info *h,
curr_sg = cp->SG;
chained = use_sg > h->max_cmd_sg_entries;
sg_limit = chained ? h->max_cmd_sg_entries - 1 : use_sg;
- last_sg = scsi_sg_count(cmd) - 1;
scsi_for_each_sg(cmd, sg, sg_limit, i) {
hpsa_set_sg_descriptor(curr_sg, sg);
curr_sg++;
@@ -8635,7 +8629,7 @@ static struct ctlr_info *hpda_alloc_ctlr_info(void)
static int hpsa_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
{
- int dac, rc;
+ int rc;
struct ctlr_info *h;
int try_soft_reset = 0;
unsigned long flags;
@@ -8711,13 +8705,9 @@ static int hpsa_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
/* configure PCI DMA stuff */
rc = dma_set_mask(&pdev->dev, DMA_BIT_MASK(64));
- if (rc == 0) {
- dac = 1;
- } else {
+ if (rc != 0)
rc = dma_set_mask(&pdev->dev, DMA_BIT_MASK(32));
- if (rc == 0) {
- dac = 0;
- } else {
+ if (rc != 0) {
dev_err(&pdev->dev, "no suitable DMA available\n");
goto clean3; /* shost, pci, lu, aer/h */
}
@@ -9298,10 +9288,9 @@ static int hpsa_enter_performant_mode(struct ctlr_info *h, u32 trans_support)
} else if (trans_support & CFGTBL_Trans_io_accel2) {
u64 cfg_offset, cfg_base_addr_index;
u32 bft2_offset, cfg_base_addr;
- int rc;
- rc = hpsa_find_cfg_addrs(h->pdev, h->vaddr, &cfg_base_addr,
- &cfg_base_addr_index, &cfg_offset);
+ hpsa_find_cfg_addrs(h->pdev, h->vaddr, &cfg_base_addr,
+ &cfg_base_addr_index, &cfg_offset);
BUILD_BUG_ON(offsetof(struct io_accel2_cmd, sg) != 64);
bft2[15] = h->ioaccel_maxsg + HPSA_IOACCEL2_HEADER_SZ;
calc_bucket_map(bft2, ARRAY_SIZE(bft2), h->ioaccel_maxsg,
--
2.25.1
^ permalink raw reply related [flat|nested] 26+ messages in thread* Re: [RESEND 19/19] scsi: hpsa: Strip out a bunch of set but unused variables
2020-11-02 14:23 ` [RESEND 19/19] scsi: hpsa: Strip out a bunch of set but unused variables Lee Jones
@ 2020-11-03 21:27 ` kernel test robot
2020-11-04 7:43 ` Lee Jones
2020-11-04 8:38 ` kernel test robot
2020-11-12 10:19 ` [PATCH v2 " Lee Jones
2 siblings, 1 reply; 26+ messages in thread
From: kernel test robot @ 2020-11-03 21:27 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 22372 bytes --]
Hi Lee,
I love your patch! Perhaps something to improve:
[auto build test WARNING on mkp-scsi/for-next]
[also build test WARNING on scsi/for-next linus/master v5.10-rc2 next-20201103]
[cannot apply to linux/master]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Lee-Jones/Rid-W-1-warnings-in-SCSI/20201102-222943
base: https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
config: s390-randconfig-r015-20201103 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 1fcd5d5655e29f85e12b402e32974f207cfedf32)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install s390 cross compiling tool for clang build
# apt-get install binutils-s390x-linux-gnu
# https://github.com/0day-ci/linux/commit/072f10ed00f6c539280c1143a76e724bd7618c22
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Lee-Jones/Rid-W-1-warnings-in-SCSI/20201102-222943
git checkout 072f10ed00f6c539280c1143a76e724bd7618c22
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=s390
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : \
^
include/uapi/linux/swab.h:19:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0x000000ffUL) << 24) | \
^
In file included from drivers/scsi/hpsa.c:24:
In file included from include/linux/pci.h:39:
In file included from include/linux/io.h:13:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : \
^
include/uapi/linux/swab.h:20:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0x0000ff00UL) << 8) | \
^
In file included from drivers/scsi/hpsa.c:24:
In file included from include/linux/pci.h:39:
In file included from include/linux/io.h:13:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : \
^
include/uapi/linux/swab.h:21:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0x00ff0000UL) >> 8) | \
^
In file included from drivers/scsi/hpsa.c:24:
In file included from include/linux/pci.h:39:
In file included from include/linux/io.h:13:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : \
^
include/uapi/linux/swab.h:22:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0xff000000UL) >> 24)))
^
In file included from drivers/scsi/hpsa.c:24:
In file included from include/linux/pci.h:39:
In file included from include/linux/io.h:13:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:120:12: note: expanded from macro '__swab32'
__fswab32(x))
^
In file included from drivers/scsi/hpsa.c:24:
In file included from include/linux/pci.h:39:
In file included from include/linux/io.h:13:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:501:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writeb(value, PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:511:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:521:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:609:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:617:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:625:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:634:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:643:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:652:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
>> drivers/scsi/hpsa.c:8710:3: warning: misleading indentation; statement is not part of the previous 'if' [-Wmisleading-indentation]
if (rc != 0) {
^
drivers/scsi/hpsa.c:8708:2: note: previous statement is here
if (rc != 0)
^
drivers/scsi/hpsa.c:8635:16: warning: unused variable 'flags' [-Wunused-variable]
unsigned long flags;
^
drivers/scsi/hpsa.c:8712:9: error: use of undeclared label 'clean3'
goto clean3; /* shost, pci, lu, aer/h */
^
drivers/scsi/hpsa.c:8688:8: error: use of undeclared label 'clean1'
goto clean1; /* aer/h */
^
drivers/scsi/hpsa.c:8700:8: error: use of undeclared label 'clean2_5'
goto clean2_5; /* pci, lu, aer/h */
^
drivers/scsi/hpsa.c:8694:8: error: use of undeclared label 'clean2'
goto clean2; /* lu, aer/h */
^
drivers/scsi/hpsa.c:8707:32: warning: shift count >= width of type [-Wshift-count-overflow]
rc = dma_set_mask(&pdev->dev, DMA_BIT_MASK(64));
^~~~~~~~~~~~~~~~
include/linux/dma-mapping.h:76:54: note: expanded from macro 'DMA_BIT_MASK'
#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
^ ~~~
drivers/scsi/hpsa.c:8717:2: error: unknown type name 'h'
h->access.set_intr_mask(h, HPSA_INTR_OFF);
^
drivers/scsi/hpsa.c:8717:3: error: expected identifier or '('
h->access.set_intr_mask(h, HPSA_INTR_OFF);
^
>> drivers/scsi/hpsa.c:8719:2: warning: declaration specifier missing, defaulting to 'int'
rc = hpsa_request_irqs(h, do_hpsa_intr_msi, do_hpsa_intr_intx);
^
int
drivers/scsi/hpsa.c:8719:25: error: use of undeclared identifier 'h'
rc = hpsa_request_irqs(h, do_hpsa_intr_msi, do_hpsa_intr_intx);
^
drivers/scsi/hpsa.c:8720:2: error: expected identifier or '('
if (rc)
^
drivers/scsi/hpsa.c:8722:2: warning: declaration specifier missing, defaulting to 'int'
rc = hpsa_alloc_cmd_pool(h);
^
int
drivers/scsi/hpsa.c:8722:27: error: use of undeclared identifier 'h'
rc = hpsa_alloc_cmd_pool(h);
^
drivers/scsi/hpsa.c:8723:2: error: expected identifier or '('
if (rc)
^
drivers/scsi/hpsa.c:8725:2: warning: declaration specifier missing, defaulting to 'int'
rc = hpsa_alloc_sg_chain_blocks(h);
^
int
drivers/scsi/hpsa.c:8725:34: error: use of undeclared identifier 'h'
rc = hpsa_alloc_sg_chain_blocks(h);
^
drivers/scsi/hpsa.c:8726:2: error: expected identifier or '('
if (rc)
^
drivers/scsi/hpsa.c:8728:2: error: expected identifier or '('
init_waitqueue_head(&h->scan_wait_queue);
^
include/linux/wait.h:66:2: note: expanded from macro 'init_waitqueue_head'
do { \
^
drivers/scsi/hpsa.c:8728:2: error: expected identifier or '('
include/linux/wait.h:70:4: note: expanded from macro 'init_waitqueue_head'
} while (0)
^
drivers/scsi/hpsa.c:8729:2: error: expected identifier or '('
init_waitqueue_head(&h->event_sync_wait_queue);
^
include/linux/wait.h:66:2: note: expanded from macro 'init_waitqueue_head'
do { \
^
drivers/scsi/hpsa.c:8729:2: error: expected identifier or '('
include/linux/wait.h:70:4: note: expanded from macro 'init_waitqueue_head'
} while (0)
^
drivers/scsi/hpsa.c:8730:2: error: expected identifier or '('
mutex_init(&h->reset_mutex);
^
include/linux/mutex.h:115:32: note: expanded from macro 'mutex_init'
#define mutex_init(mutex) \
^
drivers/scsi/hpsa.c:8730:2: error: expected identifier or '('
include/linux/mutex.h:120:3: note: expanded from macro 'mutex_init'
} while (0)
^
drivers/scsi/hpsa.c:8731:2: error: unknown type name 'h'
h->scan_finished = 1; /* no scan currently in progress */
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
26 warnings and 20 errors generated.
vim +/if +8710 drivers/scsi/hpsa.c
8629
8630 static int hpsa_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
8631 {
8632 int rc;
8633 struct ctlr_info *h;
8634 int try_soft_reset = 0;
8635 unsigned long flags;
8636 u32 board_id;
8637
8638 if (number_of_controllers == 0)
8639 printk(KERN_INFO DRIVER_NAME "\n");
8640
8641 rc = hpsa_lookup_board_id(pdev, &board_id, NULL);
8642 if (rc < 0) {
8643 dev_warn(&pdev->dev, "Board ID not found\n");
8644 return rc;
8645 }
8646
8647 rc = hpsa_init_reset_devices(pdev, board_id);
8648 if (rc) {
8649 if (rc != -ENOTSUPP)
8650 return rc;
8651 /* If the reset fails in a particular way (it has no way to do
8652 * a proper hard reset, so returns -ENOTSUPP) we can try to do
8653 * a soft reset once we get the controller configured up to the
8654 * point that it can accept a command.
8655 */
8656 try_soft_reset = 1;
8657 rc = 0;
8658 }
8659
8660 reinit_after_soft_reset:
8661
8662 /* Command structures must be aligned on a 32-byte boundary because
8663 * the 5 lower bits of the address are used by the hardware. and by
8664 * the driver. See comments in hpsa.h for more info.
8665 */
8666 BUILD_BUG_ON(sizeof(struct CommandList) % COMMANDLIST_ALIGNMENT);
8667 h = hpda_alloc_ctlr_info();
8668 if (!h) {
8669 dev_err(&pdev->dev, "Failed to allocate controller head\n");
8670 return -ENOMEM;
8671 }
8672
8673 h->pdev = pdev;
8674
8675 h->intr_mode = hpsa_simple_mode ? SIMPLE_MODE_INT : PERF_MODE_INT;
8676 INIT_LIST_HEAD(&h->offline_device_list);
8677 spin_lock_init(&h->lock);
8678 spin_lock_init(&h->offline_device_lock);
8679 spin_lock_init(&h->scan_lock);
8680 spin_lock_init(&h->reset_lock);
8681 atomic_set(&h->passthru_cmds_avail, HPSA_MAX_CONCURRENT_PASSTHRUS);
8682
8683 /* Allocate and clear per-cpu variable lockup_detected */
8684 h->lockup_detected = alloc_percpu(u32);
8685 if (!h->lockup_detected) {
8686 dev_err(&h->pdev->dev, "Failed to allocate lockup detector\n");
8687 rc = -ENOMEM;
8688 goto clean1; /* aer/h */
8689 }
8690 set_lockup_detected_for_all_cpus(h, 0);
8691
8692 rc = hpsa_pci_init(h);
8693 if (rc)
8694 goto clean2; /* lu, aer/h */
8695
8696 /* relies on h-> settings made by hpsa_pci_init, including
8697 * interrupt_mode h->intr */
8698 rc = hpsa_scsi_host_alloc(h);
8699 if (rc)
8700 goto clean2_5; /* pci, lu, aer/h */
8701
8702 sprintf(h->devname, HPSA "%d", h->scsi_host->host_no);
8703 h->ctlr = number_of_controllers;
8704 number_of_controllers++;
8705
8706 /* configure PCI DMA stuff */
8707 rc = dma_set_mask(&pdev->dev, DMA_BIT_MASK(64));
8708 if (rc != 0)
8709 rc = dma_set_mask(&pdev->dev, DMA_BIT_MASK(32));
> 8710 if (rc != 0) {
8711 dev_err(&pdev->dev, "no suitable DMA available\n");
8712 goto clean3; /* shost, pci, lu, aer/h */
8713 }
8714 }
8715
8716 /* make sure the board interrupts are off */
8717 h->access.set_intr_mask(h, HPSA_INTR_OFF);
8718
> 8719 rc = hpsa_request_irqs(h, do_hpsa_intr_msi, do_hpsa_intr_intx);
8720 if (rc)
8721 goto clean3; /* shost, pci, lu, aer/h */
8722 rc = hpsa_alloc_cmd_pool(h);
8723 if (rc)
8724 goto clean4; /* irq, shost, pci, lu, aer/h */
8725 rc = hpsa_alloc_sg_chain_blocks(h);
8726 if (rc)
8727 goto clean5; /* cmd, irq, shost, pci, lu, aer/h */
8728 init_waitqueue_head(&h->scan_wait_queue);
8729 init_waitqueue_head(&h->event_sync_wait_queue);
8730 mutex_init(&h->reset_mutex);
8731 h->scan_finished = 1; /* no scan currently in progress */
8732 h->scan_waiting = 0;
8733
8734 pci_set_drvdata(pdev, h);
8735 h->ndevices = 0;
8736
8737 spin_lock_init(&h->devlock);
8738 rc = hpsa_put_ctlr_into_performant_mode(h);
8739 if (rc)
8740 goto clean6; /* sg, cmd, irq, shost, pci, lu, aer/h */
8741
8742 /* create the resubmit workqueue */
8743 h->rescan_ctlr_wq = hpsa_create_controller_wq(h, "rescan");
8744 if (!h->rescan_ctlr_wq) {
8745 rc = -ENOMEM;
8746 goto clean7;
8747 }
8748
8749 h->resubmit_wq = hpsa_create_controller_wq(h, "resubmit");
8750 if (!h->resubmit_wq) {
8751 rc = -ENOMEM;
8752 goto clean7; /* aer/h */
8753 }
8754
8755 h->monitor_ctlr_wq = hpsa_create_controller_wq(h, "monitor");
8756 if (!h->monitor_ctlr_wq) {
8757 rc = -ENOMEM;
8758 goto clean7;
8759 }
8760
8761 /*
8762 * At this point, the controller is ready to take commands.
8763 * Now, if reset_devices and the hard reset didn't work, try
8764 * the soft reset and see if that works.
8765 */
8766 if (try_soft_reset) {
8767
8768 /* This is kind of gross. We may or may not get a completion
8769 * from the soft reset command, and if we do, then the value
8770 * from the fifo may or may not be valid. So, we wait 10 secs
8771 * after the reset throwing away any completions we get during
8772 * that time. Unregister the interrupt handler and register
8773 * fake ones to scoop up any residual completions.
8774 */
8775 spin_lock_irqsave(&h->lock, flags);
8776 h->access.set_intr_mask(h, HPSA_INTR_OFF);
8777 spin_unlock_irqrestore(&h->lock, flags);
8778 hpsa_free_irqs(h);
8779 rc = hpsa_request_irqs(h, hpsa_msix_discard_completions,
8780 hpsa_intx_discard_completions);
8781 if (rc) {
8782 dev_warn(&h->pdev->dev,
8783 "Failed to request_irq after soft reset.\n");
8784 /*
8785 * cannot goto clean7 or free_irqs will be called
8786 * again. Instead, do its work
8787 */
8788 hpsa_free_performant_mode(h); /* clean7 */
8789 hpsa_free_sg_chain_blocks(h); /* clean6 */
8790 hpsa_free_cmd_pool(h); /* clean5 */
8791 /*
8792 * skip hpsa_free_irqs(h) clean4 since that
8793 * was just called before request_irqs failed
8794 */
8795 goto clean3;
8796 }
8797
8798 rc = hpsa_kdump_soft_reset(h);
8799 if (rc)
8800 /* Neither hard nor soft reset worked, we're hosed. */
8801 goto clean7;
8802
8803 dev_info(&h->pdev->dev, "Board READY.\n");
8804 dev_info(&h->pdev->dev,
8805 "Waiting for stale completions to drain.\n");
8806 h->access.set_intr_mask(h, HPSA_INTR_ON);
8807 msleep(10000);
8808 h->access.set_intr_mask(h, HPSA_INTR_OFF);
8809
8810 rc = controller_reset_failed(h->cfgtable);
8811 if (rc)
8812 dev_info(&h->pdev->dev,
8813 "Soft reset appears to have failed.\n");
8814
8815 /* since the controller's reset, we have to go back and re-init
8816 * everything. Easiest to just forget what we've done and do it
8817 * all over again.
8818 */
8819 hpsa_undo_allocations_after_kdump_soft_reset(h);
8820 try_soft_reset = 0;
8821 if (rc)
8822 /* don't goto clean, we already unallocated */
8823 return -ENODEV;
8824
8825 goto reinit_after_soft_reset;
8826 }
8827
8828 /* Enable Accelerated IO path at driver layer */
8829 h->acciopath_status = 1;
8830 /* Disable discovery polling.*/
8831 h->discovery_polling = 0;
8832
8833
8834 /* Turn the interrupts on so we can service requests */
8835 h->access.set_intr_mask(h, HPSA_INTR_ON);
8836
8837 hpsa_hba_inquiry(h);
8838
8839 h->lastlogicals = kzalloc(sizeof(*(h->lastlogicals)), GFP_KERNEL);
8840 if (!h->lastlogicals)
8841 dev_info(&h->pdev->dev,
8842 "Can't track change to report lun data\n");
8843
8844 /* hook into SCSI subsystem */
8845 rc = hpsa_scsi_add_host(h);
8846 if (rc)
8847 goto clean7; /* perf, sg, cmd, irq, shost, pci, lu, aer/h */
8848
8849 /* Monitor the controller for firmware lockups */
8850 h->heartbeat_sample_interval = HEARTBEAT_SAMPLE_INTERVAL;
8851 INIT_DELAYED_WORK(&h->monitor_ctlr_work, hpsa_monitor_ctlr_worker);
8852 schedule_delayed_work(&h->monitor_ctlr_work,
8853 h->heartbeat_sample_interval);
8854 INIT_DELAYED_WORK(&h->rescan_ctlr_work, hpsa_rescan_ctlr_worker);
8855 queue_delayed_work(h->rescan_ctlr_wq, &h->rescan_ctlr_work,
8856 h->heartbeat_sample_interval);
8857 INIT_DELAYED_WORK(&h->event_monitor_work, hpsa_event_monitor_worker);
8858 schedule_delayed_work(&h->event_monitor_work,
8859 HPSA_EVENT_MONITOR_INTERVAL);
8860 return 0;
8861
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 27778 bytes --]
^ permalink raw reply [flat|nested] 26+ messages in thread* Re: [RESEND 19/19] scsi: hpsa: Strip out a bunch of set but unused variables
2020-11-03 21:27 ` kernel test robot
@ 2020-11-04 7:43 ` Lee Jones
0 siblings, 0 replies; 26+ messages in thread
From: Lee Jones @ 2020-11-04 7:43 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 2511 bytes --]
On Wed, 04 Nov 2020, kernel test robot wrote:
> Hi Lee,
>
> I love your patch! Perhaps something to improve:
>
> [auto build test WARNING on mkp-scsi/for-next]
> [also build test WARNING on scsi/for-next linus/master v5.10-rc2 next-20201103]
> [cannot apply to linux/master]
> [If your patch is applied to the wrong git tree, kindly drop us a note.
> And when submitting patch, we suggest to use '--base' as documented in
> https://git-scm.com/docs/git-format-patch]
>
> url: https://github.com/0day-ci/linux/commits/Lee-Jones/Rid-W-1-warnings-in-SCSI/20201102-222943
> base: https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
> config: s390-randconfig-r015-20201103 (attached as .config)
> compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 1fcd5d5655e29f85e12b402e32974f207cfedf32)
> reproduce (this is a W=1 build):
> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> # install s390 cross compiling tool for clang build
> # apt-get install binutils-s390x-linux-gnu
> # https://github.com/0day-ci/linux/commit/072f10ed00f6c539280c1143a76e724bd7618c22
> git remote add linux-review https://github.com/0day-ci/linux
> git fetch --no-tags linux-review Lee-Jones/Rid-W-1-warnings-in-SCSI/20201102-222943
> git checkout 072f10ed00f6c539280c1143a76e724bd7618c22
> # save the attached .config to linux build tree
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=s390
[...]
> 8706 /* configure PCI DMA stuff */
> 8707 rc = dma_set_mask(&pdev->dev, DMA_BIT_MASK(64));
> 8708 if (rc != 0)
Ah, missing brace.
I wonder why my own compiler didn't complain.
Will fix.
> 8709 rc = dma_set_mask(&pdev->dev, DMA_BIT_MASK(32));
> > 8710 if (rc != 0) {
> 8711 dev_err(&pdev->dev, "no suitable DMA available\n");
> 8712 goto clean3; /* shost, pci, lu, aer/h */
> 8713 }
> 8714 }
> 8715
> 8716 /* make sure the board interrupts are off */
> 8717 h->access.set_intr_mask(h, HPSA_INTR_OFF);
> 8718
> > 8719 rc = hpsa_request_irqs(h, do_hpsa_intr_msi, do_hpsa_intr_intx);
> 8720 if (rc)
> 8721 goto clean3; /* shost, pci, lu, aer/h */
--
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [RESEND 19/19] scsi: hpsa: Strip out a bunch of set but unused variables
2020-11-02 14:23 ` [RESEND 19/19] scsi: hpsa: Strip out a bunch of set but unused variables Lee Jones
2020-11-03 21:27 ` kernel test robot
@ 2020-11-04 8:38 ` kernel test robot
2020-11-12 10:19 ` [PATCH v2 " Lee Jones
2 siblings, 0 replies; 26+ messages in thread
From: kernel test robot @ 2020-11-04 8:38 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 39709 bytes --]
Hi Lee,
I love your patch! Yet something to improve:
[auto build test ERROR on mkp-scsi/for-next]
[also build test ERROR on scsi/for-next linus/master v5.10-rc2 next-20201103]
[cannot apply to linux/master]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Lee-Jones/Rid-W-1-warnings-in-SCSI/20201102-222943
base: https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
config: x86_64-rhel (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/0day-ci/linux/commit/072f10ed00f6c539280c1143a76e724bd7618c22
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Lee-Jones/Rid-W-1-warnings-in-SCSI/20201102-222943
git checkout 072f10ed00f6c539280c1143a76e724bd7618c22
# save the attached .config to linux build tree
make W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
drivers/scsi/hpsa.c: In function 'hpsa_init_one':
drivers/scsi/hpsa.c:8708:2: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
8708 | if (rc != 0)
| ^~
drivers/scsi/hpsa.c:8710:3: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
8710 | if (rc != 0) {
| ^~
>> drivers/scsi/hpsa.c:8712:4: error: label 'clean3' used but not defined
8712 | goto clean3; /* shost, pci, lu, aer/h */
| ^~~~
>> drivers/scsi/hpsa.c:8700:3: error: label 'clean2_5' used but not defined
8700 | goto clean2_5; /* pci, lu, aer/h */
| ^~~~
>> drivers/scsi/hpsa.c:8694:3: error: label 'clean2' used but not defined
8694 | goto clean2; /* lu, aer/h */
| ^~~~
>> drivers/scsi/hpsa.c:8688:3: error: label 'clean1' used but not defined
8688 | goto clean1; /* aer/h */
| ^~~~
drivers/scsi/hpsa.c:8660:1: warning: label 'reinit_after_soft_reset' defined but not used [-Wunused-label]
8660 | reinit_after_soft_reset:
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/scsi/hpsa.c:8635:16: warning: unused variable 'flags' [-Wunused-variable]
8635 | unsigned long flags;
| ^~~~~
drivers/scsi/hpsa.c:8634:6: warning: variable 'try_soft_reset' set but not used [-Wunused-but-set-variable]
8634 | int try_soft_reset = 0;
| ^~~~~~~~~~~~~~
drivers/scsi/hpsa.c: At top level:
>> drivers/scsi/hpsa.c:8717:3: error: expected '=', ',', ';', 'asm' or '__attribute__' before '->' token
8717 | h->access.set_intr_mask(h, HPSA_INTR_OFF);
| ^~
drivers/scsi/hpsa.c:8719:2: warning: data definition has no type or storage class
8719 | rc = hpsa_request_irqs(h, do_hpsa_intr_msi, do_hpsa_intr_intx);
| ^~
>> drivers/scsi/hpsa.c:8719:2: error: type defaults to 'int' in declaration of 'rc' [-Werror=implicit-int]
>> drivers/scsi/hpsa.c:8719:25: error: 'h' undeclared here (not in a function)
8719 | rc = hpsa_request_irqs(h, do_hpsa_intr_msi, do_hpsa_intr_intx);
| ^
>> drivers/scsi/hpsa.c:8720:2: error: expected identifier or '(' before 'if'
8720 | if (rc)
| ^~
drivers/scsi/hpsa.c:8722:2: warning: data definition has no type or storage class
8722 | rc = hpsa_alloc_cmd_pool(h);
| ^~
drivers/scsi/hpsa.c:8722:2: error: type defaults to 'int' in declaration of 'rc' [-Werror=implicit-int]
>> drivers/scsi/hpsa.c:8722:2: error: redefinition of 'rc'
drivers/scsi/hpsa.c:8719:2: note: previous definition of 'rc' was here
8719 | rc = hpsa_request_irqs(h, do_hpsa_intr_msi, do_hpsa_intr_intx);
| ^~
drivers/scsi/hpsa.c:8723:2: error: expected identifier or '(' before 'if'
8723 | if (rc)
| ^~
drivers/scsi/hpsa.c:8725:2: warning: data definition has no type or storage class
8725 | rc = hpsa_alloc_sg_chain_blocks(h);
| ^~
drivers/scsi/hpsa.c:8725:2: error: type defaults to 'int' in declaration of 'rc' [-Werror=implicit-int]
drivers/scsi/hpsa.c:8725:2: error: redefinition of 'rc'
drivers/scsi/hpsa.c:8719:2: note: previous definition of 'rc' was here
8719 | rc = hpsa_request_irqs(h, do_hpsa_intr_msi, do_hpsa_intr_intx);
| ^~
drivers/scsi/hpsa.c:8726:2: error: expected identifier or '(' before 'if'
8726 | if (rc)
| ^~
In file included from include/linux/mmzone.h:10,
from include/linux/gfp.h:6,
from include/linux/umh.h:4,
from include/linux/kmod.h:9,
from include/linux/module.h:16,
from drivers/scsi/hpsa.c:21:
>> include/linux/wait.h:66:2: error: expected identifier or '(' before 'do'
66 | do { \
| ^~
drivers/scsi/hpsa.c:8728:2: note: in expansion of macro 'init_waitqueue_head'
8728 | init_waitqueue_head(&h->scan_wait_queue);
| ^~~~~~~~~~~~~~~~~~~
>> include/linux/wait.h:70:4: error: expected identifier or '(' before 'while'
70 | } while (0)
| ^~~~~
drivers/scsi/hpsa.c:8728:2: note: in expansion of macro 'init_waitqueue_head'
8728 | init_waitqueue_head(&h->scan_wait_queue);
| ^~~~~~~~~~~~~~~~~~~
>> include/linux/wait.h:66:2: error: expected identifier or '(' before 'do'
66 | do { \
| ^~
drivers/scsi/hpsa.c:8729:2: note: in expansion of macro 'init_waitqueue_head'
8729 | init_waitqueue_head(&h->event_sync_wait_queue);
| ^~~~~~~~~~~~~~~~~~~
>> include/linux/wait.h:70:4: error: expected identifier or '(' before 'while'
70 | } while (0)
| ^~~~~
drivers/scsi/hpsa.c:8729:2: note: in expansion of macro 'init_waitqueue_head'
8729 | init_waitqueue_head(&h->event_sync_wait_queue);
| ^~~~~~~~~~~~~~~~~~~
In file included from include/linux/seqlock.h:19,
from include/linux/mmzone.h:16,
from include/linux/gfp.h:6,
from include/linux/umh.h:4,
from include/linux/kmod.h:9,
from include/linux/module.h:16,
from drivers/scsi/hpsa.c:21:
>> include/linux/mutex.h:116:1: error: expected identifier or '(' before 'do'
116 | do { \
| ^~
drivers/scsi/hpsa.c:8730:2: note: in expansion of macro 'mutex_init'
8730 | mutex_init(&h->reset_mutex);
| ^~~~~~~~~~
>> include/linux/mutex.h:120:3: error: expected identifier or '(' before 'while'
120 | } while (0)
| ^~~~~
drivers/scsi/hpsa.c:8730:2: note: in expansion of macro 'mutex_init'
8730 | mutex_init(&h->reset_mutex);
| ^~~~~~~~~~
drivers/scsi/hpsa.c:8731:3: error: expected '=', ',', ';', 'asm' or '__attribute__' before '->' token
8731 | h->scan_finished = 1; /* no scan currently in progress */
| ^~
drivers/scsi/hpsa.c:8732:3: error: expected '=', ',', ';', 'asm' or '__attribute__' before '->' token
8732 | h->scan_waiting = 0;
| ^~
drivers/scsi/hpsa.c:8734:2: warning: data definition has no type or storage class
8734 | pci_set_drvdata(pdev, h);
| ^~~~~~~~~~~~~~~
>> drivers/scsi/hpsa.c:8734:2: error: type defaults to 'int' in declaration of 'pci_set_drvdata' [-Werror=implicit-int]
drivers/scsi/hpsa.c:8734:2: warning: parameter names (without types) in function declaration
>> drivers/scsi/hpsa.c:8734:2: error: conflicting types for 'pci_set_drvdata'
In file included from drivers/scsi/hpsa.c:24:
include/linux/pci.h:1870:20: note: previous definition of 'pci_set_drvdata' was here
1870 | static inline void pci_set_drvdata(struct pci_dev *pdev, void *data)
| ^~~~~~~~~~~~~~~
drivers/scsi/hpsa.c:8735:3: error: expected '=', ',', ';', 'asm' or '__attribute__' before '->' token
8735 | h->ndevices = 0;
| ^~
In file included from include/linux/mmzone.h:8,
from include/linux/gfp.h:6,
from include/linux/umh.h:4,
from include/linux/kmod.h:9,
from include/linux/module.h:16,
from drivers/scsi/hpsa.c:21:
>> include/linux/spinlock.h:345:1: error: expected identifier or '(' before 'do'
345 | do { \
| ^~
drivers/scsi/hpsa.c:8737:2: note: in expansion of macro 'spin_lock_init'
8737 | spin_lock_init(&h->devlock);
| ^~~~~~~~~~~~~~
>> include/linux/spinlock.h:348:3: error: expected identifier or '(' before 'while'
348 | } while (0)
| ^~~~~
drivers/scsi/hpsa.c:8737:2: note: in expansion of macro 'spin_lock_init'
8737 | spin_lock_init(&h->devlock);
| ^~~~~~~~~~~~~~
drivers/scsi/hpsa.c:8738:2: warning: data definition has no type or storage class
8738 | rc = hpsa_put_ctlr_into_performant_mode(h);
| ^~
drivers/scsi/hpsa.c:8738:2: error: type defaults to 'int' in declaration of 'rc' [-Werror=implicit-int]
drivers/scsi/hpsa.c:8738:2: error: redefinition of 'rc'
drivers/scsi/hpsa.c:8719:2: note: previous definition of 'rc' was here
8719 | rc = hpsa_request_irqs(h, do_hpsa_intr_msi, do_hpsa_intr_intx);
| ^~
drivers/scsi/hpsa.c:8739:2: error: expected identifier or '(' before 'if'
8739 | if (rc)
| ^~
drivers/scsi/hpsa.c:8743:3: error: expected '=', ',', ';', 'asm' or '__attribute__' before '->' token
8743 | h->rescan_ctlr_wq = hpsa_create_controller_wq(h, "rescan");
| ^~
drivers/scsi/hpsa.c:8744:2: error: expected identifier or '(' before 'if'
8744 | if (!h->rescan_ctlr_wq) {
| ^~
drivers/scsi/hpsa.c:8749:3: error: expected '=', ',', ';', 'asm' or '__attribute__' before '->' token
8749 | h->resubmit_wq = hpsa_create_controller_wq(h, "resubmit");
| ^~
drivers/scsi/hpsa.c:8750:2: error: expected identifier or '(' before 'if'
8750 | if (!h->resubmit_wq) {
| ^~
drivers/scsi/hpsa.c:8755:3: error: expected '=', ',', ';', 'asm' or '__attribute__' before '->' token
8755 | h->monitor_ctlr_wq = hpsa_create_controller_wq(h, "monitor");
| ^~
drivers/scsi/hpsa.c:8756:2: error: expected identifier or '(' before 'if'
8756 | if (!h->monitor_ctlr_wq) {
| ^~
drivers/scsi/hpsa.c:8766:2: error: expected identifier or '(' before 'if'
8766 | if (try_soft_reset) {
| ^~
drivers/scsi/hpsa.c:8829:3: error: expected '=', ',', ';', 'asm' or '__attribute__' before '->' token
8829 | h->acciopath_status = 1;
| ^~
drivers/scsi/hpsa.c:8831:3: error: expected '=', ',', ';', 'asm' or '__attribute__' before '->' token
8831 | h->discovery_polling = 0;
| ^~
drivers/scsi/hpsa.c:8835:3: error: expected '=', ',', ';', 'asm' or '__attribute__' before '->' token
8835 | h->access.set_intr_mask(h, HPSA_INTR_ON);
| ^~
drivers/scsi/hpsa.c:8837:2: warning: data definition has no type or storage class
8837 | hpsa_hba_inquiry(h);
| ^~~~~~~~~~~~~~~~
>> drivers/scsi/hpsa.c:8837:2: error: type defaults to 'int' in declaration of 'hpsa_hba_inquiry' [-Werror=implicit-int]
drivers/scsi/hpsa.c:8837:2: warning: parameter names (without types) in function declaration
drivers/scsi/hpsa.c:8837:2: error: conflicting types for 'hpsa_hba_inquiry'
drivers/scsi/hpsa.c:7917:13: note: previous definition of 'hpsa_hba_inquiry' was here
7917 | static void hpsa_hba_inquiry(struct ctlr_info *h)
| ^~~~~~~~~~~~~~~~
drivers/scsi/hpsa.c:8839:3: error: expected '=', ',', ';', 'asm' or '__attribute__' before '->' token
8839 | h->lastlogicals = kzalloc(sizeof(*(h->lastlogicals)), GFP_KERNEL);
| ^~
drivers/scsi/hpsa.c:8840:2: error: expected identifier or '(' before 'if'
8840 | if (!h->lastlogicals)
| ^~
drivers/scsi/hpsa.c:8845:2: warning: data definition has no type or storage class
8845 | rc = hpsa_scsi_add_host(h);
| ^~
drivers/scsi/hpsa.c:8845:2: error: type defaults to 'int' in declaration of 'rc' [-Werror=implicit-int]
drivers/scsi/hpsa.c:8845:2: error: redefinition of 'rc'
drivers/scsi/hpsa.c:8719:2: note: previous definition of 'rc' was here
8719 | rc = hpsa_request_irqs(h, do_hpsa_intr_msi, do_hpsa_intr_intx);
| ^~
drivers/scsi/hpsa.c:8846:2: error: expected identifier or '(' before 'if'
8846 | if (rc)
| ^~
drivers/scsi/hpsa.c:8850:3: error: expected '=', ',', ';', 'asm' or '__attribute__' before '->' token
8850 | h->heartbeat_sample_interval = HEARTBEAT_SAMPLE_INTERVAL;
| ^~
In file included from include/linux/srcu.h:21,
from include/linux/notifier.h:16,
from arch/x86/include/asm/uprobes.h:13,
from include/linux/uprobes.h:49,
from include/linux/mm_types.h:14,
from include/linux/mmzone.h:21,
from include/linux/gfp.h:6,
from include/linux/umh.h:4,
from include/linux/kmod.h:9,
from include/linux/module.h:16,
from drivers/scsi/hpsa.c:21:
include/linux/workqueue.h:256:2: error: expected identifier or '(' before 'do'
256 | do { \
| ^~
include/linux/workqueue.h:272:2: note: in expansion of macro '__INIT_DELAYED_WORK'
272 | __INIT_DELAYED_WORK(_work, _func, 0)
| ^~~~~~~~~~~~~~~~~~~
drivers/scsi/hpsa.c:8851:2: note: in expansion of macro 'INIT_DELAYED_WORK'
8851 | INIT_DELAYED_WORK(&h->monitor_ctlr_work, hpsa_monitor_ctlr_worker);
| ^~~~~~~~~~~~~~~~~
include/linux/workqueue.h:261:4: error: expected identifier or '(' before 'while'
261 | } while (0)
| ^~~~~
include/linux/workqueue.h:272:2: note: in expansion of macro '__INIT_DELAYED_WORK'
272 | __INIT_DELAYED_WORK(_work, _func, 0)
| ^~~~~~~~~~~~~~~~~~~
drivers/scsi/hpsa.c:8851:2: note: in expansion of macro 'INIT_DELAYED_WORK'
8851 | INIT_DELAYED_WORK(&h->monitor_ctlr_work, hpsa_monitor_ctlr_worker);
| ^~~~~~~~~~~~~~~~~
drivers/scsi/hpsa.c:8852:24: error: expected declaration specifiers or '...' before '&' token
8852 | schedule_delayed_work(&h->monitor_ctlr_work,
| ^
drivers/scsi/hpsa.c:8853:5: error: expected declaration specifiers or '...' before 'h'
8853 | h->heartbeat_sample_interval);
| ^
In file included from include/linux/srcu.h:21,
from include/linux/notifier.h:16,
from arch/x86/include/asm/uprobes.h:13,
from include/linux/uprobes.h:49,
from include/linux/mm_types.h:14,
from include/linux/mmzone.h:21,
from include/linux/gfp.h:6,
from include/linux/umh.h:4,
from include/linux/kmod.h:9,
from include/linux/module.h:16,
from drivers/scsi/hpsa.c:21:
include/linux/workqueue.h:256:2: error: expected identifier or '(' before 'do'
256 | do { \
| ^~
include/linux/workqueue.h:272:2: note: in expansion of macro '__INIT_DELAYED_WORK'
272 | __INIT_DELAYED_WORK(_work, _func, 0)
| ^~~~~~~~~~~~~~~~~~~
drivers/scsi/hpsa.c:8854:2: note: in expansion of macro 'INIT_DELAYED_WORK'
8854 | INIT_DELAYED_WORK(&h->rescan_ctlr_work, hpsa_rescan_ctlr_worker);
| ^~~~~~~~~~~~~~~~~
include/linux/workqueue.h:261:4: error: expected identifier or '(' before 'while'
261 | } while (0)
| ^~~~~
include/linux/workqueue.h:272:2: note: in expansion of macro '__INIT_DELAYED_WORK'
272 | __INIT_DELAYED_WORK(_work, _func, 0)
| ^~~~~~~~~~~~~~~~~~~
drivers/scsi/hpsa.c:8854:2: note: in expansion of macro 'INIT_DELAYED_WORK'
8854 | INIT_DELAYED_WORK(&h->rescan_ctlr_work, hpsa_rescan_ctlr_worker);
| ^~~~~~~~~~~~~~~~~
drivers/scsi/hpsa.c:8855:22: error: expected ')' before '->' token
8855 | queue_delayed_work(h->rescan_ctlr_wq, &h->rescan_ctlr_work,
| ^~
| )
In file included from include/linux/srcu.h:21,
from include/linux/notifier.h:16,
from arch/x86/include/asm/uprobes.h:13,
from include/linux/uprobes.h:49,
from include/linux/mm_types.h:14,
from include/linux/mmzone.h:21,
from include/linux/gfp.h:6,
vim +/clean3 +8712 drivers/scsi/hpsa.c
8b834bff1b73dce Ming Lei 2018-03-13 8629
6f039790510fd63 Greg Kroah-Hartman 2012-12-21 8630 static int hpsa_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
4c2a8c40d877eff Stephen M. Cameron 2010-06-16 8631 {
072f10ed00f6c53 Lee Jones 2020-11-02 8632 int rc;
4c2a8c40d877eff Stephen M. Cameron 2010-06-16 8633 struct ctlr_info *h;
64670ac8702ec37 Stephen M. Cameron 2011-05-03 8634 int try_soft_reset = 0;
64670ac8702ec37 Stephen M. Cameron 2011-05-03 8635 unsigned long flags;
6b6c1cd7da65225 Tomas Henzl 2015-04-02 8636 u32 board_id;
4c2a8c40d877eff Stephen M. Cameron 2010-06-16 8637
4c2a8c40d877eff Stephen M. Cameron 2010-06-16 8638 if (number_of_controllers == 0)
4c2a8c40d877eff Stephen M. Cameron 2010-06-16 8639 printk(KERN_INFO DRIVER_NAME "\n");
4c2a8c40d877eff Stephen M. Cameron 2010-06-16 8640
135ae6edeb51979 Hannes Reinecke 2017-08-15 8641 rc = hpsa_lookup_board_id(pdev, &board_id, NULL);
6b6c1cd7da65225 Tomas Henzl 2015-04-02 8642 if (rc < 0) {
6b6c1cd7da65225 Tomas Henzl 2015-04-02 8643 dev_warn(&pdev->dev, "Board ID not found\n");
6b6c1cd7da65225 Tomas Henzl 2015-04-02 8644 return rc;
6b6c1cd7da65225 Tomas Henzl 2015-04-02 8645 }
6b6c1cd7da65225 Tomas Henzl 2015-04-02 8646
6b6c1cd7da65225 Tomas Henzl 2015-04-02 8647 rc = hpsa_init_reset_devices(pdev, board_id);
64670ac8702ec37 Stephen M. Cameron 2011-05-03 8648 if (rc) {
64670ac8702ec37 Stephen M. Cameron 2011-05-03 8649 if (rc != -ENOTSUPP)
4c2a8c40d877eff Stephen M. Cameron 2010-06-16 8650 return rc;
64670ac8702ec37 Stephen M. Cameron 2011-05-03 8651 /* If the reset fails in a particular way (it has no way to do
64670ac8702ec37 Stephen M. Cameron 2011-05-03 8652 * a proper hard reset, so returns -ENOTSUPP) we can try to do
64670ac8702ec37 Stephen M. Cameron 2011-05-03 8653 * a soft reset once we get the controller configured up to the
64670ac8702ec37 Stephen M. Cameron 2011-05-03 8654 * point that it can accept a command.
64670ac8702ec37 Stephen M. Cameron 2011-05-03 8655 */
64670ac8702ec37 Stephen M. Cameron 2011-05-03 8656 try_soft_reset = 1;
64670ac8702ec37 Stephen M. Cameron 2011-05-03 8657 rc = 0;
64670ac8702ec37 Stephen M. Cameron 2011-05-03 8658 }
64670ac8702ec37 Stephen M. Cameron 2011-05-03 8659
64670ac8702ec37 Stephen M. Cameron 2011-05-03 8660 reinit_after_soft_reset:
4c2a8c40d877eff Stephen M. Cameron 2010-06-16 8661
303932fd4ff63e8 Don Brace 2010-02-04 8662 /* Command structures must be aligned on a 32-byte boundary because
303932fd4ff63e8 Don Brace 2010-02-04 8663 * the 5 lower bits of the address are used by the hardware. and by
303932fd4ff63e8 Don Brace 2010-02-04 8664 * the driver. See comments in hpsa.h for more info.
303932fd4ff63e8 Don Brace 2010-02-04 8665 */
303932fd4ff63e8 Don Brace 2010-02-04 8666 BUILD_BUG_ON(sizeof(struct CommandList) % COMMANDLIST_ALIGNMENT);
8b834bff1b73dce Ming Lei 2018-03-13 8667 h = hpda_alloc_ctlr_info();
105a3dbc74522c2 Robert Elliott 2015-04-23 8668 if (!h) {
105a3dbc74522c2 Robert Elliott 2015-04-23 8669 dev_err(&pdev->dev, "Failed to allocate controller head\n");
ecd9aad402765ab Stephen M. Cameron 2010-02-04 8670 return -ENOMEM;
105a3dbc74522c2 Robert Elliott 2015-04-23 8671 }
edd163687ea59f0 Stephen M. Cameron 2009-12-08 8672
55c06c7171f63aa Stephen M. Cameron 2010-05-27 8673 h->pdev = pdev;
105a3dbc74522c2 Robert Elliott 2015-04-23 8674
a9a3a2739a44fc0 Stephen M. Cameron 2011-02-15 8675 h->intr_mode = hpsa_simple_mode ? SIMPLE_MODE_INT : PERF_MODE_INT;
9846590edadb3c9 Stephen M. Cameron 2014-02-21 8676 INIT_LIST_HEAD(&h->offline_device_list);
6eaf46fdc719991 Stephen M. Cameron 2011-01-06 8677 spin_lock_init(&h->lock);
9846590edadb3c9 Stephen M. Cameron 2014-02-21 8678 spin_lock_init(&h->offline_device_lock);
6eaf46fdc719991 Stephen M. Cameron 2011-01-06 8679 spin_lock_init(&h->scan_lock);
c59d04f30d4216a Don Brace 2017-05-04 8680 spin_lock_init(&h->reset_lock);
34f0c6277c686b1 Don Brace 2015-01-23 8681 atomic_set(&h->passthru_cmds_avail, HPSA_MAX_CONCURRENT_PASSTHRUS);
094963dad88c86f Stephen M. Cameron 2014-05-29 8682
094963dad88c86f Stephen M. Cameron 2014-05-29 8683 /* Allocate and clear per-cpu variable lockup_detected */
094963dad88c86f Stephen M. Cameron 2014-05-29 8684 h->lockup_detected = alloc_percpu(u32);
2a5ac3265378687 Stephen M. Cameron 2014-07-03 8685 if (!h->lockup_detected) {
105a3dbc74522c2 Robert Elliott 2015-04-23 8686 dev_err(&h->pdev->dev, "Failed to allocate lockup detector\n");
2a5ac3265378687 Stephen M. Cameron 2014-07-03 8687 rc = -ENOMEM;
2efa5929cb44826 Robert Elliott 2015-04-23 @8688 goto clean1; /* aer/h */
2a5ac3265378687 Stephen M. Cameron 2014-07-03 8689 }
094963dad88c86f Stephen M. Cameron 2014-05-29 8690 set_lockup_detected_for_all_cpus(h, 0);
094963dad88c86f Stephen M. Cameron 2014-05-29 8691
55c06c7171f63aa Stephen M. Cameron 2010-05-27 8692 rc = hpsa_pci_init(h);
105a3dbc74522c2 Robert Elliott 2015-04-23 8693 if (rc)
2946e82bdd76568 Robert Elliott 2015-04-23 @8694 goto clean2; /* lu, aer/h */
2946e82bdd76568 Robert Elliott 2015-04-23 8695
2946e82bdd76568 Robert Elliott 2015-04-23 8696 /* relies on h-> settings made by hpsa_pci_init, including
2946e82bdd76568 Robert Elliott 2015-04-23 8697 * interrupt_mode h->intr */
2946e82bdd76568 Robert Elliott 2015-04-23 8698 rc = hpsa_scsi_host_alloc(h);
2946e82bdd76568 Robert Elliott 2015-04-23 8699 if (rc)
2946e82bdd76568 Robert Elliott 2015-04-23 @8700 goto clean2_5; /* pci, lu, aer/h */
edd163687ea59f0 Stephen M. Cameron 2009-12-08 8701
2946e82bdd76568 Robert Elliott 2015-04-23 8702 sprintf(h->devname, HPSA "%d", h->scsi_host->host_no);
edd163687ea59f0 Stephen M. Cameron 2009-12-08 8703 h->ctlr = number_of_controllers;
edd163687ea59f0 Stephen M. Cameron 2009-12-08 8704 number_of_controllers++;
edd163687ea59f0 Stephen M. Cameron 2009-12-08 8705
edd163687ea59f0 Stephen M. Cameron 2009-12-08 8706 /* configure PCI DMA stuff */
8bc8f47ea3964ef Christoph Hellwig 2018-10-10 8707 rc = dma_set_mask(&pdev->dev, DMA_BIT_MASK(64));
072f10ed00f6c53 Lee Jones 2020-11-02 8708 if (rc != 0)
8bc8f47ea3964ef Christoph Hellwig 2018-10-10 8709 rc = dma_set_mask(&pdev->dev, DMA_BIT_MASK(32));
072f10ed00f6c53 Lee Jones 2020-11-02 8710 if (rc != 0) {
edd163687ea59f0 Stephen M. Cameron 2009-12-08 8711 dev_err(&pdev->dev, "no suitable DMA available\n");
2946e82bdd76568 Robert Elliott 2015-04-23 @8712 goto clean3; /* shost, pci, lu, aer/h */
edd163687ea59f0 Stephen M. Cameron 2009-12-08 8713 }
ecd9aad402765ab Stephen M. Cameron 2010-02-04 8714 }
edd163687ea59f0 Stephen M. Cameron 2009-12-08 8715
edd163687ea59f0 Stephen M. Cameron 2009-12-08 8716 /* make sure the board interrupts are off */
edd163687ea59f0 Stephen M. Cameron 2009-12-08 @8717 h->access.set_intr_mask(h, HPSA_INTR_OFF);
10f66018088fd0c Stephen M. Cameron 2010-06-16 8718
105a3dbc74522c2 Robert Elliott 2015-04-23 @8719 rc = hpsa_request_irqs(h, do_hpsa_intr_msi, do_hpsa_intr_intx);
105a3dbc74522c2 Robert Elliott 2015-04-23 @8720 if (rc)
2946e82bdd76568 Robert Elliott 2015-04-23 8721 goto clean3; /* shost, pci, lu, aer/h */
d37ffbe4d52d4e7 Robert Elliott 2015-04-23 @8722 rc = hpsa_alloc_cmd_pool(h);
8947fd10865db32 Robert Elliott 2015-01-23 8723 if (rc)
2946e82bdd76568 Robert Elliott 2015-04-23 8724 goto clean4; /* irq, shost, pci, lu, aer/h */
105a3dbc74522c2 Robert Elliott 2015-04-23 8725 rc = hpsa_alloc_sg_chain_blocks(h);
105a3dbc74522c2 Robert Elliott 2015-04-23 8726 if (rc)
2946e82bdd76568 Robert Elliott 2015-04-23 8727 goto clean5; /* cmd, irq, shost, pci, lu, aer/h */
a08a8471b7aed3d Stephen M. Cameron 2010-02-04 8728 init_waitqueue_head(&h->scan_wait_queue);
d604f5336aee7e6 Webb Scales 2015-04-23 8729 init_waitqueue_head(&h->event_sync_wait_queue);
d604f5336aee7e6 Webb Scales 2015-04-23 8730 mutex_init(&h->reset_mutex);
a08a8471b7aed3d Stephen M. Cameron 2010-02-04 8731 h->scan_finished = 1; /* no scan currently in progress */
87b9e6aa87d9411 Don Brace 2017-03-10 8732 h->scan_waiting = 0;
edd163687ea59f0 Stephen M. Cameron 2009-12-08 8733
edd163687ea59f0 Stephen M. Cameron 2009-12-08 @8734 pci_set_drvdata(pdev, h);
9a41338e5b474ad Stephen M. Cameron 2011-05-03 8735 h->ndevices = 0;
2946e82bdd76568 Robert Elliott 2015-04-23 8736
9a41338e5b474ad Stephen M. Cameron 2011-05-03 8737 spin_lock_init(&h->devlock);
105a3dbc74522c2 Robert Elliott 2015-04-23 8738 rc = hpsa_put_ctlr_into_performant_mode(h);
105a3dbc74522c2 Robert Elliott 2015-04-23 8739 if (rc)
2946e82bdd76568 Robert Elliott 2015-04-23 8740 goto clean6; /* sg, cmd, irq, shost, pci, lu, aer/h */
2946e82bdd76568 Robert Elliott 2015-04-23 8741
2efa5929cb44826 Robert Elliott 2015-04-23 8742 /* create the resubmit workqueue */
2efa5929cb44826 Robert Elliott 2015-04-23 8743 h->rescan_ctlr_wq = hpsa_create_controller_wq(h, "rescan");
2efa5929cb44826 Robert Elliott 2015-04-23 8744 if (!h->rescan_ctlr_wq) {
2efa5929cb44826 Robert Elliott 2015-04-23 8745 rc = -ENOMEM;
2efa5929cb44826 Robert Elliott 2015-04-23 8746 goto clean7;
2efa5929cb44826 Robert Elliott 2015-04-23 8747 }
2efa5929cb44826 Robert Elliott 2015-04-23 8748
2efa5929cb44826 Robert Elliott 2015-04-23 8749 h->resubmit_wq = hpsa_create_controller_wq(h, "resubmit");
2efa5929cb44826 Robert Elliott 2015-04-23 8750 if (!h->resubmit_wq) {
2efa5929cb44826 Robert Elliott 2015-04-23 8751 rc = -ENOMEM;
2efa5929cb44826 Robert Elliott 2015-04-23 8752 goto clean7; /* aer/h */
2efa5929cb44826 Robert Elliott 2015-04-23 8753 }
64670ac8702ec37 Stephen M. Cameron 2011-05-03 8754
0119208885b3faf Don Brace 2019-05-07 8755 h->monitor_ctlr_wq = hpsa_create_controller_wq(h, "monitor");
0119208885b3faf Don Brace 2019-05-07 8756 if (!h->monitor_ctlr_wq) {
0119208885b3faf Don Brace 2019-05-07 8757 rc = -ENOMEM;
0119208885b3faf Don Brace 2019-05-07 8758 goto clean7;
0119208885b3faf Don Brace 2019-05-07 8759 }
0119208885b3faf Don Brace 2019-05-07 8760
105a3dbc74522c2 Robert Elliott 2015-04-23 8761 /*
105a3dbc74522c2 Robert Elliott 2015-04-23 8762 * At this point, the controller is ready to take commands.
64670ac8702ec37 Stephen M. Cameron 2011-05-03 8763 * Now, if reset_devices and the hard reset didn't work, try
64670ac8702ec37 Stephen M. Cameron 2011-05-03 8764 * the soft reset and see if that works.
64670ac8702ec37 Stephen M. Cameron 2011-05-03 8765 */
64670ac8702ec37 Stephen M. Cameron 2011-05-03 8766 if (try_soft_reset) {
64670ac8702ec37 Stephen M. Cameron 2011-05-03 8767
64670ac8702ec37 Stephen M. Cameron 2011-05-03 8768 /* This is kind of gross. We may or may not get a completion
64670ac8702ec37 Stephen M. Cameron 2011-05-03 8769 * from the soft reset command, and if we do, then the value
64670ac8702ec37 Stephen M. Cameron 2011-05-03 8770 * from the fifo may or may not be valid. So, we wait 10 secs
64670ac8702ec37 Stephen M. Cameron 2011-05-03 8771 * after the reset throwing away any completions we get during
64670ac8702ec37 Stephen M. Cameron 2011-05-03 8772 * that time. Unregister the interrupt handler and register
64670ac8702ec37 Stephen M. Cameron 2011-05-03 8773 * fake ones to scoop up any residual completions.
64670ac8702ec37 Stephen M. Cameron 2011-05-03 8774 */
64670ac8702ec37 Stephen M. Cameron 2011-05-03 8775 spin_lock_irqsave(&h->lock, flags);
64670ac8702ec37 Stephen M. Cameron 2011-05-03 8776 h->access.set_intr_mask(h, HPSA_INTR_OFF);
64670ac8702ec37 Stephen M. Cameron 2011-05-03 8777 spin_unlock_irqrestore(&h->lock, flags);
ec501a18637d04a Robert Elliott 2015-01-23 8778 hpsa_free_irqs(h);
9ee61794879dad6 Robert Elliott 2015-01-23 8779 rc = hpsa_request_irqs(h, hpsa_msix_discard_completions,
64670ac8702ec37 Stephen M. Cameron 2011-05-03 8780 hpsa_intx_discard_completions);
64670ac8702ec37 Stephen M. Cameron 2011-05-03 8781 if (rc) {
9ee61794879dad6 Robert Elliott 2015-01-23 8782 dev_warn(&h->pdev->dev,
9ee61794879dad6 Robert Elliott 2015-01-23 8783 "Failed to request_irq after soft reset.\n");
d498757c5efd41d Robert Elliott 2015-04-23 8784 /*
b2ef480c4b6548e Robert Elliott 2015-04-23 8785 * cannot goto clean7 or free_irqs will be called
b2ef480c4b6548e Robert Elliott 2015-04-23 8786 * again. Instead, do its work
b2ef480c4b6548e Robert Elliott 2015-04-23 8787 */
b2ef480c4b6548e Robert Elliott 2015-04-23 8788 hpsa_free_performant_mode(h); /* clean7 */
b2ef480c4b6548e Robert Elliott 2015-04-23 8789 hpsa_free_sg_chain_blocks(h); /* clean6 */
b2ef480c4b6548e Robert Elliott 2015-04-23 8790 hpsa_free_cmd_pool(h); /* clean5 */
b2ef480c4b6548e Robert Elliott 2015-04-23 8791 /*
b2ef480c4b6548e Robert Elliott 2015-04-23 8792 * skip hpsa_free_irqs(h) clean4 since that
b2ef480c4b6548e Robert Elliott 2015-04-23 8793 * was just called before request_irqs failed
d498757c5efd41d Robert Elliott 2015-04-23 8794 */
d498757c5efd41d Robert Elliott 2015-04-23 8795 goto clean3;
64670ac8702ec37 Stephen M. Cameron 2011-05-03 8796 }
64670ac8702ec37 Stephen M. Cameron 2011-05-03 8797
64670ac8702ec37 Stephen M. Cameron 2011-05-03 8798 rc = hpsa_kdump_soft_reset(h);
64670ac8702ec37 Stephen M. Cameron 2011-05-03 8799 if (rc)
64670ac8702ec37 Stephen M. Cameron 2011-05-03 8800 /* Neither hard nor soft reset worked, we're hosed. */
7ef7323f4bf467c Don Brace 2015-07-18 8801 goto clean7;
64670ac8702ec37 Stephen M. Cameron 2011-05-03 8802
64670ac8702ec37 Stephen M. Cameron 2011-05-03 8803 dev_info(&h->pdev->dev, "Board READY.\n");
64670ac8702ec37 Stephen M. Cameron 2011-05-03 8804 dev_info(&h->pdev->dev,
64670ac8702ec37 Stephen M. Cameron 2011-05-03 8805 "Waiting for stale completions to drain.\n");
64670ac8702ec37 Stephen M. Cameron 2011-05-03 8806 h->access.set_intr_mask(h, HPSA_INTR_ON);
64670ac8702ec37 Stephen M. Cameron 2011-05-03 8807 msleep(10000);
64670ac8702ec37 Stephen M. Cameron 2011-05-03 8808 h->access.set_intr_mask(h, HPSA_INTR_OFF);
64670ac8702ec37 Stephen M. Cameron 2011-05-03 8809
64670ac8702ec37 Stephen M. Cameron 2011-05-03 8810 rc = controller_reset_failed(h->cfgtable);
64670ac8702ec37 Stephen M. Cameron 2011-05-03 8811 if (rc)
64670ac8702ec37 Stephen M. Cameron 2011-05-03 8812 dev_info(&h->pdev->dev,
64670ac8702ec37 Stephen M. Cameron 2011-05-03 8813 "Soft reset appears to have failed.\n");
64670ac8702ec37 Stephen M. Cameron 2011-05-03 8814
64670ac8702ec37 Stephen M. Cameron 2011-05-03 8815 /* since the controller's reset, we have to go back and re-init
64670ac8702ec37 Stephen M. Cameron 2011-05-03 8816 * everything. Easiest to just forget what we've done and do it
64670ac8702ec37 Stephen M. Cameron 2011-05-03 8817 * all over again.
64670ac8702ec37 Stephen M. Cameron 2011-05-03 8818 */
64670ac8702ec37 Stephen M. Cameron 2011-05-03 8819 hpsa_undo_allocations_after_kdump_soft_reset(h);
64670ac8702ec37 Stephen M. Cameron 2011-05-03 8820 try_soft_reset = 0;
64670ac8702ec37 Stephen M. Cameron 2011-05-03 8821 if (rc)
b2ef480c4b6548e Robert Elliott 2015-04-23 8822 /* don't goto clean, we already unallocated */
64670ac8702ec37 Stephen M. Cameron 2011-05-03 8823 return -ENODEV;
64670ac8702ec37 Stephen M. Cameron 2011-05-03 8824
64670ac8702ec37 Stephen M. Cameron 2011-05-03 8825 goto reinit_after_soft_reset;
64670ac8702ec37 Stephen M. Cameron 2011-05-03 8826 }
edd163687ea59f0 Stephen M. Cameron 2009-12-08 8827
da0697bd3075598 Scott Teel 2014-02-18 8828 /* Enable Accelerated IO path at driver layer */
da0697bd3075598 Scott Teel 2014-02-18 8829 h->acciopath_status = 1;
34592254c13324a Scott Teel 2015-11-04 8830 /* Disable discovery polling.*/
34592254c13324a Scott Teel 2015-11-04 8831 h->discovery_polling = 0;
da0697bd3075598 Scott Teel 2014-02-18 8832
e863d68e4881b08 Scott Teel 2014-02-18 8833
edd163687ea59f0 Stephen M. Cameron 2009-12-08 8834 /* Turn the interrupts on so we can service requests */
edd163687ea59f0 Stephen M. Cameron 2009-12-08 8835 h->access.set_intr_mask(h, HPSA_INTR_ON);
edd163687ea59f0 Stephen M. Cameron 2009-12-08 8836
339b2b14c634da5 Stephen M. Cameron 2010-02-04 @8837 hpsa_hba_inquiry(h);
8a98db7386b5fed Stephen M. Cameron 2013-12-04 8838
34592254c13324a Scott Teel 2015-11-04 8839 h->lastlogicals = kzalloc(sizeof(*(h->lastlogicals)), GFP_KERNEL);
34592254c13324a Scott Teel 2015-11-04 8840 if (!h->lastlogicals)
34592254c13324a Scott Teel 2015-11-04 8841 dev_info(&h->pdev->dev,
34592254c13324a Scott Teel 2015-11-04 8842 "Can't track change to report lun data\n");
34592254c13324a Scott Teel 2015-11-04 8843
cf47723763a7235 Don Brace 2016-04-27 8844 /* hook into SCSI subsystem */
cf47723763a7235 Don Brace 2016-04-27 8845 rc = hpsa_scsi_add_host(h);
cf47723763a7235 Don Brace 2016-04-27 8846 if (rc)
cf47723763a7235 Don Brace 2016-04-27 8847 goto clean7; /* perf, sg, cmd, irq, shost, pci, lu, aer/h */
cf47723763a7235 Don Brace 2016-04-27 8848
8a98db7386b5fed Stephen M. Cameron 2013-12-04 8849 /* Monitor the controller for firmware lockups */
8a98db7386b5fed Stephen M. Cameron 2013-12-04 8850 h->heartbeat_sample_interval = HEARTBEAT_SAMPLE_INTERVAL;
8a98db7386b5fed Stephen M. Cameron 2013-12-04 8851 INIT_DELAYED_WORK(&h->monitor_ctlr_work, hpsa_monitor_ctlr_worker);
8a98db7386b5fed Stephen M. Cameron 2013-12-04 @8852 schedule_delayed_work(&h->monitor_ctlr_work,
8a98db7386b5fed Stephen M. Cameron 2013-12-04 @8853 h->heartbeat_sample_interval);
6636e7f455b33b9 Don Brace 2015-01-23 8854 INIT_DELAYED_WORK(&h->rescan_ctlr_work, hpsa_rescan_ctlr_worker);
6636e7f455b33b9 Don Brace 2015-01-23 @8855 queue_delayed_work(h->rescan_ctlr_wq, &h->rescan_ctlr_work,
6636e7f455b33b9 Don Brace 2015-01-23 8856 h->heartbeat_sample_interval);
3d38f00c4107cc0 Scott Teel 2017-05-04 8857 INIT_DELAYED_WORK(&h->event_monitor_work, hpsa_event_monitor_worker);
3d38f00c4107cc0 Scott Teel 2017-05-04 8858 schedule_delayed_work(&h->event_monitor_work,
3d38f00c4107cc0 Scott Teel 2017-05-04 8859 HPSA_EVENT_MONITOR_INTERVAL);
88bf6d62db4393f Stephen M. Cameron 2013-11-01 @8860 return 0;
edd163687ea59f0 Stephen M. Cameron 2009-12-08 8861
2946e82bdd76568 Robert Elliott 2015-04-23 @8862 clean7: /* perf, sg, cmd, irq, shost, pci, lu, aer/h */
105a3dbc74522c2 Robert Elliott 2015-04-23 8863 hpsa_free_performant_mode(h);
105a3dbc74522c2 Robert Elliott 2015-04-23 8864 h->access.set_intr_mask(h, HPSA_INTR_OFF);
105a3dbc74522c2 Robert Elliott 2015-04-23 8865 clean6: /* sg, cmd, irq, pci, lockup, wq/aer/h */
33a2ffce51d9598 Stephen M. Cameron 2010-02-25 8866 hpsa_free_sg_chain_blocks(h);
2946e82bdd76568 Robert Elliott 2015-04-23 8867 clean5: /* cmd, irq, shost, pci, lu, aer/h */
2e9d1b3626c4383 Stephen M. Cameron 2011-05-03 8868 hpsa_free_cmd_pool(h);
2946e82bdd76568 Robert Elliott 2015-04-23 8869 clean4: /* irq, shost, pci, lu, aer/h */
ec501a18637d04a Robert Elliott 2015-01-23 8870 hpsa_free_irqs(h);
2946e82bdd76568 Robert Elliott 2015-04-23 8871 clean3: /* shost, pci, lu, aer/h */
2946e82bdd76568 Robert Elliott 2015-04-23 8872 scsi_host_put(h->scsi_host);
2946e82bdd76568 Robert Elliott 2015-04-23 8873 h->scsi_host = NULL;
2946e82bdd76568 Robert Elliott 2015-04-23 8874 clean2_5: /* pci, lu, aer/h */
195f2c65f99e047 Robert Elliott 2015-04-23 8875 hpsa_free_pci_init(h);
2946e82bdd76568 Robert Elliott 2015-04-23 8876 clean2: /* lu, aer/h */
105a3dbc74522c2 Robert Elliott 2015-04-23 8877 if (h->lockup_detected) {
105a3dbc74522c2 Robert Elliott 2015-04-23 8878 free_percpu(h->lockup_detected);
105a3dbc74522c2 Robert Elliott 2015-04-23 8879 h->lockup_detected = NULL;
105a3dbc74522c2 Robert Elliott 2015-04-23 8880 }
105a3dbc74522c2 Robert Elliott 2015-04-23 8881 clean1: /* wq/aer/h */
105a3dbc74522c2 Robert Elliott 2015-04-23 8882 if (h->resubmit_wq) {
080ef1cc7fdf5d0 Don Brace 2015-01-23 8883 destroy_workqueue(h->resubmit_wq);
105a3dbc74522c2 Robert Elliott 2015-04-23 8884 h->resubmit_wq = NULL;
105a3dbc74522c2 Robert Elliott 2015-04-23 8885 }
105a3dbc74522c2 Robert Elliott 2015-04-23 8886 if (h->rescan_ctlr_wq) {
6636e7f455b33b9 Don Brace 2015-01-23 8887 destroy_workqueue(h->rescan_ctlr_wq);
105a3dbc74522c2 Robert Elliott 2015-04-23 8888 h->rescan_ctlr_wq = NULL;
105a3dbc74522c2 Robert Elliott 2015-04-23 8889 }
0119208885b3faf Don Brace 2019-05-07 8890 if (h->monitor_ctlr_wq) {
0119208885b3faf Don Brace 2019-05-07 8891 destroy_workqueue(h->monitor_ctlr_wq);
0119208885b3faf Don Brace 2019-05-07 8892 h->monitor_ctlr_wq = NULL;
0119208885b3faf Don Brace 2019-05-07 8893 }
edd163687ea59f0 Stephen M. Cameron 2009-12-08 @8894 kfree(h);
ecd9aad402765ab Stephen M. Cameron 2010-02-04 8895 return rc;
edd163687ea59f0 Stephen M. Cameron 2009-12-08 @8896 }
edd163687ea59f0 Stephen M. Cameron 2009-12-08 8897
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 45910 bytes --]
^ permalink raw reply [flat|nested] 26+ messages in thread* [PATCH v2 19/19] scsi: hpsa: Strip out a bunch of set but unused variables
2020-11-02 14:23 ` [RESEND 19/19] scsi: hpsa: Strip out a bunch of set but unused variables Lee Jones
2020-11-03 21:27 ` kernel test robot
2020-11-04 8:38 ` kernel test robot
@ 2020-11-12 10:19 ` Lee Jones
2020-11-17 4:35 ` Martin K. Petersen
2 siblings, 1 reply; 26+ messages in thread
From: Lee Jones @ 2020-11-12 10:19 UTC (permalink / raw)
To: martin.petersen, jejb
Cc: linux-kernel, linux-scsi, Don Brace, Bugfixes to, storagedev
Fixes the following W=1 kernel build warning(s):
drivers/scsi/hpsa.c: In function ‘hpsa_volume_offline’:
drivers/scsi/hpsa.c:3885:5: warning: variable ‘scsi_status’ set but not used [-Wunused-but-set-variable]
drivers/scsi/hpsa.c:3884:6: warning: variable ‘cmd_status’ set but not used [-Wunused-but-set-variable]
drivers/scsi/hpsa.c: In function ‘hpsa_update_scsi_devices’:
drivers/scsi/hpsa.c:4354:9: warning: variable ‘n_ext_target_devs’ set but not used [-Wunused-but-set-variable]
drivers/scsi/hpsa.c: In function ‘hpsa_scatter_gather’:
drivers/scsi/hpsa.c:4583:36: warning: variable ‘last_sg’ set but not used [-Wunused-but-set-variable]
drivers/scsi/hpsa.c: In function ‘hpsa_init_one’:
drivers/scsi/hpsa.c:8639:6: warning: variable ‘dac’ set but not used [-Wunused-but-set-variable]
drivers/scsi/hpsa.c: In function ‘hpsa_enter_performant_mode’:
drivers/scsi/hpsa.c:9300:7: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable]
Cc: Don Brace <don.brace@microchip.com>
Cc: Bugfixes to <esc.storagedev@microsemi.com>
Cc: storagedev@microchip.com
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
v2: Fix missing '{'
drivers/scsi/hpsa.c | 25 +++++++------------------
1 file changed, 7 insertions(+), 18 deletions(-)
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index 16fd378285d27..99562b6bb8ccf 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -3881,8 +3881,6 @@ static unsigned char hpsa_volume_offline(struct ctlr_info *h,
u8 sense_key, asc, ascq;
int sense_len;
int rc, ldstat = 0;
- u16 cmd_status;
- u8 scsi_status;
#define ASC_LUN_NOT_READY 0x04
#define ASCQ_LUN_NOT_READY_FORMAT_IN_PROGRESS 0x04
#define ASCQ_LUN_NOT_READY_INITIALIZING_CMD_REQ 0x02
@@ -3902,8 +3900,6 @@ static unsigned char hpsa_volume_offline(struct ctlr_info *h,
else
sense_len = c->err_info->SenseLen;
decode_sense_data(sense, sense_len, &sense_key, &asc, &ascq);
- cmd_status = c->err_info->CommandStatus;
- scsi_status = c->err_info->ScsiStatus;
cmd_free(h, c);
/* Determine the reason for not ready state */
@@ -4351,7 +4347,7 @@ static void hpsa_update_scsi_devices(struct ctlr_info *h)
u32 ndev_allocated = 0;
struct hpsa_scsi_dev_t **currentsd, *this_device, *tmpdevice;
int ncurrent = 0;
- int i, n_ext_target_devs, ndevs_to_allocate;
+ int i, ndevs_to_allocate;
int raid_ctlr_position;
bool physical_device;
DECLARE_BITMAP(lunzerobits, MAX_EXT_TARGETS);
@@ -4416,7 +4412,6 @@ static void hpsa_update_scsi_devices(struct ctlr_info *h)
raid_ctlr_position = nphysicals + nlogicals;
/* adjust our table of devices */
- n_ext_target_devs = 0;
for (i = 0; i < nphysicals + nlogicals + 1; i++) {
u8 *lunaddrbytes, is_OBDR = 0;
int rc = 0;
@@ -4580,7 +4575,7 @@ static int hpsa_scatter_gather(struct ctlr_info *h,
struct scsi_cmnd *cmd)
{
struct scatterlist *sg;
- int use_sg, i, sg_limit, chained, last_sg;
+ int use_sg, i, sg_limit, chained;
struct SGDescriptor *curr_sg;
BUG_ON(scsi_sg_count(cmd) > h->maxsgentries);
@@ -4602,7 +4597,6 @@ static int hpsa_scatter_gather(struct ctlr_info *h,
curr_sg = cp->SG;
chained = use_sg > h->max_cmd_sg_entries;
sg_limit = chained ? h->max_cmd_sg_entries - 1 : use_sg;
- last_sg = scsi_sg_count(cmd) - 1;
scsi_for_each_sg(cmd, sg, sg_limit, i) {
hpsa_set_sg_descriptor(curr_sg, sg);
curr_sg++;
@@ -8635,7 +8629,7 @@ static struct ctlr_info *hpda_alloc_ctlr_info(void)
static int hpsa_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
{
- int dac, rc;
+ int rc;
struct ctlr_info *h;
int try_soft_reset = 0;
unsigned long flags;
@@ -8711,13 +8705,9 @@ static int hpsa_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
/* configure PCI DMA stuff */
rc = dma_set_mask(&pdev->dev, DMA_BIT_MASK(64));
- if (rc == 0) {
- dac = 1;
- } else {
+ if (rc != 0) {
rc = dma_set_mask(&pdev->dev, DMA_BIT_MASK(32));
- if (rc == 0) {
- dac = 0;
- } else {
+ if (rc != 0) {
dev_err(&pdev->dev, "no suitable DMA available\n");
goto clean3; /* shost, pci, lu, aer/h */
}
@@ -9298,10 +9288,9 @@ static int hpsa_enter_performant_mode(struct ctlr_info *h, u32 trans_support)
} else if (trans_support & CFGTBL_Trans_io_accel2) {
u64 cfg_offset, cfg_base_addr_index;
u32 bft2_offset, cfg_base_addr;
- int rc;
- rc = hpsa_find_cfg_addrs(h->pdev, h->vaddr, &cfg_base_addr,
- &cfg_base_addr_index, &cfg_offset);
+ hpsa_find_cfg_addrs(h->pdev, h->vaddr, &cfg_base_addr,
+ &cfg_base_addr_index, &cfg_offset);
BUILD_BUG_ON(offsetof(struct io_accel2_cmd, sg) != 64);
bft2[15] = h->ioaccel_maxsg + HPSA_IOACCEL2_HEADER_SZ;
calc_bucket_map(bft2, ARRAY_SIZE(bft2), h->ioaccel_maxsg,
--
2.25.1
^ permalink raw reply related [flat|nested] 26+ messages in thread* Re: [PATCH v2 19/19] scsi: hpsa: Strip out a bunch of set but unused variables
2020-11-12 10:19 ` [PATCH v2 " Lee Jones
@ 2020-11-17 4:35 ` Martin K. Petersen
0 siblings, 0 replies; 26+ messages in thread
From: Martin K. Petersen @ 2020-11-17 4:35 UTC (permalink / raw)
To: Lee Jones
Cc: martin.petersen, jejb, linux-kernel, linux-scsi, Don Brace,
Bugfixes to, storagedev
Lee,
> Fixes the following W=1 kernel build warning(s):
>
> drivers/scsi/hpsa.c: In function ‘hpsa_volume_offline’:
> drivers/scsi/hpsa.c:3885:5: warning: variable ‘scsi_status’ set but not used [-Wunused-but-set-variable]
> drivers/scsi/hpsa.c:3884:6: warning: variable ‘cmd_status’ set but not used [-Wunused-but-set-variable]
> drivers/scsi/hpsa.c: In function ‘hpsa_update_scsi_devices’:
> drivers/scsi/hpsa.c:4354:9: warning: variable ‘n_ext_target_devs’ set but not used [-Wunused-but-set-variable]
> drivers/scsi/hpsa.c: In function ‘hpsa_scatter_gather’:
> drivers/scsi/hpsa.c:4583:36: warning: variable ‘last_sg’ set but not used [-Wunused-but-set-variable]
> drivers/scsi/hpsa.c: In function ‘hpsa_init_one’:
> drivers/scsi/hpsa.c:8639:6: warning: variable ‘dac’ set but not used [-Wunused-but-set-variable]
> drivers/scsi/hpsa.c: In function ‘hpsa_enter_performant_mode’:
> drivers/scsi/hpsa.c:9300:7: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable]
Applied to 5.11/scsi-staging, thanks!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [RESEND 00/19] Rid W=1 warnings in SCSI
2020-11-02 14:23 [RESEND 00/19] Rid W=1 warnings in SCSI Lee Jones
` (18 preceding siblings ...)
2020-11-02 14:23 ` [RESEND 19/19] scsi: hpsa: Strip out a bunch of set but unused variables Lee Jones
@ 2020-11-11 3:30 ` Martin K. Petersen
19 siblings, 0 replies; 26+ messages in thread
From: Martin K. Petersen @ 2020-11-11 3:30 UTC (permalink / raw)
To: Lee Jones; +Cc: martin.petersen, jejb, linux-kernel, linux-scsi
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 1-18 to 5.11/scsi-staging, thanks! Patch 19 didn't build.
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 26+ messages in thread