Re: [PATCH v4 03/11] iio: amplifiers: ad8366: remove unused include headers

From: Andy Shevchenko

Date: Tue Feb 10 2026 - 14:57:53 EST


On Tue, Feb 10, 2026 at 07:42:03PM +0000, Rodrigo Alencar via B4 Relay wrote:

> Apply IWYU principle, removing the following headers:
> - linux/device.h: no usage of devm_add_action_or_reset, device_attr...
> - linux/kernel.h: no usage of container_of, kasprintf, ...
> - linux/slab.h: memory management handled by iio
> - linux/sysfs.h: sysfs interaction is managed by iio
> - linux/iio/sysfs.h: not using iio device attributes in this driver

Yeah, but it also means to add (a lot of) missed headers...

array_size,h
dev_printk.h
mod_devicetable.h
mutex.h
stddef.h

(might be even more, this list was made just at the first glance).

> Being a small patch, the remaining includes are alphabetically sorted.
> In gcc, compiling with -H allows for dependency visualization,
> which indicates that except for linux/iio/sysfs.h, all removed
> headers are indirectly included by the remaining headers.

--
With Best Regards,
Andy Shevchenko