gpiolib: add missing include
PATCH 1/1 gpiolib: add missing include
From: Bartosz Golaszewski <[email protected]>
With some randconfigs I'm seeing the following error:
In file included from drivers/gpio/gpiolib-swnode.c:19:./include/linux/gpio/consumer.h: In function ‘gpiod_enable_hw_timestamp_ns’:./include/linux/gpio/consumer.h:557:17: error: implicit declaration of function ‘WARN_ON’ [-Wimplicit-function-declaration]
557 | WARN_ON(desc);
| ^~~~~~~Pull in bug.h to fix it.
--- include/linux/gpio/consumer.h | 1 + 1 file changed, 1 insertion(+)
include/linux/gpio/consumer.h +1 -0
@@ -3,6 +3,7 @@#define __LINUX_GPIO_CONSUMER_H#include <linux/bits.h> +#include <linux/bug.h> #include <linux/types.h> struct acpi_device ;
Signature · 1 line
2.45.2
Quoted 31 lines · Bartosz Golaszewski
From: Bartosz Golaszewski <[email protected]>
With some randconfigs I'm seeing the following error:
In file included from
drivers/gpio/gpiolib-swnode.c:19:./include/linux/gpio/consumer.h: In function ‘gpiod_enable_hw_timestamp_ns’:./include/linux/gpio/consumer.h:557:17: error: implicit declaration of function ‘WARN_ON’ [-Wimplicit-function-declaration]557 | WARN_ON(desc); | ^~~~~~~Pull in
bug.hto fix it.Signed-off-by Bartosz Golaszewski <[email protected]>--- include/linux/gpio/consumer.h | 1 + 1 file changed, 1 insertion(+)include/linux/gpio/consumer.h +1
-1@@ -3,6 +3,7 @@#define __LINUX_GPIO_CONSUMER_H#include <linux/bits.h> +#include <linux/bug.h> #include <linux/types.h> struct acpi_device ; --
Quoted 2 lines
2.45.2
Ah, build bot responding to my CONFIG_HTE patch made me realize we already include asm/bug.h for !CONFIG_GPIOLIB. I'll rethink the approach here as we'll need it for the HTE stubs too.
Bart