From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Alexandre Mergnat <amergnat@baylibre.com>
Cc: Mark Brown <broonie@kernel.org>,
Nicolas Belin <nbelin@baylibre.com>,
linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org,
Liam Girdwood <lgirdwood@gmail.com>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
Matthias Brugger <matthias.bgg@gmail.com>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>
Subject: Re: [PATCH v1 1/1] ASoc: mediatek: mt8365: Don't use "proxy" headers
Date: Tue, 26 Nov 2024 17:22:09 +0200 [thread overview]
Message-ID: <Z0XnoQQlsDwFh58h@smile.fi.intel.com> (raw)
In-Reply-To: <ed50c130-076c-4697-9f11-fe602c7ca03d@baylibre.com>
On Tue, Nov 26, 2024 at 11:29:28AM +0100, Alexandre Mergnat wrote:
> On 25/11/2024 12:50, Andy Shevchenko wrote:
> > On Mon, Nov 25, 2024 at 12:32:13PM +0100, Alexandre Mergnat wrote:
...
> > > Actually, after test it, "linux/of_gpio.h" isn't needed at all anymore.
> > >
> > > That mean all added include in this patch aren't required.
> > Do you mean the driver doesn't not use types from types.h or dev_*() macros
> > from dev_printk.h? I don't believe this, sorry.
>
> > Basically what you are trying to say is "let's move of_gpio.h implicit
> > includes to become something else's problem". It's not what this patch
> > intended to do.
>
> I'm just saying that I've test a build/boot with "linux/of_gpio.h" removed and without all
> include added in you patch. My understand is "linux/of_gpio.h" act as proxy
> for the includes added in your patch, my first idea was "if I remove it, build should fail cause
> of lack of other includes". I can understand these missing includes are mandatory, that
> probably means there is another proxy header ?
Exactly. The compilation can't be done without respective headers to be included,
so one way or another they are somehow got included, meaning that other(s) header(s)
are "proxying" them.
The idea is to have less of the dependency hell (you may find this term used
many times in the relation to Linux Kernel project), so the (leaf)
modules/drivers should follow the IWYU principle (Include What You Use). With
that in place it's much better to clean up the headers in order to decrease
the hellish dependency tree.
> Maybe my test isn't consistent because it isn't possible to clear all proxy ?
Theoretically it's possible and even practically, just requires a lot of time.
(Or a lot of resources to make a flag day or so, but seems not many are interested
to take the job)
> If that's the case, consider my review-by.
Thank you!
> I've validated some include manually. Are you using a script to parse the
> file and raise all necessary "linux/*" include ?
Nope, it comes just from my experience in the project, but I love to see
such a tool to exist!
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2024-11-26 15:23 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-31 10:27 [PATCH v1 1/1] ASoc: mediatek: mt8365: Don't use "proxy" headers Andy Shevchenko
2024-11-04 19:06 ` Andy Shevchenko
2024-11-04 21:12 ` Mark Brown
2024-11-25 11:32 ` Alexandre Mergnat
2024-11-25 11:50 ` Andy Shevchenko
2024-11-26 10:29 ` Alexandre Mergnat
2024-11-26 10:37 ` Alexandre Mergnat
2024-11-26 15:23 ` Andy Shevchenko
2024-11-26 15:22 ` Andy Shevchenko [this message]
2024-12-02 17:58 ` Mark Brown
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=Z0XnoQQlsDwFh58h@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=amergnat@baylibre.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-sound@vger.kernel.org \
--cc=matthias.bgg@gmail.com \
--cc=nbelin@baylibre.com \
--cc=perex@perex.cz \
--cc=tiwai@suse.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;
as well as URLs for NNTP newsgroup(s).