Skip to contentSkip to conversation

pinctrl: fix CONFIG_PINCTRL=n build failure

PATCH In review Arnd Bergmann 3 participants 3 messages Sep 25

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pinctrl: fix CONFIG_PINCTRL=n build failure

From: Arnd Bergmann <[email protected]>

If pinctrl/consumer.h is included before linux/errno.h, the missing error number macros cause a build failure:

In file included from drivers/gpu/drm/tilcdc/tilcdc_drv.c:9:
include/linux/pinctrl/consumer.h:110:10: error: use of undeclared identifier 'ENOTSUPP'

  110 |         return -ENOTSUPP;
      |                 ^~~~~~~~

Include linux/errno.h indirectly.

Fixes b44aec87658e ("pinctrl: make the CONFIG_PINCTRL=n gpio config stubs return -ENOTSUPP")
---
 include/linux/pinctrl/consumer.h | 1 +
 1 file changed, 1 insertion(+)
include/linux/pinctrl/consumer.h +1 -0
index 7be49d447426..81e7866bd2e3 100644
@@ -12,6 +12,7 @@
 #define __LINUX_PINCTRL_CONSUMER_H
 
 #include <linux/err.h>
+#include <linux/errno.h>
 #include <linux/types.h>
 
 #include <linux/pinctrl/pinctrl-state.h>
Signature · 1 line
2.53.0
maintainer
#1 lore raw
Quoted 7 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

If pinctrl/consumer.h is included before linux/errno.h, the missing error number macros cause a build failure:

In file included from drivers/gpu/drm/tilcdc/tilcdc_drv.c:9:
include/linux/pinctrl/consumer.h:110:10: error: use of undeclared identifier 'ENOTSUPP'

Quoted 7 lines
  110 |         return -ENOTSUPP;
      |                 ^~~~~~~~

Include linux/errno.h indirectly.

Fixes b44aec87658e ("pinctrl: make the CONFIG_PINCTRL=n gpio config stubs return -ENOTSUPP")

I think this is already fixed by:
https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git/commit/?id=c2d996d9c6dab31ae41d19507c2b7ef8dbc14602

But thanks!

Yours,
Linus Walleij

#2 lore raw
Quoted 12 lines · Linus Walleij
Quoted 10 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

If pinctrl/consumer.h is included before linux/errno.h, the missing error number macros cause a build failure:

In file included from drivers/gpu/drm/tilcdc/tilcdc_drv.c:9:
include/linux/pinctrl/consumer.h:110:10: error: use of undeclared identifier 'ENOTSUPP'

  110 |         return -ENOTSUPP;
      |                 ^~~~~~~~
Quoted 7 lines
Quoted 4 lines

Include linux/errno.h indirectly.

Fixes b44aec87658e ("pinctrl: make the CONFIG_PINCTRL=n gpio config stubs return -ENOTSUPP")

I think this is already fixed by:
https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git/commit/?id=c2d996d9c6dab31ae41d19507c2b7ef8dbc14602

Right, I was still on yesterday's linux-next, so I did not see that.

Arnd