mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] pinctrl: fix CONFIG_PINCTRL=n build failure
@ 2026-09-25 12:59 Arnd Bergmann
  2026-09-25 16:14 ` Linus Walleij
  0 siblings, 1 reply; 3+ messages in thread
From: Arnd Bergmann @ 2026-09-25 12:59 UTC (permalink / raw)
  To: Linus Walleij, Mehmet Fide, Bartosz Golaszewski
  Cc: Arnd Bergmann, Dan Carpenter, linux-gpio, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

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")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 include/linux/pinctrl/consumer.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/linux/pinctrl/consumer.h b/include/linux/pinctrl/consumer.h
index 7be49d447426..81e7866bd2e3 100644
--- a/include/linux/pinctrl/consumer.h
+++ b/include/linux/pinctrl/consumer.h
@@ -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>
-- 
2.53.0


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

* Re: [PATCH] pinctrl: fix CONFIG_PINCTRL=n build failure
  2026-09-25 12:59 [PATCH] pinctrl: fix CONFIG_PINCTRL=n build failure Arnd Bergmann
@ 2026-09-25 16:14 ` Linus Walleij
  2026-09-25 18:06   ` Arnd Bergmann
  0 siblings, 1 reply; 3+ messages in thread
From: Linus Walleij @ 2026-09-25 16:14 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Mehmet Fide, Bartosz Golaszewski, Arnd Bergmann, Dan Carpenter,
	linux-gpio, linux-kernel

On Fri, Sep 25, 2026 at 3:00 PM Arnd Bergmann <arnd@kernel.org> wrote:

> From: Arnd Bergmann <arnd@arndb.de>
>
> 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")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

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

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

* Re: [PATCH] pinctrl: fix CONFIG_PINCTRL=n build failure
  2026-09-25 16:14 ` Linus Walleij
@ 2026-09-25 18:06   ` Arnd Bergmann
  0 siblings, 0 replies; 3+ messages in thread
From: Arnd Bergmann @ 2026-09-25 18:06 UTC (permalink / raw)
  To: Linus Walleij, Arnd Bergmann
  Cc: Mehmet Fide, Bartosz Golaszewski, Dan Carpenter,
	open list:GPIO SUBSYSTEM, linux-kernel

On Fri, Sep 25, 2026, at 18:14, Linus Walleij wrote:
> On Fri, Sep 25, 2026 at 3:00 PM Arnd Bergmann <arnd@kernel.org> wrote:
>
>> From: Arnd Bergmann <arnd@arndb.de>
>>
>> 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")
>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>
> 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

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

end of thread, other threads:[~2026-09-25 18:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-25 12:59 [PATCH] pinctrl: fix CONFIG_PINCTRL=n build failure Arnd Bergmann
2026-09-25 16:14 ` Linus Walleij
2026-09-25 18:06   ` Arnd Bergmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®