summaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/qcom
diff options
context:
space:
mode:
authorSven Peter <sven@svenpeter.dev>2021-11-01 16:06:40 +0100
committerLinus Walleij <linus.walleij@linaro.org>2021-11-16 02:19:15 +0100
commit9b3b94e9eb144ef80363b94c178a9a5b9172d295 (patch)
treeec30181dcdd309e99bcd30542326da3ebe40a6f0 /drivers/pinctrl/qcom
parenta5b9703fe11cd1d6d7a60102aa2abe686dc1867f (diff)
downloadlinux-9b3b94e9eb144ef80363b94c178a9a5b9172d295.tar.bz2
pinctrl: apple: Always return valid type in apple_gpio_irq_type
apple_gpio_irq_type can possibly return -EINVAL which triggers the following compile error with gcc 9 because the type no longer fits into the mask. drivers/pinctrl/pinctrl-apple-gpio.c: In function 'apple_gpio_irq_set_type': ././include/linux/compiler_types.h:335:38: error: call to '__compiletime_assert_289' declared with attribute error: FIELD_PREP: value too large for the field 335 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^ [...] drivers/pinctrl/pinctrl-apple-gpio.c:294:7: note: in expansion of macro 'FIELD_PREP' 294 | FIELD_PREP(REG_GPIOx_MODE, irqtype)); | ^~~~~~~~~~ Fix this by making the return value always valid and instead checking for REG_GPIOx_IN_IRQ_OFF in apple_gpio_irq_set_type and return -EINVAL from there. Fixes: a0f160ffcb83 ("pinctrl: add pinctrl/GPIO driver for Apple SoCs") Signed-off-by: Sven Peter <sven@svenpeter.dev> Reviewed-by: Joey Gouly <joey.gouly@arm.com> Link: https://lore.kernel.org/r/20211101150640.46553-1-sven@svenpeter.dev Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/qcom')
0 files changed, 0 insertions, 0 deletions