ASoc: mediatek: mt8365: Don't use "proxy" headers
Subsystems (3)
PATCH 1/1 ASoc: mediatek: mt8365: Don't use "proxy" headers
Update header inclusions to follow IWYU (Include What You Use) principle.
--- sound/soc/mediatek/mt8365/mt8365-mt6357.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
sound/soc/mediatek/mt8365/mt8365-mt6357.c +9 -2
@@ -6,12 +6,19 @@* Authors: Nicolas Belin <[email protected]> */ +#include <linux/array_size.h> +#include <linux/dev_printk.h> +#include <linux/err.h> +#include <linux/mod_devicetable.h> #include <linux/module.h> -#include <linux/of_gpio.h> +#include <linux/pinctrl/consumer.h> +#include <linux/platform_device.h> +#include <linux/types.h> +#include <sound/soc.h> #include <sound/pcm_params.h> +#include "mt8365-afe-common.h" -#include <linux/pinctrl/consumer.h> #include "../common/mtk-soc-card.h" #include "../common/mtk-soundcard-driver.h"
Signature · 1 line
2.43.0.rc1.1336.g36b5255a03ac
Quoted 2 lines · Andy Shevchenko
Update header inclusions to follow IWYU (Include What You Use) principle.
Hmm... I think we are waiting for somebody to Ack / review this change?
Signature · 2 lines
With Best Regards, Andy Shevchenko
Mark Brown
maintainerQuoted 5 lines · Andy Shevchenko
Quoted 2 lines · Andy Shevchenko
Update header inclusions to follow IWYU (Include What You Use) principle.
Hmm... I think we are waiting for somebody to Ack / review this change?
Yes.
Hello Andy.
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.
Quoted 8 lines · Mark Brown
Quoted 5 lines · Andy Shevchenko
Quoted 2 lines · Andy Shevchenko
Update header inclusions to follow IWYU (Include What You Use) principle.
Hmm... I think we are waiting for somebody to Ack / review this change?
Yes.
Signature · 2 lines
Regards, Alexandre
Quoted 5 lines · Alexandre Mergnat
Hello Andy.
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.
Quoted 9 lines · Mark Brown
Quoted 8 lines · Andy Shevchenko
Quoted 5 lines · Andy Shevchenko
Quoted 2 lines
Update header inclusions to follow IWYU (Include What You Use) principle.
Hmm... I think we are waiting for somebody to Ack / review this change?
Yes.
Signature · 2 lines
With Best Regards, Andy Shevchenko
Hi Andy
Quoted 5 lines · Andy Shevchenko
Quoted 4 lines · Alexandre Mergnat
Hello Andy.
Actually, after test it, "
linux/of_gpio.h" isn't needed at all anymore.
Quoted 8 lines
Quoted 1 line
That mean all added include in this patch aren't required.
Do you mean the driver doesn't not use types from
types.hor dev_*() macros fromdev_printk.h? I don't believe this, sorry.Basically what you are trying to say is "let's move
of_gpio.himplicit 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 ?
Maybe my test isn't consistent because it isn't possible to clear all proxy ?
If that's the case, consider my review-by.
I've validated some include manually. Are you using a script to parse the file and raise all necessary "linux/*" include ?
Signature · 2 lines
Regards, Alexandre
Alexandre Mergnat
Reviewed-byQuoted 15 lines · Alexandre Mergnat
Quoted 5 lines · Andy Shevchenko
Quoted 4 lines · Alexandre Mergnat
Hello Andy.
Actually, after test it, "
linux/of_gpio.h" isn't needed at all anymore.Quoted 8 lines
Quoted 1 line
That mean all added include in this patch aren't required.
Do you mean the driver doesn't not use types from
types.hor dev_*() macros fromdev_printk.h? I don't believe this, sorry.Basically what you are trying to say is "let's move
of_gpio.himplicit includes to become something else's problem". It's not what this patch intended to do.
Quoted 8 lines
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 ?
Maybe my test isn't consistent because it isn't possible to clear all proxy ?If that's the case, consider my review-by.
Quoted 1 line
I've validated some include manually. Are you using a script to parse the file and raise all necessary "linux/*" include ?
Signature · 2 lines
Regards, Alexandre
Quoted 3 lines · Alexandre Mergnat
Quoted 2 lines · Alexandre Mergnat
Quoted 1 line · Andy Shevchenko
On Mon, Nov 25, 2024 at 12:32:13PM +0100, Alexandre Mergnat wrote:
...
Quoted 18 lines
Quoted 18 lines
Quoted 10 lines
Quoted 3 lines
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.hor dev_*() macros fromdev_printk.h? I don't believe this, sorry.Basically what you are trying to say is "let's move
of_gpio.himplicit 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 ?
Maybe my test isn't consistent because it isn't possible to clear all proxy ?
Quoted 3 lines
Quoted 1 line
If that's the case, consider my review-by.
Reviewed-by Alexandre Mergnat <[email protected]>
Thank you!
Mark, would be enough to apply the change?
Quoted 2 lines
Quoted 2 lines
I've validated some include manually. Are you using a script to parse the file and raise all necessary "linux/*" include ?
Signature · 2 lines
With Best Regards, Andy Shevchenko
Quoted 2 lines · Alexandre Mergnat
Quoted 1 line · Andy Shevchenko
On Mon, Nov 25, 2024 at 12:32:13PM +0100, Alexandre Mergnat wrote:
...
Quoted 10 lines
Quoted 9 lines
Quoted 3 lines
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.hor dev_*() macros fromdev_printk.h? I don't believe this, sorry.Basically what you are trying to say is "let's move
of_gpio.himplicit includes to become something else's problem". It's not what this patch intended to do.
Quoted 5 lines
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.
Quoted 1 line
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)
Quoted 1 line
If that's the case, consider my review-by.
Thank you!
Quoted 2 lines
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!
Signature · 2 lines
With Best Regards, Andy Shevchenko
Mark Brown
maintainerQuoted 4 lines · Andy Shevchenko
Update header inclusions to follow IWYU (Include What You Use) principle.
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoc: mediatek: mt8365: Don't use "proxy" headers
commit: 509544d1b6dbffe7bc1849593ff217f965ec0419
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark