* [PATCH v3] iio: adc: spear_adc: cleans up, update and sorts the existing includes
@ 2026-03-24 22:09 Rodrigo Gobbi
2026-03-25 12:14 ` Andy Shevchenko
0 siblings, 1 reply; 2+ messages in thread
From: Rodrigo Gobbi @ 2026-03-24 22:09 UTC (permalink / raw)
To: jic23, dlechner, nuno.sa, andy; +Cc: ~lkcamp/patches, linux-iio, linux-kernel
Remove unused includes and add what is being used (IWYU principle) and
sort the remaining ones.
Signed-off-by: Rodrigo Gobbi <rodrigo.gobbi.7@gmail.com>
---
Hi, all,
Revisiting this, sorry for the delay.
> +#include <linux/of.h>
> Why include of.h?
Double-checked, we don't need that.
> For these, given we've been round a few times, it is useful to add a
> brief on what is being used from each header in this change log or
> indeed the patch description.
For the record, what was added:
#include <linux/array_size.h> // for ARRAY_SIZE
#include <linux/bits.h> // for GENMASKxx
#include <linux/dev_printk.h> // for dev_err_probe, dev_info
#include <linux/math.h> // for DIV_ROUND_UP
#include <linux/mutex.h> // for struct mutex
#include <linux/types.h> // for uXX defitinions
Changelog:
v3: removed of.h/compiler_types.h
added types.h
v2: https://lore.kernel.org/all/20251206132120.11059-1-rodrigo.gobbi.7@gmail.com/
v1: https://lore.kernel.org/all/20251009182636.187026-1-rodrigo.gobbi.7@gmail.com/
Tks and regards.
---
drivers/iio/adc/spear_adc.c | 25 ++++++++++++++-----------
1 file changed, 14 insertions(+), 11 deletions(-)
diff --git a/drivers/iio/adc/spear_adc.c b/drivers/iio/adc/spear_adc.c
index 50b0a607baeb..b658bf1a7f30 100644
--- a/drivers/iio/adc/spear_adc.c
+++ b/drivers/iio/adc/spear_adc.c
@@ -5,22 +5,25 @@
* Copyright 2012 Stefan Roese <sr@denx.de>
*/
-#include <linux/mod_devicetable.h>
-#include <linux/module.h>
-#include <linux/platform_device.h>
-#include <linux/property.h>
-#include <linux/interrupt.h>
-#include <linux/device.h>
-#include <linux/kernel.h>
-#include <linux/slab.h>
-#include <linux/io.h>
+#include <linux/array_size.h>
#include <linux/bitfield.h>
+#include <linux/bits.h>
#include <linux/clk.h>
-#include <linux/err.h>
#include <linux/completion.h>
+#include <linux/dev_printk.h>
+#include <linux/err.h>
+#include <linux/interrupt.h>
+#include <linux/io.h>
+#include <linux/math.h>
+#include <linux/module.h>
+#include <linux/mod_devicetable.h>
+#include <linux/mutex.h>
+#include <linux/platform_device.h>
+#include <linux/property.h>
+#include <linux/types.h>
#include <linux/iio/iio.h>
-#include <linux/iio/sysfs.h>
+#include <linux/iio/types.h>
/* SPEAR registers definitions */
#define SPEAR600_ADC_SCAN_RATE_LO(x) ((x) & 0xFFFF)
--
2.48.1
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH v3] iio: adc: spear_adc: cleans up, update and sorts the existing includes
2026-03-24 22:09 [PATCH v3] iio: adc: spear_adc: cleans up, update and sorts the existing includes Rodrigo Gobbi
@ 2026-03-25 12:14 ` Andy Shevchenko
0 siblings, 0 replies; 2+ messages in thread
From: Andy Shevchenko @ 2026-03-25 12:14 UTC (permalink / raw)
To: Rodrigo Gobbi
Cc: jic23, dlechner, nuno.sa, andy, ~lkcamp/patches, linux-iio, linux-kernel
On Tue, Mar 24, 2026 at 07:09:24PM -0300, Rodrigo Gobbi wrote:
> Remove unused includes and add what is being used (IWYU principle) and
> sort the remaining ones.
Thanks, make it two patches:
1: sort headers
2: apply IWYU
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-03-25 12:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-03-24 22:09 [PATCH v3] iio: adc: spear_adc: cleans up, update and sorts the existing includes Rodrigo Gobbi
2026-03-25 12:14 ` Andy Shevchenko
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®