All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] PM: AVS: qcom-cpr: select CONFIG_NVMEM
@ 2021-09-20 10:02 Arnd Bergmann
  2021-09-20 13:37 ` Doug Anderson
  0 siblings, 1 reply; 3+ messages in thread
From: Arnd Bergmann @ 2021-09-20 10:02 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Douglas Anderson, Niklas Cassel
  Cc: Arnd Bergmann, John Stultz, Lina Iyer, Ulf Hansson,
	linux-arm-msm, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

nvmem_cell_read_variable_le_u32 is only defined when CONFIG_NVMEM
is set, otherwise we end up with this build failure:

drivers/soc/qcom/cpr.c: In function 'cpr_populate_ring_osc_idx':
drivers/soc/qcom/cpr.c:814:23: error: implicit declaration of function 'nvmem_cell_read_variable_le_u32' [-Werror=implicit-function-declaration]
  814 |                 ret = nvmem_cell_read_variable_le_u32(drv->dev, fuses->ring_osc, &data);
      |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Select the framwork from Kconfig.

Fixes: 6feba6a62c57 ("PM: AVS: qcom-cpr: Use nvmem_cell_read_variable_le_u32()")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/soc/qcom/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/soc/qcom/Kconfig b/drivers/soc/qcom/Kconfig
index 79b568f82a1c..faf372c0fc71 100644
--- a/drivers/soc/qcom/Kconfig
+++ b/drivers/soc/qcom/Kconfig
@@ -29,6 +29,7 @@ config QCOM_COMMAND_DB
 config QCOM_CPR
 	tristate "QCOM Core Power Reduction (CPR) support"
 	depends on ARCH_QCOM && HAS_IOMEM
+	select NVMEM
 	select PM_OPP
 	select REGMAP
 	help
-- 
2.29.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] PM: AVS: qcom-cpr: select CONFIG_NVMEM
  2021-09-20 10:02 [PATCH] PM: AVS: qcom-cpr: select CONFIG_NVMEM Arnd Bergmann
@ 2021-09-20 13:37 ` Doug Anderson
  2021-09-20 15:53   ` Arnd Bergmann
  0 siblings, 1 reply; 3+ messages in thread
From: Doug Anderson @ 2021-09-20 13:37 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Andy Gross, Bjorn Andersson, Niklas Cassel, Arnd Bergmann,
	John Stultz, Lina Iyer, Ulf Hansson, linux-arm-msm, LKML

Hi,

On Mon, Sep 20, 2021 at 3:02 AM Arnd Bergmann <arnd@kernel.org> wrote:
>
> From: Arnd Bergmann <arnd@arndb.de>
>
> nvmem_cell_read_variable_le_u32 is only defined when CONFIG_NVMEM
> is set, otherwise we end up with this build failure:
>
> drivers/soc/qcom/cpr.c: In function 'cpr_populate_ring_osc_idx':
> drivers/soc/qcom/cpr.c:814:23: error: implicit declaration of function 'nvmem_cell_read_variable_le_u32' [-Werror=implicit-function-declaration]
>   814 |                 ret = nvmem_cell_read_variable_le_u32(drv->dev, fuses->ring_osc, &data);
>       |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Select the framwork from Kconfig.
>
> Fixes: 6feba6a62c57 ("PM: AVS: qcom-cpr: Use nvmem_cell_read_variable_le_u32()")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  drivers/soc/qcom/Kconfig | 1 +
>  1 file changed, 1 insertion(+)

A fix should have already landed for this error. See the patch:

https://lore.kernel.org/r/20210830083449.1.I38e95343209fe1f808c3b4860795a00a2b539701@changeid

...and Greg has applied it. I got a message 6 days ago saying it was in:

    git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
in the char-misc-linus branch.

That being said, if people think that we should _also_ select NVMEM
for this driver then I have no objections. The use of nvmem in this
driver predates my patch.

-Doug

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] PM: AVS: qcom-cpr: select CONFIG_NVMEM
  2021-09-20 13:37 ` Doug Anderson
@ 2021-09-20 15:53   ` Arnd Bergmann
  0 siblings, 0 replies; 3+ messages in thread
From: Arnd Bergmann @ 2021-09-20 15:53 UTC (permalink / raw)
  To: Doug Anderson
  Cc: Andy Gross, Bjorn Andersson, Niklas Cassel, Arnd Bergmann,
	John Stultz, Lina Iyer, Ulf Hansson, linux-arm-msm, LKML

On Mon, Sep 20, 2021 at 3:37 PM Doug Anderson <dianders@chromium.org> wrote:
>
> https://lore.kernel.org/r/20210830083449.1.I38e95343209fe1f808c3b4860795a00a2b539701@changeid
>
> ...and Greg has applied it. I got a message 6 days ago saying it was in:
>
>     git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
> in the char-misc-linus branch.
>
> That being said, if people think that we should _also_ select NVMEM
> for this driver then I have no objections. The use of nvmem in this
> driver predates my patch.

It's there, I was still testing on -rc1 when I made the patch and only
verified that all my patches still worked on rc2 before sending them
out, but did not cross-check whether a different fix was applied.

       Arnd

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-09-20 15:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-20 10:02 [PATCH] PM: AVS: qcom-cpr: select CONFIG_NVMEM Arnd Bergmann
2021-09-20 13:37 ` Doug Anderson
2021-09-20 15:53   ` Arnd Bergmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.