* [PATCH] nvme: use assign_bit() where applicable
@ 2026-09-19 13:08 Peng Fan (OSS)
2026-09-21 6:50 ` Christoph Hellwig
2026-09-22 15:03 ` Keith Busch
0 siblings, 2 replies; 3+ messages in thread
From: Peng Fan (OSS) @ 2026-09-19 13:08 UTC (permalink / raw)
To: Keith Busch, Jens Axboe, Christoph Hellwig, Sagi Grimberg
Cc: linux-kernel, Peng Fan, linux-nvme
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] nvme: use assign_bit() where applicable
2026-09-19 13:08 [PATCH] nvme: use assign_bit() where applicable Peng Fan (OSS)
@ 2026-09-21 6:50 ` Christoph Hellwig
2026-09-22 15:03 ` Keith Busch
1 sibling, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2026-09-21 6:50 UTC (permalink / raw)
To: Peng Fan (OSS)
Cc: Keith Busch, Jens Axboe, Christoph Hellwig, Sagi Grimberg,
linux-kernel, Peng Fan, linux-nvme
Looks good:
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] nvme: use assign_bit() where applicable
2026-09-19 13:08 [PATCH] nvme: use assign_bit() where applicable Peng Fan (OSS)
2026-09-21 6:50 ` Christoph Hellwig
@ 2026-09-22 15:03 ` Keith Busch
1 sibling, 0 replies; 3+ messages in thread
From: Keith Busch @ 2026-09-22 15:03 UTC (permalink / raw)
To: Peng Fan (OSS)
Cc: Jens Axboe, Christoph Hellwig, Sagi Grimberg, linux-kernel,
Peng Fan, linux-nvme
On Sat, Sep 19, 2026 at 09:08:19PM +0800, Peng Fan (OSS) wrote:
> From: Peng Fan <peng.fan@nxp.com>
>
> Convert open-coded if/else with set_bit/clear_bit to the assign_bit API.
Thanks, applied to nvme-7.4.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-09-22 15:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-19 13:08 [PATCH] nvme: use assign_bit() where applicable Peng Fan (OSS)
2026-09-21 6:50 ` Christoph Hellwig
2026-09-22 15:03 ` Keith Busch
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®