pinctrl: qcom: fix unmet dependencies on GPIOLIB for GPIOLIB_IRQCHIP
authorJulian Braha <julianbraha@gmail.com>
Fri, 29 Oct 2021 00:46:10 +0000 (20:46 -0400)
committerLinus Walleij <linus.walleij@linaro.org>
Tue, 16 Nov 2021 01:19:14 +0000 (02:19 +0100)
When PINCTRL_QCOM_SPMI_PMIC or PINCTRL_QCOM_SSBI_PMIC
is selected, and GPIOLIB is not selected, Kbuild
gives the following warnings:

WARNING: unmet direct dependencies detected for GPIOLIB_IRQCHIP
  Depends on [n]: GPIOLIB [=n]
  Selected by [y]:
  - PINCTRL_QCOM_SPMI_PMIC [=y] && PINCTRL [=y] && (ARCH_QCOM [=n] || COMPILE_TEST [=y]) && OF [=y] && SPMI [=y]

WARNING: unmet direct dependencies detected for GPIOLIB_IRQCHIP
  Depends on [n]: GPIOLIB [=n]
  Selected by [y]:
  - PINCTRL_QCOM_SSBI_PMIC [=y] && PINCTRL [=y] && (ARCH_QCOM [=n] || COMPILE_TEST [=y]) && OF [=y]

This is because these config options enable GPIOLIB_IRQCHIP
without selecting or depending on GPIOLIB, despite
GPIOLIB_IRQCHIP depending on GPIOLIB.

These unmet dependency bugs were detected by Kismet,
a static analysis tool for Kconfig. Please advise if this
is not the appropriate solution.

Signed-off-by: Julian Braha <julianbraha@gmail.com>
Link: https://lore.kernel.org/r/20211029004610.35131-1-julianbraha@gmail.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/qcom/Kconfig

index b9191f1abb1c4fe1fe5d3a268a80ac031121d73e..3e0c00766f59add5b984a3e1d2161fcb74293c0c 100644 (file)
@@ -197,6 +197,7 @@ config PINCTRL_QCOM_SPMI_PMIC
        select PINMUX
        select PINCONF
        select GENERIC_PINCONF
+  select GPIOLIB
        select GPIOLIB_IRQCHIP
        select IRQ_DOMAIN_HIERARCHY
        help
@@ -211,6 +212,7 @@ config PINCTRL_QCOM_SSBI_PMIC
        select PINMUX
        select PINCONF
        select GENERIC_PINCONF
+  select GPIOLIB
        select GPIOLIB_IRQCHIP
        select IRQ_DOMAIN_HIERARCHY
        help