mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2] iio: adc: ad7476: Remove duplicate include and sort the rest
@ 2026-01-08  8:39 Chen Ni
  2026-01-08  9:22 ` Andy Shevchenko
  0 siblings, 1 reply; 3+ messages in thread
From: Chen Ni @ 2026-01-08  8:39 UTC (permalink / raw)
  To: mazziesaccount, lars, Michael.Hennerich, jic23, dlechner, nuno.sa, andy
  Cc: linux-iio, linux-kernel, Chen Ni

Remove duplicate <linux/bitops.h> and sort all headers alphabetically.

Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
---
Changelog:

v1 -> v2:

- Alphabetically sort all header files.
---
 drivers/iio/adc/ad7476.c | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/drivers/iio/adc/ad7476.c b/drivers/iio/adc/ad7476.c
index 1bec6657394c..51bd81b2eb0a 100644
--- a/drivers/iio/adc/ad7476.c
+++ b/drivers/iio/adc/ad7476.c
@@ -7,21 +7,20 @@
  */
 
 #include <linux/bitops.h>
+#include <linux/delay.h>
 #include <linux/device.h>
+#include <linux/err.h>
+#include <linux/gpio/consumer.h>
 #include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/regulator/consumer.h>
 #include <linux/slab.h>
-#include <linux/sysfs.h>
 #include <linux/spi/spi.h>
-#include <linux/regulator/consumer.h>
-#include <linux/gpio/consumer.h>
-#include <linux/err.h>
-#include <linux/module.h>
-#include <linux/bitops.h>
-#include <linux/delay.h>
+#include <linux/sysfs.h>
 
+#include <linux/iio/buffer.h>
 #include <linux/iio/iio.h>
 #include <linux/iio/sysfs.h>
-#include <linux/iio/buffer.h>
 #include <linux/iio/trigger_consumer.h>
 #include <linux/iio/triggered_buffer.h>
 
-- 
2.25.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] iio: adc: ad7476: Remove duplicate include and sort the rest
  2026-01-08  8:39 [PATCH v2] iio: adc: ad7476: Remove duplicate include and sort the rest Chen Ni
@ 2026-01-08  9:22 ` Andy Shevchenko
  2026-01-11 13:18   ` Jonathan Cameron
  0 siblings, 1 reply; 3+ messages in thread
From: Andy Shevchenko @ 2026-01-08  9:22 UTC (permalink / raw)
  To: Chen Ni
  Cc: mazziesaccount, lars, Michael.Hennerich, jic23, dlechner,
	nuno.sa, andy, linux-iio, linux-kernel

On Thu, Jan 8, 2026 at 10:41 AM Chen Ni <nichen@iscas.ac.cn> wrote:
>
> Remove duplicate <linux/bitops.h> and sort all headers alphabetically.

I'm okay with this change, but I think ideally it would be three
patches in a series:
patch 1) as your v1;
patch 2) sorting the headers (as here);
patch 3) getting rid of "proxy" headers, e.g. kernel.h, by replacing
them with what actually is being used.

>  #include <linux/bitops.h>
> +#include <linux/delay.h>

>  #include <linux/device.h>

^^^ needs to be checked if it's used as a "proxy"

> +#include <linux/err.h>
> +#include <linux/gpio/consumer.h>

>  #include <linux/kernel.h>

^^^ This is for sure not used as is in the driver, so definitely has
to be replaced.

> +#include <linux/module.h>
> +#include <linux/regulator/consumer.h>
>  #include <linux/slab.h>
> -#include <linux/sysfs.h>
>  #include <linux/spi/spi.h>
> -#include <linux/regulator/consumer.h>
> -#include <linux/gpio/consumer.h>
> -#include <linux/err.h>
> -#include <linux/module.h>
> -#include <linux/bitops.h>
> -#include <linux/delay.h>
> +#include <linux/sysfs.h>

It's up to the maintainers and to you to resplit, send a v3, but
again, I'm fine with this version.

-- 
With Best Regards,
Andy Shevchenko

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] iio: adc: ad7476: Remove duplicate include and sort the rest
  2026-01-08  9:22 ` Andy Shevchenko
@ 2026-01-11 13:18   ` Jonathan Cameron
  0 siblings, 0 replies; 3+ messages in thread
From: Jonathan Cameron @ 2026-01-11 13:18 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Chen Ni, mazziesaccount, lars, Michael.Hennerich, dlechner,
	nuno.sa, andy, linux-iio, linux-kernel

On Thu, 8 Jan 2026 11:22:53 +0200
Andy Shevchenko <andy.shevchenko@gmail.com> wrote:

> On Thu, Jan 8, 2026 at 10:41 AM Chen Ni <nichen@iscas.ac.cn> wrote:
> >
> > Remove duplicate <linux/bitops.h> and sort all headers alphabetically.  
> 
> I'm okay with this change, but I think ideally it would be three
> patches in a series:
> patch 1) as your v1;
I picked up v1 for this reason.

> patch 2) sorting the headers (as here);
> patch 3) getting rid of "proxy" headers, e.g. kernel.h, by replacing
> them with what actually is being used.
Absolutely on these being good follow up steps.

> 
> >  #include <linux/bitops.h>
> > +#include <linux/delay.h>  
> 
> >  #include <linux/device.h>  
> 
> ^^^ needs to be checked if it's used as a "proxy"
> 
> > +#include <linux/err.h>
> > +#include <linux/gpio/consumer.h>  
> 
> >  #include <linux/kernel.h>  
> 
> ^^^ This is for sure not used as is in the driver, so definitely has
> to be replaced.
> 
> > +#include <linux/module.h>
> > +#include <linux/regulator/consumer.h>
> >  #include <linux/slab.h>
> > -#include <linux/sysfs.h>
> >  #include <linux/spi/spi.h>
> > -#include <linux/regulator/consumer.h>
> > -#include <linux/gpio/consumer.h>
> > -#include <linux/err.h>
> > -#include <linux/module.h>
> > -#include <linux/bitops.h>
> > -#include <linux/delay.h>
> > +#include <linux/sysfs.h>  
> 
> It's up to the maintainers and to you to resplit, send a v3, but
> again, I'm fine with this version.
I'd prefer the split as you have it above. As such I picked v1 up
to get patch 1 of that split up.

Thanks,

Jonathan

> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-01-11 13:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-01-08  8:39 [PATCH v2] iio: adc: ad7476: Remove duplicate include and sort the rest Chen Ni
2026-01-08  9:22 ` Andy Shevchenko
2026-01-11 13:18   ` Jonathan Cameron

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®