IIO: Drop some unneeded export.h includes
Jonathan Cameron
maintainercover IIO: Drop some unneeded export.h includes
From: Jonathan Cameron <[email protected]>
7d95680d64ac8 ("scripts/misc-check: check unnecessary #include <linux/export.h> when W=1") brings some new warnings about including export.h where it isn't used.
There are similar warnings where it is missing and should be present but more of those than I'm going to resolve this morning.
Jonathan
Jonathan Cameron (2):
iio: potentiometer: Drop unused export.h includes
iio: dummy: drop unused export.h include.
drivers/iio/dummy/iio_simple_dummy_buffer.c | 1 - drivers/iio/potentiometer/ds1803.c | 1 - drivers/iio/potentiometer/mcp4131.c | 1 - 3 files changed, 3 deletions(-)
Signature · 1 line
2.49.0
Jonathan Cameron
maintainerPATCH 1/2 iio: potentiometer: Drop unused export.h includes
From: Jonathan Cameron <[email protected]>
Resolves:
warning: EXPORT_SYMBOL() is not used, but #include <linux/export.h> is present
--- drivers/iio/potentiometer/ds1803.c | 1 - drivers/iio/potentiometer/mcp4131.c | 1 - 2 files changed, 2 deletions(-)
drivers/iio/potentiometer/ds1803.c +0 -1
@@ -13,7 +13,6 @@*/ #include <linux/err.h> -#include <linux/export.h> #include <linux/i2c.h> #include <linux/iio/iio.h> #include <linux/module.h>
drivers/iio/potentiometer/mcp4131.c +0 -1
@@ -33,7 +33,6 @@#include <linux/cache.h> #include <linux/err.h> -#include <linux/export.h> #include <linux/iio/iio.h> #include <linux/iio/types.h> #include <linux/module.h>
Signature · 1 line
2.49.0
Re: [PATCH 1/2] iio: potentiometer: Drop unused export.h includes
Quoted 5 lines · Jonathan Cameron
From: Jonathan Cameron <[email protected]>
Resolves:
warning:EXPORT_SYMBOL()is not used, but #include <linux/export.h> is present
With the given context this LGTM,
Signature · 2 lines
With Best Regards, Andy Shevchenko
Jonathan Cameron
maintainerRe: [PATCH 1/2] iio: potentiometer: Drop unused export.h includes
Quoted 11 lines · On Mon, 9 Jun 2025 12:28:40 +0300 Andy Shevchenko <[email protected]>…
Quoted 5 lines · Jonathan Cameron
From: Jonathan Cameron <[email protected]>
Resolves:
warning:EXPORT_SYMBOL()is not used, but #include <linux/export.h> is presentWith the given context this LGTM,
Reviewed-by Andy Shevchenko <[email protected]>
Picked this one up
Jonathan Cameron
maintainerPATCH 2/2 iio: dummy: Drop unused export.h include.
In reply to Jonathan CameronFrom: Jonathan Cameron <[email protected]>
Resolves:
warning: EXPORT_SYMBOL() is not used, but #include <linux/export.h> is present
--- drivers/iio/dummy/iio_simple_dummy_buffer.c | 1 - 1 file changed, 1 deletion(-)
drivers/iio/dummy/iio_simple_dummy_buffer.c +0 -1
@@ -9,7 +9,6 @@*/ #include <linux/kernel.h> -#include <linux/export.h> #include <linux/slab.h> #include <linux/interrupt.h> #include <linux/irq.h>
Signature · 1 line
2.49.0
Re: [PATCH 2/2] iio: dummy: Drop unused export.h include.
Quoted 5 lines · Jonathan Cameron
From: Jonathan Cameron <[email protected]>
Resolves:
warning:EXPORT_SYMBOL()is not used, but #include <linux/export.h> is present
While this true...
Quoted 1 line
#include <
linux/kernel.h>
...I prefer a full and not half-baked solution, i.e. revisiting all headers and esp. replacing kernel.h with what is used.
Quoted 4 lines
-#include <
linux/export.h>
#include <linux/slab.h>
#include <linux/interrupt.h>
#include <linux/irq.h>
While doing that, the headers may be sorted (in the same or preparatory patch).
Signature · 2 lines
With Best Regards, Andy Shevchenko
Re: [PATCH 2/2] iio: dummy: Drop unused export.h include.
Quoted 14 lines · On Mon, 9 Jun 2025 12:27:33 +0300 Andy Shevchenko <[email protected]>…
Quoted 5 lines · Jonathan Cameron
From: Jonathan Cameron <[email protected]>
Resolves:
warning:EXPORT_SYMBOL()is not used, but #include <linux/export.h> is presentWhile this true...
Quoted 1 line
#include <
linux/kernel.h>...I prefer a full and not half-baked solution, i.e. revisiting all headers and esp. replacing
kernel.hwith what is used.
Quoted 7 lines
Quoted 4 lines
-#include <
linux/export.h>
#include <linux/slab.h>
#include <linux/interrupt.h>
#include <linux/irq.h>While doing that, the headers may be sorted (in the same or preparatory patch).
Whilst I agree that more work is need, I also don't like the time it might take to get to it and the warnings that might mean more significant issues get missed in the wash in the meantime.
Jonathan
Jonathan Cameron
maintainerRe: [PATCH 2/2] iio: dummy: Drop unused export.h include.
Quoted 22 lines · On Mon, 9 Jun 2025 10:39:05 +0100 Jonathan Cameron…
Quoted 19 lines · On Mon, 9 Jun 2025 12:27:33 +0300 Andy Shevchenko <[email protected]>…
Quoted 5 lines · Jonathan Cameron
From: Jonathan Cameron <[email protected]>
Resolves:
warning:EXPORT_SYMBOL()is not used, but #include <linux/export.h> is presentWhile this true...
Quoted 1 line
#include <
linux/kernel.h>...I prefer a full and not half-baked solution, i.e. revisiting all headers and esp. replacing
kernel.hwith what is used.Quoted 4 lines
-#include <
linux/export.h>
#include <linux/slab.h>
#include <linux/interrupt.h>
#include <linux/irq.h>
Quoted 7 lines
Quoted 2 lines
While doing that, the headers may be sorted (in the same or preparatory patch).
Whilst I agree that more work is need, I also don't like the time it might take to get to it and the warnings that might mean more significant issues get missed in the wash in the meantime.
After I wrote this I remembered that this is our 'reference' code so we should hold it to a higher standard. So I'll try and come back and improve this one sometime soon rather than just papering over the cracks.
Given I tend to build with W=1 and right now I'm swamped with pages of these warnings I'm really keen to get rid of them in IIO anyway and I see lots of activity to squash them more generally.
I'm a bit grumpy that this warning got added without (as far as I saw) any attempt to first clean up upstream.
J
Quoted 2 lines
Jonathan
Re: [PATCH 2/2] iio: dummy: Drop unused export.h include.
Quoted 24 lines · Jonathan Cameron
Quoted 22 lines · On Mon, 9 Jun 2025 10:39:05 +0100 Jonathan Cameron…
Quoted 19 lines · On Mon, 9 Jun 2025 12:27:33 +0300 Andy Shevchenko <[email protected]>…
Quoted 4 lines · Jonathan Cameron
Resolves:
warning:EXPORT_SYMBOL()is not used, but #include <linux/export.h> is presentWhile this true...
Quoted 1 line
#include <
linux/kernel.h>...I prefer a full and not half-baked solution, i.e. revisiting all headers and esp. replacing
kernel.hwith what is used.Quoted 4 lines
-#include <
linux/export.h>
#include <linux/slab.h>
#include <linux/interrupt.h>
#include <linux/irq.h>While doing that, the headers may be sorted (in the same or preparatory patch).
Quoted 7 lines
Quoted 3 lines
Whilst I agree that more work is need, I also don't like the time it might take to get to it and the warnings that might mean more significant issues get missed in the wash in the meantime.
After I wrote this I remembered that this is our 'reference' code so we should hold it to a higher standard. So I'll try and come back and improve this one sometime soon rather than just papering over the cracks.
Right, I would actually add to whatever TODO exists (written or spelled :-) to replace kernel.h with the respective header(s) in whole IIO subsystem.
Quoted 3 lines
Given I tend to build with W=1 and right now I'm swamped with pages of these warnings I'm really keen to get rid of them in IIO anyway and I see lots of activity to squash them more generally.
I am frustrated not less than you, but here we are.
Quoted 2 lines
I'm a bit grumpy that this warning got added without (as far as I saw) any attempt to first clean up upstream.
This is not the first time something like this happened. Because it's make W=1 build, not many complain.
Signature · 2 lines
With Best Regards, Andy Shevchenko
Quoted 12 lines · Jonathan Cameron
From: Jonathan Cameron <[email protected]>
7d95680d64ac8("scripts/misc-check: check unnecessary #include <linux/export.h> when W=1")
brings some new warnings about includingexport.hwhere it isn't used.There are similar warnings where it is missing and should be present but more of those than I'm going to resolve this morning.
Jonathan
Quoted 8 lines
Jonathan Cameron (2):
iio: potentiometer: Drop unusedexport.hincludes
iio: dummy: drop unusedexport.hinclude.drivers/iio/dummy/iio_simple_dummy_buffer.c | 1 - drivers/iio/potentiometer/ds1803.c | 1 - drivers/iio/potentiometer/mcp4131.c | 1 -
3 files changed, 3 deletions(-)