Re: [PATCH 2/3] iio: buffer: industrialio-triggered-buffer: fix includes with IWYU

Jonathan Cameron
2026-04-27T10:09:06Z

On Sun, 26 Apr 2026 18:18:01 -0300
Caio Morais <caiomorais@usp.br> wrote:

> From: Caio Morais <caiomorais@usp.br>
>
> Signed-off-by: Caio Morais <caiomorais@usp.br>
> ---
> drivers/iio/buffer/industrialio-triggered-buffer.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/iio/buffer/industrialio-triggered-buffer.c b/drivers/iio/buffer/industrialio-triggered-buffer.c
> index 9bf75dee7..a91d439d7 100644
> --- a/drivers/iio/buffer/industrialio-triggered-buffer.c
> +++ b/drivers/iio/buffer/industrialio-triggered-buffer.c
> @@ -4,9 +4,11 @@
> * Author: Lars-Peter Clausen <lars@metafoo.de>
> */
>
> -#include <linux/kernel.h>
> -#include <linux/export.h>

Why? There are numerous uses of EXPORT_SYMBOL() in this file.

> +#include <linux/errno.h>
> +#include <linux/linkage.h>

Wow. That one is obscure. What needed that?

For these, IWYU patches, I prefer to add that info after the ---
so it's easy to review them without opening the code up to take a closer look.

> #include <linux/module.h>
> +#include <linux/stddef.h>
> +
> #include <linux/iio/iio.h>
> #include <linux/iio/buffer.h>
> #include <linux/iio/buffer_impl.h>