linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Himanshu Madhani <himanshu.madhani@oracle.com>
To: Pavel Machek <pavel@denx.de>
Cc: Nilesh Javali <njavali@marvell.com>,
	GR-QLogic-Storage-Upstream@marvell.com, jejb@linux.ibm.com,
	martin.petersen@oracle.com, linux-scsi@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] qla2xxx: Use constant when it is known.
Date: Wed, 7 Oct 2020 08:29:24 -0500	[thread overview]
Message-ID: <39CE3456-73A7-4533-BE7F-382469695E08@oracle.com> (raw)
In-Reply-To: <20200921112340.GA19336@duo.ucw.cz>



> On Sep 21, 2020, at 6:23 AM, Pavel Machek <pavel@denx.de> wrote:
> 
> Directly return constant when it is known, to make code easier to
> understand.
> 
> Signed-off-by: Pavel Machek (CIP) <pavel@denx.de>
> 
> diff --git a/drivers/scsi/qla2xxx/qla_nvme.c b/drivers/scsi/qla2xxx/qla_nvme.c
> index 90bbc61f361b..248197e9e8ea 100644
> --- a/drivers/scsi/qla2xxx/qla_nvme.c
> +++ b/drivers/scsi/qla2xxx/qla_nvme.c
> @@ -530,7 +530,7 @@ static int qla_nvme_post_cmd(struct nvme_fc_local_port *lport,
> 	fc_port_t *fcport;
> 	struct srb_iocb *nvme;
> 	struct scsi_qla_host *vha;
> -	int rval = -ENODEV;
> +	int rval;
> 	srb_t *sp;
> 	struct qla_qpair *qpair = hw_queue_handle;
> 	struct nvme_private *priv = fd->private;
> @@ -538,14 +538,14 @@ static int qla_nvme_post_cmd(struct nvme_fc_local_port *lport,
> 
> 	if (!priv) {
> 		/* nvme association has been torn down */
> -		return rval;
> +		return -ENODEV;
> 	}
> 
> 	fcport = qla_rport->fcport;
> 
> 	if (!qpair || !fcport || (qpair && !qpair->fw_started) ||
> 	    (fcport && fcport->deleted))
> -		return rval;
> +		return -ENODEV;
> 
> 	vha = fcport->vha;
> 	/*
> 
> -- 
> (english) http://www.livejournal.com/~pavelmachek
> (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

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

--
Himanshu Madhani	 Oracle Linux Engineering


  reply	other threads:[~2020-10-07 13:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-21 11:23 [PATCH] qla2xxx: Use constant when it is known Pavel Machek
2020-10-07 13:29 ` Himanshu Madhani [this message]
2020-10-08  2:12 ` Martin K. Petersen
2020-10-13 22:42 ` 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=39CE3456-73A7-4533-BE7F-382469695E08@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=pavel@denx.de \
    /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;
as well as URLs for NNTP newsgroup(s).