linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] reset: fix linux/reset.h errors
@ 2019-04-02 15:20 Randy Dunlap
  2019-04-02 16:05 ` Philipp Zabel
  0 siblings, 1 reply; 2+ messages in thread
From: Randy Dunlap @ 2019-04-02 15:20 UTC (permalink / raw)
  To: LKML, Andrew Morton, Philipp Zabel; +Cc: Stephen Rothwell

From: Randy Dunlap <rdunlap@infradead.org>

The header file <linux/reset.h> uses errno constant(s) and the
ERR_PTR() macro but does not #include the appropriate header files
that provide those facilities, so add 2 header files to fix
build errors.

  CC [M]  drivers/gpu/drm/lima/lima_device.o
In file included from ../drivers/gpu/drm/lima/lima_device.c:5:0:
../include/linux/reset.h: In function ‘__device_reset’:
../include/linux/reset.h:77:25: error: ‘ENOTSUPP’ undeclared (first use in this function)
  return optional ? 0 : -ENOTSUPP;
../include/linux/reset.h:77:25: note: each undeclared identifier is reported only once for each function it appears in
../include/linux/reset.h: In function ‘__of_reset_control_get’:
../include/linux/reset.h:85:36: error: ‘ENOTSUPP’ undeclared (first use in this function)
  return optional ? NULL : ERR_PTR(-ENOTSUPP);
../include/linux/reset.h: In function ‘__reset_control_get’:
../include/linux/reset.h:93:36: error: ‘ENOTSUPP’ undeclared (first use in this function)
  return optional ? NULL : ERR_PTR(-ENOTSUPP);
../include/linux/reset.h: In function ‘__devm_reset_control_get’:
../include/linux/reset.h:101:36: error: ‘ENOTSUPP’ undeclared (first use in this function)
  return optional ? NULL : ERR_PTR(-ENOTSUPP);
../include/linux/reset.h: In function ‘devm_reset_control_array_get’:
../include/linux/reset.h:107:36: error: ‘ENOTSUPP’ undeclared (first use in this function)
  return optional ? NULL : ERR_PTR(-ENOTSUPP);
../include/linux/reset.h: In function ‘of_reset_control_array_get’:
../include/linux/reset.h:114:36: error: ‘ENOTSUPP’ undeclared (first use in this function)
  return optional ? NULL : ERR_PTR(-ENOTSUPP);
In file included from ../drivers/gpu/drm/lima/lima_device.c:5:0:
../include/linux/reset.h: In function ‘__devm_reset_control_get’:
../include/linux/reset.h:102:1: warning: control reaches end of non-void function [-Wreturn-type]
 }


Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Philipp Zabel <p.zabel@pengutronix.de>
---
 include/linux/reset.h |    2 ++
 1 file changed, 2 insertions(+)

--- linux-next-20190402.orig/include/linux/reset.h
+++ linux-next-20190402/include/linux/reset.h
@@ -2,6 +2,8 @@
 #ifndef _LINUX_RESET_H_
 #define _LINUX_RESET_H_
 
+#include <linux/err.h>
+#include <linux/errno.h>
 #include <linux/types.h>
 
 struct device;



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

* Re: [PATCH -next] reset: fix linux/reset.h errors
  2019-04-02 15:20 [PATCH -next] reset: fix linux/reset.h errors Randy Dunlap
@ 2019-04-02 16:05 ` Philipp Zabel
  0 siblings, 0 replies; 2+ messages in thread
From: Philipp Zabel @ 2019-04-02 16:05 UTC (permalink / raw)
  To: Randy Dunlap, LKML, Andrew Morton; +Cc: Stephen Rothwell

On Tue, 2019-04-02 at 08:20 -0700, Randy Dunlap wrote:
> From: Randy Dunlap <rdunlap@infradead.org>
> 
> The header file <linux/reset.h> uses errno constant(s) and the
> ERR_PTR() macro but does not #include the appropriate header files
> that provide those facilities, so add 2 header files to fix
> build errors.

Thank you, applied to reset/next.

regards
Philipp

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

end of thread, other threads:[~2019-04-02 16:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-02 15:20 [PATCH -next] reset: fix linux/reset.h errors Randy Dunlap
2019-04-02 16:05 ` Philipp Zabel

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).