Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

gpio: regmap: fix type clash

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>
Link: https://lore.kernel.org/r/20200725232337.27581-1-michael@walle.cc
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

authored by

Michael Walle and committed by
Linus Walleij
a070bdbb 8fc3ed3a

+1 -1
+1 -1
include/linux/gpio/regmap.h
··· 8 8 struct irq_domain; 9 9 struct regmap; 10 10 11 - #define GPIO_REGMAP_ADDR_ZERO ((unsigned long)(-1)) 11 + #define GPIO_REGMAP_ADDR_ZERO ((unsigned int)(-1)) 12 12 #define GPIO_REGMAP_ADDR(addr) ((addr) ? : GPIO_REGMAP_ADDR_ZERO) 13 13 14 14 /**