mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Himanshu Madhani <himanshu.madhani@oracle.com>
To: Tom Rix <trix@redhat.com>
Cc: Nilesh Javali <njavali@marvell.com>,
	"James E.J. Bottomley" <jejb@linux.ibm.com>,
	Martin Petersen <martin.petersen@oracle.com>,
	GR-QLogic-Storage-Upstream
	<GR-QLogic-Storage-Upstream@marvell.com>,
	linux-scsi <linux-scsi@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] scsi: qla2xxx: remove setting of 'req' and 'rsp' parameter
Date: Tue, 24 May 2022 18:10:18 +0000	[thread overview]
Message-ID: <A39923A2-373C-4EF8-997B-2A12821ED4E8@oracle.com> (raw)
In-Reply-To: <20220521201607.4145298-1-trix@redhat.com>



> On May 21, 2022, at 1:16 PM, Tom Rix <trix@redhat.com> wrote:
> 
> cppcheck reports
> [drivers/scsi/qla2xxx/qla_mid.c:594]: (warning) Assignment of function parameter has no effect outside the function. Did you forget dereferencing it?
> [drivers/scsi/qla2xxx/qla_mid.c:620]: (warning) Assignment of function parameter has no effect outside the function. Did you forget dereferencing it?
> 
> The functions qla25xx_free_req_que and qla25xx_free_rsp_que are similar.
> They free a 'req' and a 'rsp' parameter respectively.  The last statement of
> both functions is setting the parameter to NULL.  This has no effect and
> can be removed.
> 
> Signed-off-by: Tom Rix <trix@redhat.com>
> ---
> drivers/scsi/qla2xxx/qla_mid.c | 2 --
> 1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/scsi/qla2xxx/qla_mid.c b/drivers/scsi/qla2xxx/qla_mid.c
> index e6b5c4ccce97..346d47b61c07 100644
> --- a/drivers/scsi/qla2xxx/qla_mid.c
> +++ b/drivers/scsi/qla2xxx/qla_mid.c
> @@ -591,7 +591,6 @@ qla25xx_free_req_que(struct scsi_qla_host *vha, struct req_que *req)
> 	}
> 	kfree(req->outstanding_cmds);
> 	kfree(req);
> -	req = NULL;
> }
> 
> static void
> @@ -617,7 +616,6 @@ qla25xx_free_rsp_que(struct scsi_qla_host *vha, struct rsp_que *rsp)
> 		mutex_unlock(&ha->vport_lock);
> 	}
> 	kfree(rsp);
> -	rsp = NULL;
> }
> 
> int
> -- 
> 2.27.0
> 

Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>

--
Himanshu Madhani	Oracle Linux Engineering


  reply	other threads:[~2022-05-24 18:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-21 20:16 Tom Rix
2022-05-24 18:10 ` Himanshu Madhani [this message]
2022-06-02  2:46 ` Martin K. Petersen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=A39923A2-373C-4EF8-997B-2A12821ED4E8@oracle.com \
    --to=himanshu.madhani@oracle.com \
    --cc=GR-QLogic-Storage-Upstream@marvell.com \
    --cc=jejb@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=njavali@marvell.com \
    --cc=trix@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®