diff mbox series

gpio: regmap: fix type clash

Message ID 20200725232337.27581-1-michael@walle.cc
State New
Headers show
Series gpio: regmap: fix type clash | expand

Commit Message

Michael Walle July 25, 2020, 11:23 p.m. UTC
GPIO_REGMAP_ADDR_ZERO() cast to unsigned long but the actual config
parameters are unsigned int. We use unsigned int here because that is
the type which is used by the underlying regmap.

Fixes: ebe363197e52 ("gpio: add a reusable generic gpio_chip using regmap")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Michael Walle <michael@walle.cc>
---
 include/linux/gpio/regmap.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Linus Walleij July 26, 2020, 10:28 p.m. UTC | #1
On Sun, Jul 26, 2020 at 1:23 AM Michael Walle <michael@walle.cc> wrote:

> GPIO_REGMAP_ADDR_ZERO() cast to unsigned long but the actual config
> parameters are unsigned int. We use unsigned int here because that is
> the type which is used by the underlying regmap.
>
> Fixes: ebe363197e52 ("gpio: add a reusable generic gpio_chip using regmap")
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Michael Walle <michael@walle.cc>

Patch applied, thanks!

Yours,
Linus Walleij
diff mbox series

Patch

diff --git a/include/linux/gpio/regmap.h b/include/linux/gpio/regmap.h
index 4c1e6b34e824..ad76f3d0a6ba 100644
--- a/include/linux/gpio/regmap.h
+++ b/include/linux/gpio/regmap.h
@@ -8,7 +8,7 @@  struct gpio_regmap;
 struct irq_domain;
 struct regmap;
 
-#define GPIO_REGMAP_ADDR_ZERO ((unsigned long)(-1))
+#define GPIO_REGMAP_ADDR_ZERO ((unsigned int)(-1))
 #define GPIO_REGMAP_ADDR(addr) ((addr) ? : GPIO_REGMAP_ADDR_ZERO)
 
 /**