• John Stultz's avatar
    regulator: Kconfig: Fix REGULATOR_QCOM_RPMH dependencies to avoid build error · 34c5aa26
    John Stultz authored
    The kernel test robot reported the following build error:
    
    All errors (new ones prefixed by >>):
    
       xtensa-linux-ld: drivers/regulator/qcom-rpmh-regulator.o: in function `rpmh_regulator_vrm_get_voltage_sel':
       qcom-rpmh-regulator.c:(.text+0x270): undefined reference to `rpmh_write'
       xtensa-linux-ld: drivers/regulator/qcom-rpmh-regulator.o: in function `rpmh_regulator_send_request':
       qcom-rpmh-regulator.c:(.text+0x2f2): undefined reference to `rpmh_write'
       xtensa-linux-ld: drivers/regulator/qcom-rpmh-regulator.o: in function `rpmh_regulator_vrm_get_voltage_sel':
    >> qcom-rpmh-regulator.c:(.text+0x274): undefined reference to `rpmh_write_async'
       xtensa-linux-ld: drivers/regulator/qcom-rpmh-regulator.o: in function `rpmh_regulator_send_request':
       qcom-rpmh-regulator.c:(.text+0x2fc): undefined reference to `rpmh_write_async'
    
    Which is due to REGULATOR_QCOM_RPMH depending on
    QCOM_RPMH || COMPILE_TEST. The problem is that QOM_RPMH can now
    be a module, which in that case requires REGULATOR_QCOM_RPMH=m
    to build.
    
    However, if COMPILE_TEST is enabled, REGULATOR_QCOM_RPMH can be
    set to =y while QCOM_RPMH=m which will cause build failures.
    
    The fix here is to add (QCOM_RPMH=n && COMPILE_TEST) to the
    dependency.
    
    Feedback would be appreciated!
    
    Cc: Todd Kjos <tkjos@google.com>
    Cc: Saravana Kannan <saravanak@google.com>
    Cc: Andy Gross <agross@kernel.org>
    Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
    Cc: Rajendra Nayak <rnayak@codeaurora.org>
    Cc: Maulik Shah <mkshah@codeaurora.org>
    Cc: Stephen Boyd <swboyd@chromium.org>
    Cc: Liam Girdwood <lgirdwood@gmail.com>
    Cc: Mark Brown <broonie@kernel.org>
    Cc: linux-arm-msm@vger.kernel.org
    Reported-by: default avatarkernel test robot <lkp@intel.com>
    Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
    Reviewed-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
    Link: https://lore.kernel.org/r/20201123222359.103822-1-john.stultz@linaro.orgSigned-off-by: default avatarMark Brown <broonie@kernel.org>
    34c5aa26
Kconfig 40.4 KB