mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 1/1] regmap: irq: Use one way of setting all bits in the register
@ 2025-02-06 19:16 Andy Shevchenko
  2025-02-07 15:51 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Andy Shevchenko @ 2025-02-06 19:16 UTC (permalink / raw)
  To: Mark Brown, Matti Vaittinen, linux-kernel
  Cc: Greg Kroah-Hartman, Rafael J. Wysocki, Danilo Krummrich, Andy Shevchenko

Currently there are two ways of how we represent all bits set, i.e.
UINT_MAX and GENMASK(31, 0). Use the former as the single way of
doing that, which is crystal clear on how we fill the unsigned int
value.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
v2: used UINT_MAX (Mark)
 drivers/base/regmap/regmap-irq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/base/regmap/regmap-irq.c b/drivers/base/regmap/regmap-irq.c
index 0bcd81389a29..e5631188d692 100644
--- a/drivers/base/regmap/regmap-irq.c
+++ b/drivers/base/regmap/regmap-irq.c
@@ -823,7 +823,7 @@ int regmap_add_irq_chip_fwnode(struct fwnode_handle *fwnode,
 		/* Ack masked but set interrupts */
 		if (d->chip->no_status) {
 			/* no status register so default to all active */
-			d->status_buf[i] = GENMASK(31, 0);
+			d->status_buf[i] = UINT_MAX;
 		} else {
 			reg = d->get_irq_reg(d, d->chip->status_base, i);
 			ret = regmap_read(map, reg, &d->status_buf[i]);
-- 
2.43.0.rc1.1336.g36b5255a03ac


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

end of thread, other threads:[~2025-02-07 15:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-02-06 19:16 [PATCH v2 1/1] regmap: irq: Use one way of setting all bits in the register Andy Shevchenko
2025-02-07 15:51 ` Mark Brown

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®