* [PATCH 0/2] IIO: Drop some unneeded export.h includes
@ 2025-06-09 7:06 Jonathan Cameron
2025-06-09 7:06 ` [PATCH 1/2] iio: potentiometer: Drop unused " Jonathan Cameron
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Jonathan Cameron @ 2025-06-09 7:06 UTC (permalink / raw)
To: linux-iio, David Lechner, Nuno Sá, Andy Shevchenko; +Cc: Jonathan Cameron
From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
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(-)
--
2.49.0
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 1/2] iio: potentiometer: Drop unused export.h includes
2025-06-09 7:06 [PATCH 0/2] IIO: Drop some unneeded export.h includes Jonathan Cameron
@ 2025-06-09 7:06 ` Jonathan Cameron
2025-06-09 9:28 ` Andy Shevchenko
2025-06-09 7:06 ` [PATCH 2/2] iio: dummy: Drop unused export.h include Jonathan Cameron
2025-06-09 7:18 ` [PATCH 0/2] IIO: Drop some unneeded export.h includes Nuno Sá
2 siblings, 1 reply; 10+ messages in thread
From: Jonathan Cameron @ 2025-06-09 7:06 UTC (permalink / raw)
To: linux-iio, David Lechner, Nuno Sá, Andy Shevchenko; +Cc: Jonathan Cameron
From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Resolves:
warning: EXPORT_SYMBOL() is not used, but #include <linux/export.h> is present
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
---
drivers/iio/potentiometer/ds1803.c | 1 -
drivers/iio/potentiometer/mcp4131.c | 1 -
2 files changed, 2 deletions(-)
diff --git a/drivers/iio/potentiometer/ds1803.c b/drivers/iio/potentiometer/ds1803.c
index 5761f69c538a..8a64d93f7e7b 100644
--- a/drivers/iio/potentiometer/ds1803.c
+++ b/drivers/iio/potentiometer/ds1803.c
@@ -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>
diff --git a/drivers/iio/potentiometer/mcp4131.c b/drivers/iio/potentiometer/mcp4131.c
index 9082b559d029..ad082827aad5 100644
--- a/drivers/iio/potentiometer/mcp4131.c
+++ b/drivers/iio/potentiometer/mcp4131.c
@@ -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>
--
2.49.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 2/2] iio: dummy: Drop unused export.h include.
2025-06-09 7:06 [PATCH 0/2] IIO: Drop some unneeded export.h includes Jonathan Cameron
2025-06-09 7:06 ` [PATCH 1/2] iio: potentiometer: Drop unused " Jonathan Cameron
@ 2025-06-09 7:06 ` Jonathan Cameron
2025-06-09 9:27 ` Andy Shevchenko
2025-06-09 7:18 ` [PATCH 0/2] IIO: Drop some unneeded export.h includes Nuno Sá
2 siblings, 1 reply; 10+ messages in thread
From: Jonathan Cameron @ 2025-06-09 7:06 UTC (permalink / raw)
To: linux-iio, David Lechner, Nuno Sá, Andy Shevchenko; +Cc: Jonathan Cameron
From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Resolves:
warning: EXPORT_SYMBOL() is not used, but #include <linux/export.h> is present
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
---
drivers/iio/dummy/iio_simple_dummy_buffer.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/iio/dummy/iio_simple_dummy_buffer.c b/drivers/iio/dummy/iio_simple_dummy_buffer.c
index e35e0596cbfb..024f1135af63 100644
--- a/drivers/iio/dummy/iio_simple_dummy_buffer.c
+++ b/drivers/iio/dummy/iio_simple_dummy_buffer.c
@@ -9,7 +9,6 @@
*/
#include <linux/kernel.h>
-#include <linux/export.h>
#include <linux/slab.h>
#include <linux/interrupt.h>
#include <linux/irq.h>
--
2.49.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH 0/2] IIO: Drop some unneeded export.h includes
2025-06-09 7:06 [PATCH 0/2] IIO: Drop some unneeded export.h includes Jonathan Cameron
2025-06-09 7:06 ` [PATCH 1/2] iio: potentiometer: Drop unused " Jonathan Cameron
2025-06-09 7:06 ` [PATCH 2/2] iio: dummy: Drop unused export.h include Jonathan Cameron
@ 2025-06-09 7:18 ` Nuno Sá
2 siblings, 0 replies; 10+ messages in thread
From: Nuno Sá @ 2025-06-09 7:18 UTC (permalink / raw)
To: Jonathan Cameron, linux-iio, David Lechner, Nuno Sá,
Andy Shevchenko
Cc: Jonathan Cameron
On Mon, 2025-06-09 at 08:06 +0100, Jonathan Cameron wrote:
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
>
> 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(-)
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 2/2] iio: dummy: Drop unused export.h include.
2025-06-09 7:06 ` [PATCH 2/2] iio: dummy: Drop unused export.h include Jonathan Cameron
@ 2025-06-09 9:27 ` Andy Shevchenko
2025-06-09 9:39 ` Jonathan Cameron
0 siblings, 1 reply; 10+ messages in thread
From: Andy Shevchenko @ 2025-06-09 9:27 UTC (permalink / raw)
To: Jonathan Cameron
Cc: linux-iio, David Lechner, Nuno Sá, Andy Shevchenko,
Jonathan Cameron
On Mon, Jun 9, 2025 at 10:06 AM Jonathan Cameron <jic23@kernel.org> wrote:
>
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
>
> Resolves:
> warning: EXPORT_SYMBOL() is not used, but #include <linux/export.h> is present
While this true...
> #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.
> -#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).
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/2] iio: potentiometer: Drop unused export.h includes
2025-06-09 7:06 ` [PATCH 1/2] iio: potentiometer: Drop unused " Jonathan Cameron
@ 2025-06-09 9:28 ` Andy Shevchenko
2025-06-11 16:32 ` Jonathan Cameron
0 siblings, 1 reply; 10+ messages in thread
From: Andy Shevchenko @ 2025-06-09 9:28 UTC (permalink / raw)
To: Jonathan Cameron
Cc: linux-iio, David Lechner, Nuno Sá, Andy Shevchenko,
Jonathan Cameron
On Mon, Jun 9, 2025 at 10:06 AM Jonathan Cameron <jic23@kernel.org> wrote:
>
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
>
> Resolves:
> warning: EXPORT_SYMBOL() is not used, but #include <linux/export.h> is present
With the given context this LGTM,
Reviewed-by: Andy Shevchenko <andy@kernel.org>
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 2/2] iio: dummy: Drop unused export.h include.
2025-06-09 9:27 ` Andy Shevchenko
@ 2025-06-09 9:39 ` Jonathan Cameron
2025-06-11 16:32 ` Jonathan Cameron
0 siblings, 1 reply; 10+ messages in thread
From: Jonathan Cameron @ 2025-06-09 9:39 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Jonathan Cameron, linux-iio, David Lechner, Nuno Sá,
Andy Shevchenko
On Mon, 9 Jun 2025 12:27:33 +0300
Andy Shevchenko <andy.shevchenko@gmail.com> wrote:
> On Mon, Jun 9, 2025 at 10:06 AM Jonathan Cameron <jic23@kernel.org> wrote:
> >
> > From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> >
> > Resolves:
> > warning: EXPORT_SYMBOL() is not used, but #include <linux/export.h> is present
>
> While this true...
>
> > #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.
>
> > -#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
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 2/2] iio: dummy: Drop unused export.h include.
2025-06-09 9:39 ` Jonathan Cameron
@ 2025-06-11 16:32 ` Jonathan Cameron
2025-06-11 17:48 ` Andy Shevchenko
0 siblings, 1 reply; 10+ messages in thread
From: Jonathan Cameron @ 2025-06-11 16:32 UTC (permalink / raw)
To: Jonathan Cameron
Cc: Andy Shevchenko, linux-iio, David Lechner, Nuno Sá,
Andy Shevchenko
On Mon, 9 Jun 2025 10:39:05 +0100
Jonathan Cameron <Jonathan.Cameron@huawei.com> wrote:
> On Mon, 9 Jun 2025 12:27:33 +0300
> Andy Shevchenko <andy.shevchenko@gmail.com> wrote:
>
> > On Mon, Jun 9, 2025 at 10:06 AM Jonathan Cameron <jic23@kernel.org> wrote:
> > >
> > > From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > >
> > > Resolves:
> > > warning: EXPORT_SYMBOL() is not used, but #include <linux/export.h> is present
> >
> > While this true...
> >
> > > #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.
> >
> > > -#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.
>
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
> Jonathan
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/2] iio: potentiometer: Drop unused export.h includes
2025-06-09 9:28 ` Andy Shevchenko
@ 2025-06-11 16:32 ` Jonathan Cameron
0 siblings, 0 replies; 10+ messages in thread
From: Jonathan Cameron @ 2025-06-11 16:32 UTC (permalink / raw)
To: Andy Shevchenko
Cc: linux-iio, David Lechner, Nuno Sá, Andy Shevchenko,
Jonathan Cameron
On Mon, 9 Jun 2025 12:28:40 +0300
Andy Shevchenko <andy.shevchenko@gmail.com> wrote:
> On Mon, Jun 9, 2025 at 10:06 AM Jonathan Cameron <jic23@kernel.org> wrote:
> >
> > From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> >
> > Resolves:
> > warning: EXPORT_SYMBOL() is not used, but #include <linux/export.h> is present
>
> With the given context this LGTM,
> Reviewed-by: Andy Shevchenko <andy@kernel.org>
>
>
Picked this one up
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 2/2] iio: dummy: Drop unused export.h include.
2025-06-11 16:32 ` Jonathan Cameron
@ 2025-06-11 17:48 ` Andy Shevchenko
0 siblings, 0 replies; 10+ messages in thread
From: Andy Shevchenko @ 2025-06-11 17:48 UTC (permalink / raw)
To: Jonathan Cameron
Cc: Jonathan Cameron, Andy Shevchenko, linux-iio, David Lechner,
Nuno Sá, Andy Shevchenko
On Wed, Jun 11, 2025 at 05:32:17PM +0100, Jonathan Cameron wrote:
> On Mon, 9 Jun 2025 10:39:05 +0100
> Jonathan Cameron <Jonathan.Cameron@huawei.com> wrote:
> > On Mon, 9 Jun 2025 12:27:33 +0300
> > Andy Shevchenko <andy.shevchenko@gmail.com> wrote:
> > > On Mon, Jun 9, 2025 at 10:06 AM Jonathan Cameron <jic23@kernel.org> wrote:
> > > >
> > > > Resolves:
> > > > warning: EXPORT_SYMBOL() is not used, but #include <linux/export.h> is present
> > >
> > > While this true...
> > >
> > > > #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.
> > >
> > > > -#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.
>
> 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.
> 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.
> 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.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2025-06-11 17:48 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-09 7:06 [PATCH 0/2] IIO: Drop some unneeded export.h includes Jonathan Cameron
2025-06-09 7:06 ` [PATCH 1/2] iio: potentiometer: Drop unused " Jonathan Cameron
2025-06-09 9:28 ` Andy Shevchenko
2025-06-11 16:32 ` Jonathan Cameron
2025-06-09 7:06 ` [PATCH 2/2] iio: dummy: Drop unused export.h include Jonathan Cameron
2025-06-09 9:27 ` Andy Shevchenko
2025-06-09 9:39 ` Jonathan Cameron
2025-06-11 16:32 ` Jonathan Cameron
2025-06-11 17:48 ` Andy Shevchenko
2025-06-09 7:18 ` [PATCH 0/2] IIO: Drop some unneeded export.h includes Nuno Sá
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).