Skip to contentSkip to conversation

nvmem: include linux/err.h from header

PATCH Applied Arnd Bergmann 3 participants 6 messages Jul 10, 2017 NVMEM framework

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nvmem: include linux/err.h from header

The new support for nvmem devices from the rtc layer caused a build error in some configurations:

include/linux/nvmem-provider.h: In function 'nvmem_register':
include/linux/nvmem-provider.h:51:9: error: implicit declaration of function 'ERR_PTR' [-Werror=implicit-function-declaration]

This adds the missing include to ensure we can always include the header.

Fixes 697e5a47aa12 ("rtc: add generic nvmem support")

---
I'd suggest adding this patch in the rtc tree on top of the nvmem support there.

---
 include/linux/nvmem-provider.h | 3 +++
 1 file changed, 3 insertions(+)
include/linux/nvmem-provider.h +3 -0
index cd93416d762e..497706f5adca 100644
@@ -12,6 +12,9 @@
 #ifndef _LINUX_NVMEM_PROVIDER_H
 #define _LINUX_NVMEM_PROVIDER_H
 
+#include <linux/err.h>
+#include <linux/errno.h>
+
 struct nvmem_device;
 struct nvmem_cell_info;
 typedef int (*nvmem_reg_read_t)(void *priv, unsigned int offset,
Signature · 1 line
2.9.0
Acked-by on v1 1/1
#1 lore raw
Quoted 6 lines · Arnd Bergmann

The new support for nvmem devices from the rtc layer caused a build error in some configurations:

include/linux/nvmem-provider.h: In function 'nvmem_register':
include/linux/nvmem-provider.h:51:9: error: implicit declaration of function 'ERR_PTR' [-Werror=implicit-function-declaration]

Quoted 8 lines

This adds the missing include to ensure we can always include the header.

Fixes 697e5a47aa12 ("rtc: add generic nvmem support")

---
I'd suggest adding this patch in the rtc tree on top of the nvmem support there.

Thanks for the patch, we would need similar patch for include/linux/nvmem-consumer.h too.

Quoted 19 lines
---
  include/linux/nvmem-provider.h | 3 +++
  1 file changed, 3 insertions(+)
include/linux/nvmem-provider.h +3 -0
index cd93416d762e..497706f5adca 100644
@@ -12,6 +12,9 @@
  #ifndef _LINUX_NVMEM_PROVIDER_H
  #define _LINUX_NVMEM_PROVIDER_H
 
+#include <linux/err.h>
+#include <linux/errno.h>
+
  struct nvmem_device;
  struct nvmem_cell_info;
  typedef int (*nvmem_reg_read_t)(void *priv, unsigned int offset,
#2 lore raw
Quoted 21 lines · Srinivas Kandagatla
Quoted 8 lines · Arnd Bergmann

The new support for nvmem devices from the rtc layer caused a build error in some configurations:

include/linux/nvmem-provider.h: In function 'nvmem_register':
include/linux/nvmem-provider.h:51:9: error: implicit declaration of function 'ERR_PTR' [-Werror=implicit-function-declaration]

Quoted 8 lines

This adds the missing include to ensure we can always include the header.

Fixes 697e5a47aa12 ("rtc: add generic nvmem support")

---
I'd suggest adding this patch in the rtc tree on top of the nvmem support there.

Quoted 2 lines

Thanks for the patch, we would need similar patch for include/linux/nvmem-consumer.h too.

Makes sense, yes. Can you do that for 4.14? My patch for now is needed to fix a build regression in the rtc-next tree that I assume will otherwise make it into the 4.13 release.

Quoted 1 line

Thanks!

Arnd

#3 lore raw
Quoted 3 lines · Arnd Bergmann

Makes sense, yes. Can you do that for 4.14? My patch for now is needed to fix a build regression in the rtc-next tree that I assume will otherwise make it into the 4.13 release.

Sure I will take care of that after rc1.

thanks,
srini

#4 lore raw
In reply to Arnd Bergmann
Quoted 23 lines · Arnd Bergmann
Quoted 21 lines · Srinivas Kandagatla
Quoted 16 lines · Arnd Bergmann

The new support for nvmem devices from the rtc layer caused a build error in some configurations:

include/linux/nvmem-provider.h: In function 'nvmem_register':
include/linux/nvmem-provider.h:51:9: error: implicit declaration of function 'ERR_PTR' [-Werror=implicit-function-declaration]

This adds the missing include to ensure we can always include the header.

Fixes 697e5a47aa12 ("rtc: add generic nvmem support")

---
I'd suggest adding this patch in the rtc tree on top of the nvmem support there.

Quoted 7 lines
Quoted 2 lines

Thanks for the patch, we would need similar patch for include/linux/nvmem-consumer.h too.

Makes sense, yes. Can you do that for 4.14? My patch for now is needed to fix a build regression in the rtc-next tree that I assume will otherwise make it into the 4.13 release.

Yes, I'm planning to send my PR soon.

Signature · 3 lines
Alexandre Belloni, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
#5 lore raw
In reply to Arnd Bergmann
Quoted 9 lines · Arnd Bergmann

The new support for nvmem devices from the rtc layer caused a build error in some configurations:

include/linux/nvmem-provider.h: In function 'nvmem_register':
include/linux/nvmem-provider.h:51:9: error: implicit declaration of function 'ERR_PTR' [-Werror=implicit-function-declaration]

This adds the missing include to ensure we can always include the header.

Quoted 9 lines
Fixes 697e5a47aa12 ("rtc: add generic nvmem support")

---
I'd suggest adding this patch in the rtc tree on top of the nvmem support there.

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

Applied, thanks.

Signature · 3 lines
Alexandre Belloni, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com