mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] dax: use assign_bit() where applicable
@ 2026-09-19 13:07 Peng Fan (OSS)
  2026-09-21  8:24 ` Gupta, Pankaj
  2026-09-21 23:10 ` Dave Jiang
  0 siblings, 2 replies; 4+ messages in thread
From: Peng Fan (OSS) @ 2026-09-19 13:07 UTC (permalink / raw)
  To: Dan Williams, Vishal Verma, Dave Jiang, Alison Schofield
  Cc: linux-kernel, Peng Fan, nvdimm, linux-cxl

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/dax/super.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/dax/super.c b/drivers/dax/super.c
index 45f84b0eb909..60c4aec52ae1 100644
--- a/drivers/dax/super.c
+++ b/drivers/dax/super.c
@@ -385,10 +385,7 @@ EXPORT_SYMBOL_GPL(dax_flush);
 
 void dax_write_cache(struct dax_device *dax_dev, bool wc)
 {
-	if (wc)
-		set_bit(DAXDEV_WRITE_CACHE, &dax_dev->flags);
-	else
-		clear_bit(DAXDEV_WRITE_CACHE, &dax_dev->flags);
+	assign_bit(DAXDEV_WRITE_CACHE, &dax_dev->flags, wc);
 }
 EXPORT_SYMBOL_GPL(dax_write_cache);
 
-- 
2.51.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-09-21 23:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-19 13:07 [PATCH] dax: use assign_bit() where applicable Peng Fan (OSS)
2026-09-21  8:24 ` Gupta, Pankaj
2026-09-21 23:08   ` Jonathan Cameron
2026-09-21 23:10 ` Dave Jiang

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®