From: Daniel Wagner <dwagner@suse.de>
To: linux-nvme@lists.infradead.org
Cc: linux-kernel@vger.kernel.org, Keith Busch <kbusch@kernel.org>,
Jens Axboe <axboe@fb.com>, Christoph Hellwig <hch@lst.de>,
Sagi Grimberg <sagi@grimberg.me>,
Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>,
Hannes Reinecke <hare@suse.de>, Chao Leng <lengchao@huawei.com>,
Daniel Wagner <dwagner@suse.de>
Subject: [PATCH v2 2/3] nvme: Remove superflues else in nvme_ctrl_loss_tmo_store
Date: Thu, 1 Apr 2021 11:54:11 +0200 [thread overview]
Message-ID: <20210401095412.84254-3-dwagner@suse.de> (raw)
In-Reply-To: <20210401095412.84254-1-dwagner@suse.de>
If there is an error we will leave the function early. So there
is no need for an else. Remove it.
Signed-off-by: Daniel Wagner <dwagner@suse.de>
---
drivers/nvme/host/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index b94a30e7298d..d2b4c5567209 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -3659,7 +3659,7 @@ static ssize_t nvme_ctrl_loss_tmo_store(struct device *dev,
if (err)
return -EINVAL;
- else if (ctrl_loss_tmo < 0)
+ if (ctrl_loss_tmo < 0)
opts->max_reconnects = -1;
else
opts->max_reconnects = DIV_ROUND_UP(ctrl_loss_tmo,
--
2.29.2
next prev parent reply other threads:[~2021-04-01 9:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-01 9:54 [PATCH v2 0/3] Export fast_io_fail_tmo to sysfs Daniel Wagner
2021-04-01 9:54 ` [PATCH v2 1/3] nvme: Use sysfs_emit instead of sprintf Daniel Wagner
2021-04-01 9:54 ` Daniel Wagner [this message]
2021-04-01 15:12 ` [PATCH v2 2/3] nvme: Remove superflues else in nvme_ctrl_loss_tmo_store Keith Busch
2021-04-01 9:54 ` [PATCH v2 3/3] nvme: Export fast_io_fail_tmo to sysfs Daniel Wagner
2021-04-02 16:50 ` [PATCH v2 0/3] " Christoph Hellwig
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=20210401095412.84254-3-dwagner@suse.de \
--to=dwagner@suse.de \
--cc=axboe@fb.com \
--cc=chaitanya.kulkarni@wdc.com \
--cc=hare@suse.de \
--cc=hch@lst.de \
--cc=kbusch@kernel.org \
--cc=lengchao@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=sagi@grimberg.me \
/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