RE: [EXT] [PATCH 23/30] scsi: qla2xxx: qla_gs: Fix some incorrect formatting/spelling issues

2021-03-03 Thread Nilesh Javali



> -Original Message-
> From: Lee Jones 
> Sent: Wednesday, March 3, 2021 8:16 PM
> To: lee.jo...@linaro.org
> Cc: linux-kernel@vger.kernel.org; Nilesh Javali ; GR-
> QLogic-Storage-Upstream ;
> James E.J. Bottomley ; Martin K. Petersen
> ; linux-s...@vger.kernel.org
> Subject: [EXT] [PATCH 23/30] scsi: qla2xxx: qla_gs: Fix some incorrect
> formatting/spelling issues
> 
> External Email
> 
> --
> Fixes the following W=1 kernel build warning(s):
> 
>  drivers/scsi/qla2xxx/qla_gs.c:1259: warning: expecting prototype for
> qla2x00_snd_rft_id(). Prototype was for qla2x00_sns_rft_id() instead
>  drivers/scsi/qla2xxx/qla_gs.c:1492: warning: expecting prototype for
> qla2x00_prep_ct_req(). Prototype was for qla2x00_prep_ct_fdmi_req()
> instead
>  drivers/scsi/qla2xxx/qla_gs.c:1596: warning: expecting prototype for
> perform HBA attributes registration(). Prototype was for
> qla2x00_hba_attributes() instead
>  drivers/scsi/qla2xxx/qla_gs.c:1851: warning: expecting prototype for
> perform Port attributes registration(). Prototype was for
> qla2x00_port_attributes() instead
>  drivers/scsi/qla2xxx/qla_gs.c:2284: warning: expecting prototype for
> perform RPRT registration(). Prototype was for qla2x00_fdmi_rprt() instead
> 
> Cc: Nilesh Javali 
> Cc: gr-qlogic-storage-upstr...@marvell.com
> Cc: "James E.J. Bottomley" 
> Cc: "Martin K. Petersen" 
> Cc: linux-s...@vger.kernel.org
> Signed-off-by: Lee Jones 
> ---
>  drivers/scsi/qla2xxx/qla_gs.c | 10 +-
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/scsi/qla2xxx/qla_gs.c b/drivers/scsi/qla2xxx/qla_gs.c
> index 517d358b0031a..8e126afe61b11 100644
> --- a/drivers/scsi/qla2xxx/qla_gs.c
> +++ b/drivers/scsi/qla2xxx/qla_gs.c
> @@ -1247,7 +1247,7 @@ qla2x00_sns_gnn_id(scsi_qla_host_t *vha,
> sw_info_t *list)
>  }
> 
>  /**
> - * qla2x00_snd_rft_id() - SNS Register FC-4 TYPEs (RFT_ID) supported by the
> HBA.
> + * qla2x00_sns_rft_id() - SNS Register FC-4 TYPEs (RFT_ID) supported by the
> HBA.
>   * @vha: HA context
>   *
>   * This command uses the old Exectute SNS Command mailbox routine.
> @@ -1479,7 +1479,7 @@ qla2x00_update_ms_fdmi_iocb(scsi_qla_host_t
> *vha, uint32_t req_size)
>  }
> 
>  /**
> - * qla2x00_prep_ct_req() - Prepare common CT request fields for SNS query.
> + * qla2x00_prep_ct_fdmi_req() - Prepare common CT request fields for SNS
> query.
>   * @p: CT request buffer
>   * @cmd: GS command
>   * @rsp_size: response size in bytes
> @@ -1582,7 +1582,7 @@ qla25xx_fdmi_port_speed_currently(struct
> qla_hw_data *ha)
>  }
> 
>  /**
> - * qla2x00_hba_attributes() perform HBA attributes registration
> + * qla2x00_hba_attributes() - perform HBA attributes registration
>   * @vha: HA context
>   * @entries: number of entries to use
>   * @callopt: Option to issue extended or standard FDMI
> @@ -1837,7 +1837,7 @@ qla2x00_hba_attributes(scsi_qla_host_t *vha, void
> *entries,
>  }
> 
>  /**
> - * qla2x00_port_attributes() perform Port attributes registration
> + * qla2x00_port_attributes() - perform Port attributes registration
>   * @vha: HA context
>   * @entries: number of entries to use
>   * @callopt: Option to issue extended or standard FDMI
> @@ -2272,7 +2272,7 @@ qla2x00_fdmi_dhba(scsi_qla_host_t *vha)
>  }
> 
>  /**
> - * qla2x00_fdmi_rprt() perform RPRT registration
> + * qla2x00_fdmi_rprt() - perform RPRT registration
>   * @vha: HA context
>   * @callopt: Option to issue extended or standard FDMI
>   *   command parameter
> --
> 2.27.0

Lee,

Thanks for the patch.
Ack-by: Nilesh Javali 


RE: [EXT] [PATCH 19/30] scsi: qla4xxx: ql4_mbx: Fix kernel-doc formatting and misnaming issue

2021-03-03 Thread Nilesh Javali


> -Original Message-
> From: Lee Jones 
> Sent: Wednesday, March 3, 2021 8:16 PM
> To: lee.jo...@linaro.org
> Cc: linux-kernel@vger.kernel.org; Nilesh Javali ;
> Manish Rangankar ; GR-QLogic-Storage-
> Upstream ; James E.J.
> Bottomley ; Martin K. Petersen
> ; linux-s...@vger.kernel.org
> Subject: [EXT] [PATCH 19/30] scsi: qla4xxx: ql4_mbx: Fix kernel-doc
> formatting and misnaming issue
> 
> External Email
> 
> --
> Fixes the following W=1 kernel build warning(s):
> 
>  drivers/scsi/qla4xxx/ql4_mbx.c:47: warning: wrong kernel-doc identifier on
> line:
>  drivers/scsi/qla4xxx/ql4_mbx.c:947: warning: expecting prototype for
> qla4xxx_set_fwddb_entry(). Prototype was for qla4xxx_set_ddb_entry()
> instead
> 
> Cc: Nilesh Javali 
> Cc: Manish Rangankar 
> Cc: gr-qlogic-storage-upstr...@marvell.com
> Cc: "James E.J. Bottomley" 
> Cc: "Martin K. Petersen" 
> Cc: linux-s...@vger.kernel.org
> Signed-off-by: Lee Jones 
> ---
>  drivers/scsi/qla4xxx/ql4_mbx.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/scsi/qla4xxx/ql4_mbx.c b/drivers/scsi/qla4xxx/ql4_mbx.c
> index 17b719a8b6fbc..187d78aa4f675 100644
> --- a/drivers/scsi/qla4xxx/ql4_mbx.c
> +++ b/drivers/scsi/qla4xxx/ql4_mbx.c
> @@ -44,7 +44,7 @@ void qla4xxx_process_mbox_intr(struct scsi_qla_host
> *ha, int out_count)
>  }
> 
>  /**
> - * qla4xxx_is_intr_poll_mode – Are we allowed to poll for interrupts?
> + * qla4xxx_is_intr_poll_mode - Are we allowed to poll for interrupts?
>   * @ha: Pointer to host adapter structure.
>   * returns: 1=polling mode, 0=non-polling mode
>   **/
> @@ -933,7 +933,7 @@ int qla4xxx_conn_open(struct scsi_qla_host *ha,
> uint16_t fw_ddb_index)
>  }
> 
>  /**
> - * qla4xxx_set_fwddb_entry - sets a ddb entry.
> + * qla4xxx_set_ddb_entry - sets a ddb entry.
>   * @ha: Pointer to host adapter structure.
>   * @fw_ddb_index: Firmware's device database index
>   * @fw_ddb_entry_dma: dma address of ddb entry
> --
> 2.27.0

Lee,

Thanks for the patch.
Ack-by: Nilesh Javali 


RE: [EXT] [PATCH 15/30] scsi: qla2xxx: qla_iocb: Replace __qla2x00_marker()'s missing underscores

2021-03-03 Thread Nilesh Javali



> -Original Message-
> From: Lee Jones 
> Sent: Wednesday, March 3, 2021 8:16 PM
> To: lee.jo...@linaro.org
> Cc: linux-kernel@vger.kernel.org; Nilesh Javali ; GR-
> QLogic-Storage-Upstream ;
> James E.J. Bottomley ; Martin K. Petersen
> ; linux-s...@vger.kernel.org
> Subject: [EXT] [PATCH 15/30] scsi: qla2xxx: qla_iocb: Replace
> __qla2x00_marker()'s missing underscores
> 
> External Email
> 
> --
> Fixes the following W=1 kernel build warning(s):
> 
>  drivers/scsi/qla2xxx/qla_iocb.c:508: warning: expecting prototype for
> qla2x00_marker(). Prototype was for __qla2x00_marker() instead
> 
> Cc: Nilesh Javali 
> Cc: gr-qlogic-storage-upstr...@marvell.com
> Cc: "James E.J. Bottomley" 
> Cc: "Martin K. Petersen" 
> Cc: linux-s...@vger.kernel.org
> Signed-off-by: Lee Jones 
> ---
>  drivers/scsi/qla2xxx/qla_iocb.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/scsi/qla2xxx/qla_iocb.c b/drivers/scsi/qla2xxx/qla_iocb.c
> index 8b41cbaf8535b..e765ee4ce162a 100644
> --- a/drivers/scsi/qla2xxx/qla_iocb.c
> +++ b/drivers/scsi/qla2xxx/qla_iocb.c
> @@ -491,7 +491,7 @@ qla2x00_start_iocbs(struct scsi_qla_host *vha, struct
> req_que *req)
>  }
> 
>  /**
> - * qla2x00_marker() - Send a marker IOCB to the firmware.
> + * __qla2x00_marker() - Send a marker IOCB to the firmware.
>   * @vha: HA context
>   * @qpair: queue pair pointer
>   * @loop_id: loop ID
> --
> 2.27.0

Lee,

Thanks for the patch.
Ack-by: Nilesh Javali 


RE: [EXT] [PATCH 12/30] scsi: qla4xxx: ql4_os: Fix formatting issues - missing '-' and '_'

2021-03-03 Thread Nilesh Javali


> -Original Message-
> From: Lee Jones 
> Sent: Wednesday, March 3, 2021 8:16 PM
> To: lee.jo...@linaro.org
> Cc: linux-kernel@vger.kernel.org; Nilesh Javali ;
> Manish Rangankar ; GR-QLogic-Storage-
> Upstream ; James E.J.
> Bottomley ; Martin K. Petersen
> ; linux-s...@vger.kernel.org
> Subject: [EXT] [PATCH 12/30] scsi: qla4xxx: ql4_os: Fix formatting issues -
> missing '-' and '_'
> 
> External Email
> 
> --
> Fixes the following W=1 kernel build warning(s):
> 
>  drivers/scsi/qla4xxx/ql4_os.c:631: warning: expecting prototype for
> qla4xxx_create chap_list(). Prototype was for qla4xxx_create_chap_list()
> instead
>  drivers/scsi/qla4xxx/ql4_os.c:9643: warning: expecting prototype for gets
> called if(). Prototype was for qla4xxx_pci_mmio_enabled() instead
> 
> Cc: Nilesh Javali 
> Cc: Manish Rangankar 
> Cc: gr-qlogic-storage-upstr...@marvell.com
> Cc: "James E.J. Bottomley" 
> Cc: "Martin K. Petersen" 
> Cc: linux-s...@vger.kernel.org
> Signed-off-by: Lee Jones 
> ---
>  drivers/scsi/qla4xxx/ql4_os.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
> index 7bd9a4a04ad5d..597a64d91fe92 100644
> --- a/drivers/scsi/qla4xxx/ql4_os.c
> +++ b/drivers/scsi/qla4xxx/ql4_os.c
> @@ -618,7 +618,7 @@ static umode_t qla4_attr_is_visible(int param_type,
> int param)
>  }
> 
>  /**
> - * qla4xxx_create chap_list - Create CHAP list from FLASH
> + * qla4xxx_create_chap_list - Create CHAP list from FLASH
>   * @ha: pointer to adapter structure
>   *
>   * Read flash and make a list of CHAP entries, during login when a CHAP
> entry
> @@ -9633,7 +9633,7 @@ qla4xxx_pci_error_detected(struct pci_dev *pdev,
> pci_channel_state_t state)
>  }
> 
>  /**
> - * qla4xxx_pci_mmio_enabled() gets called if
> + * qla4xxx_pci_mmio_enabled() - gets called if
>   * qla4xxx_pci_error_detected() returns PCI_ERS_RESULT_CAN_RECOVER
>   * and read/write to the device still works.
>   * @pdev: PCI device pointer
> --
> 2.27.0

Lee,

Thanks for the patch.
Ack-by: Nilesh Javali 



RE: [EXT] [PATCH 0/5 REBASED to v5.9-rc4] Qlogic drivers: Convert to SPDX license identifiers

2020-09-09 Thread Nilesh Javali
Lukas,

I have Acked for the storage drivers and opt for option B below for spdx 
maintainers to pick.

Thanks,
Nilesh

> -Original Message-
> From: Igor Russkikh 
> Sent: Wednesday, September 9, 2020 1:25 PM
> To: Lukas Bulwahn ; Thomas Gleixner
> ; linux-s...@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org; Nilesh Javali 
> Subject: Re: [EXT] [PATCH 0/5 REBASED to v5.9-rc4] Qlogic drivers: Convert to
> SPDX license identifiers
> 
> 
> 
> > Igor, can you please ack these patches?
> >
> > Igor, please also let us know:
> >   A. if you will pick them up and let them travel through your tree, or
> >   B. if the spdx maintainers shall pick them up and they shall route them
> >  directly to Linus.
> 
> Thanks Lukas,
> 
> Acked on ethernet driver patches. For storage drivers I believe you'll have
> ACK from Nilesh.
> 
> We don't manage our own tree, we normally do directly on netdev list.
> Thus I think its safe to go with (B) and do this through spdx tree.
> 
> Regards,
>   Igor


Re: [PATCH 2/5] scsi/qla2xxx: Convert to SPDX license identifiers

2020-09-09 Thread Nilesh Javali
Acked-by: Nilesh Javali 


Re: [PATCH 1/5] scsi/qla4xxx: Convert to SPDX license identifiers

2020-09-09 Thread Nilesh Javali
Acked-by: Nilesh Javali 



RE: [EXT] [PATCH] scsi: qla2xxx: Fix the return value

2020-08-31 Thread Nilesh Javali
Xianting Tian,

Thanks for the patch.

> -Original Message-
> From: Xianting Tian 
> Sent: Saturday, August 29, 2020 1:28 PM
> To: Nilesh Javali ; GR-QLogic-Storage-Upstream  qlogic-storage-upstr...@marvell.com>; j...@linux.ibm.com;
> martin.peter...@oracle.com
> Cc: linux-s...@vger.kernel.org; linux-kernel@vger.kernel.org; Xianting Tian
> 
> Subject: [EXT] [PATCH] scsi: qla2xxx: Fix the return value
> 
> External Email
> 
> --
> A negative error code should be returned.
> 
> Signed-off-by: Xianting Tian 
> ---
>  drivers/scsi/qla2xxx/qla_target.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/scsi/qla2xxx/qla_target.c
> b/drivers/scsi/qla2xxx/qla_target.c
> index fbb80a043..612e001cc 100644
> --- a/drivers/scsi/qla2xxx/qla_target.c
> +++ b/drivers/scsi/qla2xxx/qla_target.c
> @@ -3781,7 +3781,7 @@ int qlt_abort_cmd(struct qla_tgt_cmd *cmd)
>   "multiple abort. %p transport_state %x, t_state %x, "
>   "se_cmd_flags %x\n", cmd, cmd->se_cmd.transport_state,
>   cmd->se_cmd.t_state, cmd->se_cmd.se_cmd_flags);
> - return EIO;
> +     return -EIO;
>   }
>   cmd->aborted = 1;
>   cmd->trc_flags |= TRC_ABORT;
> --
> 2.17.1

Acked-by: Nilesh Javali 


Re: [PATCH 36/41] scsi: qla4xxx: ql4_os: mark expected switch fall-through

2018-12-24 Thread Nilesh Javali


On 11/28/18, 10:03 AM, "linux-scsi-ow...@vger.kernel.org on behalf of
Gustavo A. R. Silva"  wrote:

>External Email
>
>In preparation to enabling -Wimplicit-fallthrough, mark switch cases
>where we are expecting to fall through.
>
>Notice that, in this particular case, I replaced "allow fall-through"
>with a "fall through" annotation, which is what GCC is expecting to
>find.
>
>Signed-off-by: Gustavo A. R. Silva 
>---
> drivers/scsi/qla4xxx/ql4_os.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
>index 1c702cd22359..7fd3491ea2d9 100644
>--- a/drivers/scsi/qla4xxx/ql4_os.c
>+++ b/drivers/scsi/qla4xxx/ql4_os.c
>@@ -2876,7 +2876,7 @@ static int qla4xxx_session_get_param(struct
>iscsi_cls_session *cls_sess,
>chap_tbl.secret_len);
>}
>}
>-   /* allow fall-through */
>+   /* fall through */
>default:
>        return iscsi_session_get_param(cls_sess, param, buf);
>}
>--
>2.17.1

