The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Tomas Melin <tomas.melin@vaisala.com>
Cc: Lars-Peter Clausen <lars@metafoo.de>,
	Michael Hennerich <Michael.Hennerich@analog.com>,
	Nuno Sa <nuno.sa@analog.com>, Jonathan Cameron <jic23@kernel.org>,
	David Lechner <dlechner@baylibre.com>,
	Andy Shevchenko <andy@kernel.org>, Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 3/3] iio: adc: ad9467: drop kernel.h in favor of array_size.h
Date: Mon, 8 Dec 2025 15:20:24 +0200	[thread overview]
Message-ID: <aTbQmOpMfQnYkeLT@smile.fi.intel.com> (raw)
In-Reply-To: <20251208-add-ad9211-v3-3-c49897fa91c4@vaisala.com>

On Mon, Dec 08, 2025 at 12:30:59PM +0000, Tomas Melin wrote:
> No need to include the entire kernel.h when the only thing needed
> is the ARRAY_SIZE macro.

ARRAY_SIZE().

...


> --- a/drivers/iio/adc/ad9467.c
> +++ b/drivers/iio/adc/ad9467.c
> @@ -12,7 +12,7 @@
>  #include <linux/module.h>
>  #include <linux/mutex.h>
>  #include <linux/device.h>
> -#include <linux/kernel.h>
> +#include <linux/array_size.h>
>  #include <linux/slab.h>
>  #include <linux/spi/spi.h>
>  #include <linux/seq_file.h>

Please, keep them sorted.

...

While this change is almost (*) okay per se, I think we can address more
while at it.
- Make the header inclusions ordered (also fix the location of clk.h)
- drop other proxy (device.h) or unneeded headers (bitops.h as it's implied by bitmap.h)
- add missing ones (dev_printk.h, device/devres.h, ...)

(*) no, kernel.h provides more for this driver, for example, your patch
misses types.h.

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2025-12-08 13:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-08 12:30 [PATCH v3 0/3] iio: adc: ad9467: add support for ad9211 Tomas Melin
2025-12-08 12:30 ` [PATCH v3 1/3] dt-bindings: " Tomas Melin
2025-12-08 12:30 ` [PATCH v3 2/3] iio: " Tomas Melin
2025-12-08 13:27   ` Andy Shevchenko
2025-12-08 12:30 ` [PATCH v3 3/3] iio: adc: ad9467: drop kernel.h in favor of array_size.h Tomas Melin
2025-12-08 13:20   ` Andy Shevchenko [this message]
2025-12-08 15:41     ` Tomas Melin
2025-12-08 15:58       ` Andy Shevchenko
2025-12-08 16:21         ` Tomas Melin
2025-12-08 16:23           ` Andy Shevchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aTbQmOpMfQnYkeLT@smile.fi.intel.com \
    --to=andriy.shevchenko@intel.com \
    --cc=Michael.Hennerich@analog.com \
    --cc=andy@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=jic23@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nuno.sa@analog.com \
    --cc=robh@kernel.org \
    --cc=tomas.melin@vaisala.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox