LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] nvmem: core: Add stubs for nvmem_cell_read_variable_le_u32/64 if !CONFIG_NVMEM
@ 2021-09-13 16:05 Srinivas Kandagatla
  0 siblings, 0 replies; 3+ messages in thread
From: Srinivas Kandagatla @ 2021-09-13 16:05 UTC (permalink / raw)
  To: gregkh
  Cc: linux-kernel, Douglas Anderson, kernel test robot,
	Bjorn Andersson, Srinivas Kandagatla

From: Douglas Anderson <dianders@chromium.org>

When I added nvmem_cell_read_variable_le_u32() and
nvmem_cell_read_variable_le_u64() I forgot to add the "static inline"
stub functions for when CONFIG_NVMEM wasn't defined. Add them
now. This was causing problems with randconfig builds that compiled
`drivers/soc/qcom/cpr.c`.

Fixes: 6feba6a62c57 ("PM: AVS: qcom-cpr: Use nvmem_cell_read_variable_le_u32()")
Fixes: a28e824fb827 ("nvmem: core: Add functions to make number reading easy")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
Hi Greg,

Could you pick this up for next possible rc.

Thanks,
--srini

 include/linux/nvmem-consumer.h | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/include/linux/nvmem-consumer.h b/include/linux/nvmem-consumer.h
index 923dada24eb4..c0c0cefc3b92 100644
--- a/include/linux/nvmem-consumer.h
+++ b/include/linux/nvmem-consumer.h
@@ -150,6 +150,20 @@ static inline int nvmem_cell_read_u64(struct device *dev,
 	return -EOPNOTSUPP;
 }
 
