From: "Peng Fan (OSS)" <peng.fan@oss.nxp.com>
To: Keith Busch <kbusch@kernel.org>, Jens Axboe <axboe@kernel.dk>,
Christoph Hellwig <hch@lst.de>, Sagi Grimberg <sagi@grimberg.me>
Cc: linux-kernel@vger.kernel.org, Peng Fan <peng.fan@nxp.com>,
linux-nvme@lists.infradead.org
Subject: [PATCH] nvme: use assign_bit() where applicable
Date: Sat, 19 Sep 2026 21:08:19 +0800 [thread overview]
Message-ID: <20260919130820.3041544-1-peng.fan@oss.nxp.com> (raw)
From: Peng Fan <peng.fan@nxp.com>
Convert open-coded if/else with set_bit/clear_bit to the assign_bit API.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
drivers/nvme/host/multipath.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/nvme/host/multipath.c b/drivers/nvme/host/multipath.c
index 75dbb58286a3..98b167df61f4 100644
--- a/drivers/nvme/host/multipath.c
+++ b/drivers/nvme/host/multipath.c
@@ -1167,10 +1167,7 @@ static ssize_t delayed_removal_secs_store(struct device *dev,
mutex_lock(&head->subsys->lock);
head->delayed_removal_secs = sec;
- if (sec)
- set_bit(NVME_NSHEAD_QUEUE_IF_NO_PATH, &head->flags);
- else
- clear_bit(NVME_NSHEAD_QUEUE_IF_NO_PATH, &head->flags);
+ assign_bit(NVME_NSHEAD_QUEUE_IF_NO_PATH, &head->flags, sec);
mutex_unlock(&head->subsys->lock);
/*
* Ensure that update to NVME_NSHEAD_QUEUE_IF_NO_PATH is seen
--
2.51.0
next reply other threads:[~2026-09-19 13:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-19 13:08 Peng Fan (OSS) [this message]
2026-09-21 6:50 ` Christoph Hellwig
2026-09-22 15:03 ` Keith Busch
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=20260919130820.3041544-1-peng.fan@oss.nxp.com \
--to=peng.fan@oss.nxp.com \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=kbusch@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=peng.fan@nxp.com \
--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
all inboxes | Powered by JetHome®