[PATCH 1/5] bus: stm32_firewall: Fix build warnings about export.h

Antonio Borneo posted 5 patches 4 months ago
[PATCH 1/5] bus: stm32_firewall: Fix build warnings about export.h
Posted by Antonio Borneo 4 months ago
After commit a934a57a42f6 ("scripts/misc-check: check missing #include
<linux/export.h> when W=1") and commit 7d95680d64ac ("scripts/misc-check:
check unnecessary #include <linux/export.h> when W=1") we get the build
warning with W=1:

drivers/bus/stm32_firewall.c: warning: EXPORT_SYMBOL() is used, but #include <linux/export.h> is missing

Fix it.

Signed-off-by: Antonio Borneo <antonio.borneo@foss.st.com>
---
 drivers/bus/stm32_firewall.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/bus/stm32_firewall.c b/drivers/bus/stm32_firewall.c
index 2fc9761dadecf..3ff5b5b6add45 100644
--- a/drivers/bus/stm32_firewall.c
+++ b/drivers/bus/stm32_firewall.c
@@ -8,6 +8,7 @@
 #include <linux/bus/stm32_firewall_device.h>
 #include <linux/device.h>
 #include <linux/err.h>
+#include <linux/export.h>
 #include <linux/init.h>
 #include <linux/io.h>
 #include <linux/kernel.h>
-- 
2.34.1
Re: [PATCH 1/5] bus: stm32_firewall: Fix build warnings about export.h
Posted by Gatien CHEVALLIER 4 months ago
Hello Antonio,

On 6/10/25 14:48, Antonio Borneo wrote:
> After commit a934a57a42f6 ("scripts/misc-check: check missing #include
> <linux/export.h> when W=1") and commit 7d95680d64ac ("scripts/misc-check:
> check unnecessary #include <linux/export.h> when W=1") we get the build
> warning with W=1:
> 
> drivers/bus/stm32_firewall.c: warning: EXPORT_SYMBOL() is used, but #include <linux/export.h> is missing
> 
> Fix it.
> 
> Signed-off-by: Antonio Borneo <antonio.borneo@foss.st.com>
> ---
>   drivers/bus/stm32_firewall.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/bus/stm32_firewall.c b/drivers/bus/stm32_firewall.c
> index 2fc9761dadecf..3ff5b5b6add45 100644
> --- a/drivers/bus/stm32_firewall.c
> +++ b/drivers/bus/stm32_firewall.c
> @@ -8,6 +8,7 @@
>   #include <linux/bus/stm32_firewall_device.h>
>   #include <linux/device.h>
>   #include <linux/err.h>
> +#include <linux/export.h>
>   #include <linux/init.h>
>   #include <linux/io.h>
>   #include <linux/kernel.h>

Thank you,

Acked-by: Gatien Chevallier <gatien.chevallier@foss.st.com>

BR,
Gatien