+static inline int nvmem_cell_read_variable_le_u32(struct device *dev,
+						 const char *cell_id,
+						 u32 *val)
+{
+	return -EOPNOTSUPP;
+}
+
+static inline int nvmem_cell_read_variable_le_u64(struct device *dev,
+						  const char *cell_id,
+						  u64 *val)
+{
+	return -EOPNOTSUPP;
+}
+
 static inline struct nvmem_device *nvmem_device_get(struct device *dev,
 						    const char *name)
 {
-- 
2.21.0


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

* Re: [PATCH] nvmem: core: Add stubs for nvmem_cell_read_variable_le_u32/64 if !CONFIG_NVMEM
  2021-08-30 15:35 Douglas Anderson
@ 2021-08-30 16:42 ` Bjorn Andersson
  0 siblings, 0 replies; 3+ messages in thread
From: Bjorn Andersson @ 2021-08-30 16:42 UTC (permalink / raw)
  To: Douglas Anderson
  Cc: Niklas Cassel, Srinivas Kandagatla, Greg Kroah-Hartman,
	kernel test robot, linux-kernel

On Mon 30 Aug 10:35 CDT 2021, Douglas Anderson wrote:

> When I added nvmem_cell_read_variable_le_u32() and
> nvmem_cell_read_variable_le_u64() I forgot to add the "static inline"
> stub functions for when CONFIG_NVMEM wasn't defined. Add them
> now. This was causing problems with randconfig builds that compiled
> `drivers/soc/qcom/cpr.c`.
> 
> Fixes: 6feba6a62c57 ("PM: AVS: qcom-cpr: Use nvmem_cell_read_variable_le_u32()")
> Fixes: a28e824fb827 ("nvmem: core: Add functions to make number reading easy")
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Douglas Anderson <dianders@chromium.org>

Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>

> ---
> It might be handy if this commit could somehow end up in the SoC tree
> soon-ish to fix the build warning. I expect that the "qcom-cpr" patch
> will be part of the pull requests send in the next merge window and
> it'd be nice if we didn't end up with the build warning in -rc1.
> 

Right, CPR is about to break some builds in -rc1, so it would be nice to
get this in asap.

That said, the qcom pull is in the pipes already, so pushing it through
Srinivas tree will work just fine.

Thanks,
Bjorn

>  include/linux/nvmem-consumer.h | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
> 
> diff --git a/include/linux/nvmem-consumer.h b/include/linux/nvmem-consumer.h
> index 923dada24eb4..c0c0cefc3b92 100644
> --- a/include/linux/nvmem-consumer.h
> +++ b/include/linux/nvmem-consumer.h
> @@ -150,6 +150,20 @@ static inline int nvmem_cell_read_u64(struct device *dev,
>  	return -EOPNOTSUPP;
>  }
>  
> +static inline int nvmem_cell_read_variable_le_u32(struct device *dev,
> +						 const char *cell_id,
> +						 u32 *val)
> +{
> +	return -EOPNOTSUPP;
> +}
> +
> +static inline int nvmem_cell_read_variable_le_u64(struct device *dev,
> +						  const char *cell_id,
> +						  u64 *val)
> +{
> +	return -EOPNOTSUPP;
> +}
> +
>  static inline struct nvmem_device *nvmem_device_get(struct device *dev,
>  						    const char *name)
>  {
> -- 
> 2.33.0.259.gc128427fd7-goog
> 

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

* [PATCH] nvmem: core: Add stubs for nvmem_cell_read_variable_le_u32/64 if !CONFIG_NVMEM
@ 2021-08-30 15:35 Douglas Anderson
  2021-08-30 16:42 ` Bjorn Andersson
  0 siblings, 1 reply; 3+ messages in thread
From: Douglas Anderson @ 2021-08-30 15:35 UTC (permalink / raw)
  To: Bjorn Andersson, Niklas Cassel, Srinivas Kandagatla, Greg Kroah-Hartman
  Cc: Douglas Anderson, kernel test robot, linux-kernel

When I added nvmem_cell_read_variable_le_u32() and
nvmem_cell_read_variable_le_u64() I forgot to add the "static inline"
stub functions for when CONFIG_NVMEM wasn't defined. Add them
now. This was causing problems with randconfig builds that compiled
`drivers/soc/qcom/cpr.c`.

Fixes: 6feba6a62c57 ("PM: AVS: qcom-cpr: Use nvmem_cell_read_variable_le_u32()")
Fixes: a28e824fb827 ("nvmem: core: Add functions to make number reading easy")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
---
It might be handy if this commit could somehow end up in the SoC tree
soon-ish to fix the build warning. I expect that the "qcom-cpr" patch
will be part of the pull requests send in the next merge window and
it'd be nice if we didn't end up with the build warning in -rc1.

 include/linux/nvmem-consumer.h | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/include/linux/nvmem-consumer.h b/include/linux/nvmem-consumer.h
index 923dada24eb4..c0c0cefc3b92 100644
--- a/include/linux/nvmem-consumer.h
+++ b/include/linux/nvmem-consumer.h
@@ -150,6 +150,20 @@ static inline int nvmem_cell_read_u64(struct device *dev,
 	return -EOPNOTSUPP;
 }
 
+static inline int nvmem_cell_read_variable_le_u32(struct device *dev,
+						 const char *cell_id,
+						 u32 *val)
+{
+	return -EOPNOTSUPP;
+}
+
+static inline int nvmem_cell_read_variable_le_u64(struct device *dev,
+						  const char *cell_id,
+						  u64 *val)
+{
+	return -EOPNOTSUPP;
+}
+
 static inline struct nvmem_device *nvmem_device_get(struct device *dev,
 						    const char *name)
 {
-- 
2.33.0.259.gc128427fd7-goog


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

end of thread, other threads:[~2021-09-13 16:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-13 16:05 [PATCH] nvmem: core: Add stubs for nvmem_cell_read_variable_le_u32/64 if !CONFIG_NVMEM Srinivas Kandagatla
  -- strict thread matches above, loose matches on Subject: below --
2021-08-30 15:35 Douglas Anderson
2021-08-30 16:42 ` Bjorn Andersson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).