Thanks.
Acked-by: Nilesh Javali 



Re: [PATCH] [SCSI] qla4xxx: mark symbols static where possible

2016-09-01 Thread Nilesh Javali


On 29/08/16 4:16 PM, "Baoyou Xie"  wrote:

>We get 1 warning when build kernel with W=1:
>drivers/scsi/qla4xxx/ql4_nx.c:1846:10: warning: no previous prototype for
>'ql4_84xx_ipmdio_rd_reg' [-Wmissing-prototypes]
>
>In fact, this function is only used in the file in which it is
>declared and don't need a declaration, but can be made static.
>so this patch marks this function with 'static'.
>
>Signed-off-by: Baoyou Xie 
>---
> drivers/scsi/qla4xxx/ql4_nx.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/drivers/scsi/qla4xxx/ql4_nx.c b/drivers/scsi/qla4xxx/ql4_nx.c
>index ae87d6c..06ddd13 100644
>--- a/drivers/scsi/qla4xxx/ql4_nx.c
>+++ b/drivers/scsi/qla4xxx/ql4_nx.c
>@@ -1843,7 +1843,7 @@ static uint32_t ql4_84xx_poll_wait_for_ready(struct
>scsi_qla_host *ha,
>   return rval;
> }
> 
>-uint32_t ql4_84xx_ipmdio_rd_reg(struct scsi_qla_host *ha, uint32_t addr1,
>+static uint32_t ql4_84xx_ipmdio_rd_reg(struct scsi_qla_host *ha,
>uint32_t addr1,
>   uint32_t addr3, uint32_t mask, uint32_t addr,
>   uint32_t *data_ptr)
> {
>-- 
>2.7.4


Acked-by: Nilesh Javali 



Re: [patch] bnx2i: silence uninitialized variable warnings

2016-04-17 Thread Nilesh Javali


On 14/04/16 3:10 PM, "Dan Carpenter"  wrote:

>Presumably it isn't possible to have empty lists here, but my static
>checker doesn't know that and complains that "ep" can be used
>uninitialized.
>
>Signed-off-by: Dan Carpenter 
>
>diff --git a/drivers/scsi/bnx2i/bnx2i_iscsi.c
>b/drivers/scsi/bnx2i/bnx2i_iscsi.c
>index 7289437..133901f 100644
>--- a/drivers/scsi/bnx2i/bnx2i_iscsi.c
>+++ b/drivers/scsi/bnx2i/bnx2i_iscsi.c
>@@ -675,7 +675,7 @@ bnx2i_find_ep_in_ofld_list(struct bnx2i_hba *hba, u32
>iscsi_cid)
> {
>   struct list_head *list;
>   struct list_head *tmp;
>-  struct bnx2i_endpoint *ep;
>+  struct bnx2i_endpoint *ep = NULL;
> 
>   read_lock_bh(&hba->ep_rdwr_lock);
>   list_for_each_safe(list, tmp, &hba->ep_ofld_list) {
>@@ -703,7 +703,7 @@ bnx2i_find_ep_in_destroy_list(struct bnx2i_hba *hba,
>u32 iscsi_cid)
> {
>   struct list_head *list;
>   struct list_head *tmp;
>-  struct bnx2i_endpoint *ep;
>+  struct bnx2i_endpoint *ep = NULL;
> 
>   read_lock_bh(&hba->ep_rdwr_lock);
>   list_for_each_safe(list, tmp, &hba->ep_destroy_list) {

Acked-by: Nilesh Javali 



Re: [PATCH 5/7] scsi: qla4xxx: shut up warning for rd_reg_indirect

2016-02-01 Thread Nilesh Javali


On 27/01/16 9:27 PM, "Arnd Bergmann"  wrote:

>The qla4_83xx_rd_reg_indirect() function can fail when it is unable
>to read a register, but not all callers check its return value before
>using the register data, and gcc correctly warns about this:
>
>qla4xxx/ql4_83xx.c: In function 'qla4_83xx_process_reset_template':
>qla4xxx/ql4_83xx.c:1073:36: warning: 'value' may be used uninitialized in
>this function
> ha->reset_tmplt.array[index++] = value;
>^
>qla4xxx/ql4_83xx.c:1050:11: note: 'value' was declared here
>  uint32_t value;
>   ^
>qla4xxx/ql4_83xx.c:902:8: warning: 'value' may be used uninitialized in
>this function
>  value &= p_rmw_hdr->test_mask;
>^
>qla4xxx/ql4_83xx.c:895:11: note: 'value' was declared here
>  uint32_t value;
>   ^
>In file included from ../include/linux/io.h:25:0,
> from ../include/linux/pci.h:31,
> from ../drivers/scsi/qla4xxx/ql4_def.h:16,
> from ../drivers/scsi/qla4xxx/ql4_83xx.c:10:
>asm/io.h:101:2: warning: 'value' may be used uninitialized in this
>function
>  asm volatile("str %1, %0"
>  ^
>qla4xxx/ql4_83xx.c:874:11: note: 'value' was declared here
>  uint32_t value;
>   ^
>
>Unfortunately, I don't see any helpful way to add proper error handling
>for this case, and the failure scenario for rd_reg seems rather obscure,
>so this bails out and makes the rd_reg accessor set the result to
>0x
>so we at least get a predictable value.
>
>Signed-off-by: Arnd Bergmann 
>---
> drivers/scsi/qla4xxx/ql4_83xx.c | 6 --
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
>diff --git a/drivers/scsi/qla4xxx/ql4_83xx.c
>b/drivers/scsi/qla4xxx/ql4_83xx.c
>index 5d4f8e67fb25..638f72c5ab05 100644
>--- a/drivers/scsi/qla4xxx/ql4_83xx.c
>+++ b/drivers/scsi/qla4xxx/ql4_83xx.c
>@@ -46,11 +46,13 @@ int qla4_83xx_rd_reg_indirect(struct scsi_qla_host
>*ha, uint32_t addr,
> 
>   ret_val = qla4_83xx_set_win_base(ha, addr);
> 
>-  if (ret_val == QLA_SUCCESS)
>+  if (ret_val == QLA_SUCCESS) {
>   *data = qla4_83xx_rd_reg(ha, QLA83XX_WILDCARD);
>-  else
>+  } else {
>+  *data = 0x;
>   ql4_printk(KERN_ERR, ha, "%s: failed read of addr 0x%x!\n",
>  __func__, addr);
>+  }
> 
>   return ret_val;
> }
>-- 
>2.7.0
>

Acked-by: Nilesh Javali 




RE: [PATCH] qla4xxx: pass timeout as HZ independent value

2015-06-07 Thread Nilesh Javali

> -Original Message-
> From: Nicholas Mc Guire [mailto:hof...@osadl.org]
> Sent: Thursday, May 28, 2015 1:40 AM
> To: Dept-Eng QLogic Storage Upstream
> Cc: James E.J. Bottomley; linux-scsi; linux-kernel; Nicholas Mc Guire
> Subject: [PATCH] qla4xxx: pass timeout as HZ independent value
> 
> schedule_timeout_* takes a timeout in jiffies but the code currently is
> passing in a constant which makes this timeout HZ dependent, so pass it
> through msecs_to_jiffies() to fix this up.
> 
> patch was compile tested with x86_64_defconfig + SCSI_LOWLEVEL=y,
> CONFIG_SCSI_QLA_ISCSI=m
> 
> Patch is against 4.1-rc5 (localversion-next is -next-20150527)
> 
> Signed-off-by: Nicholas Mc Guire 
> ---
> 
> As there is no documentation of the intended timeout it might be wrong to
> convert it with msecs_to_jiffies as this can reduces the actual jiffies value 
> by
> at least a factor of 10 - so someone that knows this driver needs to check on
> the actual value - but in any case it needs to be passed in a HZ independent
> way.
> 
>  drivers/scsi/qla4xxx/ql4_nx.c |2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/scsi/qla4xxx/ql4_nx.c b/drivers/scsi/qla4xxx/ql4_nx.c
> index 7c33658..7b53eab 100644
> --- a/drivers/scsi/qla4xxx/ql4_nx.c
> +++ b/drivers/scsi/qla4xxx/ql4_nx.c
> @@ -1569,7 +1569,7 @@ static int qla4_82xx_cmdpeg_ready(struct
> scsi_qla_host *ha, int pegtune_val)
>   (val == PHAN_INITIALIZE_ACK))
>   return 0;
>   set_current_state(TASK_UNINTERRUPTIBLE);
> - schedule_timeout(500);
> +     schedule_timeout(msecs_to_jiffies(500));
> 
>   } while (--retries);
> 
> --
> 1.7.10.4

Acked-by: Nilesh Javali 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


RE: [PATCH 09/12] [SCSI] qla4xxx: Use DECLARE_BITMAP

2015-05-20 Thread Nilesh Javali
> -Original Message-
> From: Joe Perches [mailto:j...@perches.com]
> Sent: Wednesday, May 20, 2015 7:08 AM
> To: linux-kernel; Dept-Eng QLogic Storage Upstream
> Cc: James E.J. Bottomley; linux-scsi
> Subject: [PATCH 09/12] [SCSI] qla4xxx: Use DECLARE_BITMAP
> 
> Use the generic mechanism to declare a bitmap instead of unsigned long.
> 
> Signed-off-by: Joe Perches 
> ---
>  drivers/scsi/qla4xxx/ql4_def.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/scsi/qla4xxx/ql4_def.h b/drivers/scsi/qla4xxx/ql4_def.h
> index 8f6d0fb..32341ac 100644
> --- a/drivers/scsi/qla4xxx/ql4_def.h
> +++ b/drivers/scsi/qla4xxx/ql4_def.h
> @@ -795,7 +795,7 @@ struct scsi_qla_host {
> 
>  #define CHAP_DMA_BLOCK_SIZE512
>   struct workqueue_struct *task_wq;
> - unsigned long ddb_idx_map[MAX_DDB_ENTRIES / BITS_PER_LONG];
> + DECLARE_BITMAP(ddb_idx_map, MAX_DDB_ENTRIES);
>  #define SYSFS_FLAG_FW_SEL_BOOT 2
>   struct iscsi_boot_kset *boot_kset;
>   struct ql4_boot_tgt_info boot_tgt;
> --
> 2.1.2

Reviewed-by: Nilesh Javali 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


RE: [PATCH] scsi:qla4xxx: Fix typo in qla4xxx

2015-05-08 Thread Nilesh Javali
Acked-by: Nilesh Javali 


> -Original Message-
> From: Masanari Iida [mailto:standby2...@gmail.com]
> Sent: Thursday, May 07, 2015 7:58 PM
> To: linux-kernel; Dept-Eng QLogic Storage Upstream; jbottom...@odin.com;
> linux-scsi
> Cc: triv...@kernel.org; Masanari Iida
> Subject: [PATCH] scsi:qla4xxx: Fix typo in qla4xxx
> 
> This patch fix spelling typo in printk within drivers/qla4xxx.
> 
> Signed-off-by: Masanari Iida 
> ---
>  drivers/scsi/qla4xxx/ql4_83xx.c | 2 +-
>  drivers/scsi/qla4xxx/ql4_bsg.c  | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/scsi/qla4xxx/ql4_83xx.c b/drivers/scsi/qla4xxx/ql4_83xx.c
> index 556c152..5d4f8e6 100644
> --- a/drivers/scsi/qla4xxx/ql4_83xx.c
> +++ b/drivers/scsi/qla4xxx/ql4_83xx.c
> @@ -828,7 +828,7 @@ void qla4_83xx_read_reset_template(struct
> scsi_qla_host *ha)
>   ret_val = qla4_83xx_flash_read_u32(ha, addr, p_buff,
>  tmplt_hdr_def_size);
>   if (ret_val != QLA_SUCCESS) {
> - ql4_printk(KERN_ERR, ha, "%s: Failed to read reset
> tempelate\n",
> + ql4_printk(KERN_ERR, ha, "%s: Failed to read reset
> template\n",
>  __func__);
>   goto exit_read_template_error;
>   }
> diff --git a/drivers/scsi/qla4xxx/ql4_bsg.c b/drivers/scsi/qla4xxx/ql4_bsg.c
> index 9f92cbf..415ee5e 100644
> --- a/drivers/scsi/qla4xxx/ql4_bsg.c
> +++ b/drivers/scsi/qla4xxx/ql4_bsg.c
> @@ -571,7 +571,7 @@ static int qla4_83xx_pre_loopback_config(struct
> scsi_qla_host *ha,
> 
>   if ((config & ENABLE_INTERNAL_LOOPBACK) ||
>   (config & ENABLE_EXTERNAL_LOOPBACK)) {
> - ql4_printk(KERN_INFO, ha, "%s: Loopback diagnostics already
> in progress. Invalid requiest\n",
> + ql4_printk(KERN_INFO, ha, "%s: Loopback diagnostics already
> in
> +progress. Invalid request\n",
>  __func__);
>   goto exit_pre_loopback_config;
>   }
> --
> 2.4.0.rc3.3.g6eb1401

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


RE: [PATCH] scsi: unnecessary double init_completion removed

2014-12-31 Thread Nilesh Javali
Acked-by: Nilesh Javali 

I will send the maintainer list update patch.

Thanks,
Nilesh

-Original Message-
From: Nicholas Mc Guire [mailto:der.h...@hofr.at] 
Sent: Tuesday, December 23, 2014 11:30 PM
To: James E.J. Bottomley
Cc: Dept-Eng iSCSI Driver; linux-scsi; linux-kernel; Nicholas Mc Guire
Subject: [PATCH] scsi: unnecessary double init_completion removed

The double call to init_completion(&ha->disable_acb_comp); looks like an 
editing mistake only - dropped.

patch is against 3.18.0 linux-next

scripts/get_maintainer.pl -f drivers/scsi/qla4xxx/ql4_os.c returned Vikas 
Chaudhary  (supporter:QLOGIC QLA4XXX iS...) but 
that no longer seems to be a valid e-mail address.

Signed-off-by: Nicholas Mc Guire 
---
 drivers/scsi/qla4xxx/ql4_os.c |1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c 
index 6d25879..0c1da76 100644
--- a/drivers/scsi/qla4xxx/ql4_os.c
+++ b/drivers/scsi/qla4xxx/ql4_os.c
@@ -8672,7 +8672,6 @@ static int qla4xxx_probe_adapter(struct pci_dev *pdev,
init_completion(&ha->disable_acb_comp);
init_completion(&ha->idc_comp);
init_completion(&ha->link_up_comp);
-   init_completion(&ha->disable_acb_comp);

spin_lock_init(&ha->hardware_lock);
spin_lock_init(&ha->work_lock);
--
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


RE: [PATCH] scsi: qla4xxx: ql4_mbx.c: Cleaning up missing null-terminate in conjunction with strncpy

2014-07-29 Thread Nilesh Javali
Acked-By: Nilesh Javali 


-Original Message-
From: Rickard Strandqvist [mailto:rickard_strandqv...@spectrumdigital.se] 
Sent: Sunday, July 27, 2014 8:28 PM
To: Vikas Chaudhary; Dept-Eng iSCSI Driver
Cc: Rickard Strandqvist; James E.J. Bottomley; linux-scsi; linux-kernel
Subject: [PATCH] scsi: qla4xxx: ql4_mbx.c: Cleaning up missing null-terminate 
in conjunction with strncpy

Replacing strncpy with strlcpy to avoid strings that lacks null terminate.
And in some cases modified to copy one character less than the overall length, 
as the entire area is already zeroed.

Signed-off-by: Rickard Strandqvist 
---
 drivers/scsi/qla4xxx/ql4_mbx.c |   14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/scsi/qla4xxx/ql4_mbx.c b/drivers/scsi/qla4xxx/ql4_mbx.c 
index 0a3312c..2b2756e 100644
--- a/drivers/scsi/qla4xxx/ql4_mbx.c
+++ b/drivers/scsi/qla4xxx/ql4_mbx.c
@@ -1620,8 +1620,8 @@ int qla4xxx_get_chap(struct scsi_qla_host *ha, char 
*username, char *password,
goto exit_get_chap;
}
 
-   strncpy(password, chap_table->secret, QL4_CHAP_MAX_SECRET_LEN);
-   strncpy(username, chap_table->name, QL4_CHAP_MAX_NAME_LEN);
+   strlcpy(password, chap_table->secret, QL4_CHAP_MAX_SECRET_LEN);
+   strlcpy(username, chap_table->name, QL4_CHAP_MAX_NAME_LEN);
chap_table->cookie = __constant_cpu_to_le16(CHAP_VALID_COOKIE);
 
 exit_get_chap:
@@ -1663,8 +1663,8 @@ int qla4xxx_set_chap(struct scsi_qla_host *ha, char 
*username, char *password,
else
chap_table->flags |= BIT_7; /* local */
chap_table->secret_len = strlen(password);
-   strncpy(chap_table->secret, password, MAX_CHAP_SECRET_LEN);
-   strncpy(chap_table->name, username, MAX_CHAP_NAME_LEN);
+   strncpy(chap_table->secret, password, MAX_CHAP_SECRET_LEN - 1);
+   strncpy(chap_table->name, username, MAX_CHAP_NAME_LEN - 1);
chap_table->cookie = __constant_cpu_to_le16(CHAP_VALID_COOKIE);
 
if (is_qla40XX(ha)) {
@@ -1742,8 +1742,8 @@ int qla4xxx_get_uni_chap_at_index(struct scsi_qla_host 
*ha, char *username,
goto exit_unlock_uni_chap;
}
 
-   strncpy(password, chap_table->secret, MAX_CHAP_SECRET_LEN);
-   strncpy(username, chap_table->name, MAX_CHAP_NAME_LEN);
+   strlcpy(password, chap_table->secret, MAX_CHAP_SECRET_LEN);
+   strlcpy(username, chap_table->name, MAX_CHAP_NAME_LEN);
 
rval = QLA_SUCCESS;
 
@@ -2295,7 +2295,7 @@ int qla4_8xxx_set_param(struct scsi_qla_host *ha, int 
param)
if (param == SET_DRVR_VERSION) {
mbox_cmd[1] = SET_DRVR_VERSION;
strncpy((char *)&mbox_cmd[2], QLA4XXX_DRIVER_VERSION,
-   MAX_DRVR_VER_LEN);
+   MAX_DRVR_VER_LEN - 1);
} else {
ql4_printk(KERN_ERR, ha, "%s: invalid parameter 0x%x\n",
   __func__, param);
--
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


RE: [PATCH] scsi: qla4xxx: ql4_os.c: Cleaning up missing null-terminate in conjunction with strncpy

2014-07-29 Thread Nilesh Javali
Acked-By: Nilesh Javali 


-Original Message-
From: Rickard Strandqvist [mailto:rickard_strandqv...@spectrumdigital.se] 
Sent: Saturday, July 26, 2014 8:20 PM
To: Vikas Chaudhary; Dept-Eng iSCSI Driver
Cc: Rickard Strandqvist; James E.J. Bottomley; linux-scsi; linux-kernel
Subject: [PATCH] scsi: qla4xxx: ql4_os.c: Cleaning up missing null-terminate in 
conjunction with strncpy

Replacing strncpy with strlcpy to avoid strings that lacks null terminate.

Signed-off-by: Rickard Strandqvist 
---
 drivers/scsi/qla4xxx/ql4_os.c |   14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c 
index 3202063..a07c53e 100644
--- a/drivers/scsi/qla4xxx/ql4_os.c
+++ b/drivers/scsi/qla4xxx/ql4_os.c
@@ -756,9 +756,9 @@ static int qla4xxx_get_chap_list(struct Scsi_Host *shost, 
uint16_t chap_tbl_idx,
continue;
 
chap_rec->chap_tbl_idx = i;
-   strncpy(chap_rec->username, chap_table->name,
+   strlcpy(chap_rec->username, chap_table->name,
ISCSI_CHAP_AUTH_NAME_MAX_LEN);
-   strncpy(chap_rec->password, chap_table->secret,
+   strlcpy(chap_rec->password, chap_table->secret,
QL4_CHAP_MAX_SECRET_LEN);
chap_rec->password_length = chap_table->secret_len;
 
@@ -6027,8 +6027,8 @@ static int qla4xxx_get_bidi_chap(struct scsi_qla_host 
*ha, char *username,
if (!(chap_table->flags & BIT_6)) /* Not BIDI */
continue;
 
-   strncpy(password, chap_table->secret, QL4_CHAP_MAX_SECRET_LEN);
-   strncpy(username, chap_table->name, QL4_CHAP_MAX_NAME_LEN);
+   strlcpy(password, chap_table->secret, QL4_CHAP_MAX_SECRET_LEN);
+   strlcpy(username, chap_table->name, QL4_CHAP_MAX_NAME_LEN);
ret = 0;
break;
}
@@ -6258,8 +6258,8 @@ static void qla4xxx_get_param_ddb(struct ddb_entry 
*ddb_entry,
 
tddb->tpgt = sess->tpgt;
tddb->port = conn->persistent_port;
-   strncpy(tddb->iscsi_name, sess->targetname, ISCSI_NAME_SIZE);
-   strncpy(tddb->ip_addr, conn->persistent_address, DDB_IPADDR_LEN);
+   strlcpy(tddb->iscsi_name, sess->targetname, ISCSI_NAME_SIZE);
+   strlcpy(tddb->ip_addr, conn->persistent_address, DDB_IPADDR_LEN);
 }
 
 static void qla4xxx_convert_param_ddb(struct dev_db_entry *fw_ddb_entry, @@ 
-7764,7 +7764,7 @@ static int qla4xxx_sysfs_ddb_logout(struct 
iscsi_bus_flash_session *fnode_sess,
goto exit_ddb_logout;
}
 
-   strncpy(flash_tddb->iscsi_name, fnode_sess->targetname,
+   strlcpy(flash_tddb->iscsi_name, fnode_sess->targetname,
ISCSI_NAME_SIZE);
 
if (!strncmp(fnode_sess->portal_type, PORTAL_TYPE_IPV6, 4))
--
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/