Re: [PATCH v3 2/2] staging: iio: addac: adt7316: replace kernel.h with explicit headers

From: Andy Shevchenko

Date: Tue Nov 03 2026 - 05:33:13 EST


On Mon, Nov 02, 2026 at 11:42:36AM +0200, Abdelnasser Hussein wrote:
> Drop the proxy header <linux/kernel.h> and replace it with direct
> inclusions per the Include What You Use (IWYU) principle. Also remove
> unused headers and keep the list alphabetically sorted.

> Explicitly add:
> - <linux/bits.h> for BIT()
> - <linux/err.h> for IS_ERR() and PTR_ERR()
> - <linux/errno.h> for error codes (-EIO, -EPERM, -EINVAL, -ENOMEM,
> -ENODEV)
> - <linux/kstrtox.h> for kstrtou8(), kstrtou16(), and kstrtoint()
> - <linux/pm.h> for EXPORT_GPL_SIMPLE_DEV_PM_OPS()
> - <linux/string.h> for memcmp()
> - <linux/types.h> for fixed-width and standard types (u8, u16, bool, s64)
>
> Drop unused headers:
> - <linux/i2c.h> (no I2C symbols used in core driver)
> - <linux/kernel.h> (proxy header)
> - <linux/list.h> (no linked list symbols used)
> - <linux/rtc.h> (no RTC symbols used)
> - <linux/slab.h> (no kmalloc/kfree symbols used)
> - <linux/workqueue.h> (no workqueue symbols used)

This is too much for this type of change. Please, move it to the changelog and
comment block (after '---' line).

> Signed-off-by: Abdelnasser Hussein <abdelnasserhussein11@xxxxxxxxx>

--
With Best Regards,
Andy Shevchenko