diff mbox series

qla2xxx: Remove return value from qla_nvme_ls()

Message ID 20200520130819.90625-1-dwagner@suse.de (mailing list archive)
State Mainlined
Commit ac988c49367a52b466285239361ede0f74c672da
Headers show
Series qla2xxx: Remove return value from qla_nvme_ls() | expand

Commit Message

Daniel Wagner May 20, 2020, 1:08 p.m. UTC
The function always returns QLA_SUCCESS and the caller
qla2x00_start_sp() doesn't even evalute the return value. So there is
no point in returning a status.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
---
 drivers/scsi/qla2xxx/qla_iocb.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

Comments

Johannes Thumshirn May 20, 2020, 1:36 p.m. UTC | #1
Looks good,
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Bart Van Assche May 20, 2020, 3:51 p.m. UTC | #2
On 2020-05-20 06:08, Daniel Wagner wrote:
> The function always returns QLA_SUCCESS and the caller
> qla2x00_start_sp() doesn't even evalute the return value. So there is
> no point in returning a status.

Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Roman Bolshakov May 20, 2020, 4:03 p.m. UTC | #3
On Wed, May 20, 2020 at 03:08:19PM +0200, Daniel Wagner wrote:
> The function always returns QLA_SUCCESS and the caller
> qla2x00_start_sp() doesn't even evalute the return value. So there is
> no point in returning a status.
> 
> Signed-off-by: Daniel Wagner <dwagner@suse.de>
> ---
>  drivers/scsi/qla2xxx/qla_iocb.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/drivers/scsi/qla2xxx/qla_iocb.c b/drivers/scsi/qla2xxx/qla_iocb.c
> index b039bd83f947..8865c35d3421 100644
> --- a/drivers/scsi/qla2xxx/qla_iocb.c
> +++ b/drivers/scsi/qla2xxx/qla_iocb.c
> @@ -3607,11 +3607,10 @@ static void qla2x00_send_notify_ack_iocb(srb_t *sp,
>  /*
>   * Build NVME LS request
>   */
> -static int
> +static void
>  qla_nvme_ls(srb_t *sp, struct pt_ls4_request *cmd_pkt)
>  {
>  	struct srb_iocb *nvme;
> -	int     rval = QLA_SUCCESS;
>  
>  	nvme = &sp->u.iocb_cmd;
>  	cmd_pkt->entry_type = PT_LS4_REQUEST;
> @@ -3631,8 +3630,6 @@ qla_nvme_ls(srb_t *sp, struct pt_ls4_request *cmd_pkt)
>  	cmd_pkt->rx_byte_count = cpu_to_le32(nvme->u.nvme.rsp_len);
>  	cmd_pkt->dsd[1].length = cpu_to_le32(nvme->u.nvme.rsp_len);
>  	put_unaligned_le64(nvme->u.nvme.rsp_dma, &cmd_pkt->dsd[1].address);
> -
> -	return rval;
>  }
>  
>  static void
> -- 
> 2.16.4
> 

Reviewed-by: Roman Bolshakov <r.bolshakov@yadro.com>

Thanks,
Roman
Himanshu Madhani May 20, 2020, 4:41 p.m. UTC | #4
Daniel,

On 5/20/20 8:08 AM, Daniel Wagner wrote:
> The function always returns QLA_SUCCESS and the caller
> qla2x00_start_sp() doesn't even evalute the return value. So there is
> no point in returning a status.
> 
> Signed-off-by: Daniel Wagner<dwagner@suse.de>
> ---

Good Catch.

Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Martin K. Petersen May 27, 2020, 2:12 a.m. UTC | #5
On Wed, 20 May 2020 15:08:19 +0200, Daniel Wagner wrote:

> The function always returns QLA_SUCCESS and the caller
> qla2x00_start_sp() doesn't even evalute the return value. So there is
> no point in returning a status.

Applied to 5.8/scsi-queue, thanks!

[1/1] scsi: qla2xxx: Remove return value from qla_nvme_ls()
      https://git.kernel.org/mkp/scsi/c/ac988c49367a
diff mbox series

Patch

diff --git a/drivers/scsi/qla2xxx/qla_iocb.c b/drivers/scsi/qla2xxx/qla_iocb.c
index b039bd83f947..8865c35d3421 100644
--- a/drivers/scsi/qla2xxx/qla_iocb.c
+++ b/drivers/scsi/qla2xxx/qla_iocb.c
@@ -3607,11 +3607,10 @@  static void qla2x00_send_notify_ack_iocb(srb_t *sp,
 /*
  * Build NVME LS request
  */
-static int
+static void
 qla_nvme_ls(srb_t *sp, struct pt_ls4_request *cmd_pkt)
 {
 	struct srb_iocb *nvme;
-	int     rval = QLA_SUCCESS;
 
 	nvme = &sp->u.iocb_cmd;
 	cmd_pkt->entry_type = PT_LS4_REQUEST;
@@ -3631,8 +3630,6 @@  qla_nvme_ls(srb_t *sp, struct pt_ls4_request *cmd_pkt)
 	cmd_pkt->rx_byte_count = cpu_to_le32(nvme->u.nvme.rsp_len);
 	cmd_pkt->dsd[1].length = cpu_to_le32(nvme->u.nvme.rsp_len);
 	put_unaligned_le64(nvme->u.nvme.rsp_dma, &cmd_pkt->dsd[1].address);
-
-	return rval;
 }
 
 static void