[PATCH v2 1/5] ASoC: Explicitly include correct DT includes

Mark Brown broonie at kernel.org
Thu Oct 5 04:39:41 AEDT 2023


On Wed, Oct 04, 2023 at 10:58:05AM -0500, Rob Herring wrote:
> The DT of_device.h and of_platform.h date back to the separate
> of_platform_bus_type before it was merged into the regular platform bus.
> As part of that merge prepping Arm DT support 13 years ago, they
> "temporarily" include each other. They also include platform_device.h
> and of.h. As a result, there's a pretty much random mix of those include
> files used throughout the tree. In order to detangle these headers and
> replace the implicit includes with struct declarations, users need to
> explicitly include the correct includes.

This is breaking various builds for me, for example arm64 defconfig:

/build/stage/linux/sound/soc/rockchip/rockchip_i2s_tdm.c: In function ‘rockchip_i2s_tdm_probe’:
/build/stage/linux/sound/soc/rockchip/rockchip_i2s_tdm.c:1557:17: error: implicit declaration of function ‘of_match_device’; did you mean ‘of_match_node’? [-Werror=implicit-function-declaration]
 1557 |         of_id = of_match_device(rockchip_i2s_tdm_match, &pdev->dev);
      |                 ^~~~~~~~~~~~~~~
      |                 of_match_node
/build/stage/linux/sound/soc/rockchip/rockchip_i2s_tdm.c:1557:15: warning: assignment to ‘const struct of_device_id *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
 1557 |         of_id = of_match_device(rockchip_i2s_tdm_match, &pdev->dev);
      |               ^
/build/stage/linux/sound/soc/tegra/tegra210_amx.c: In function ‘tegra210_amx_platform_probe’:
/build/stage/linux/sound/soc/tegra/tegra210_amx.c:541:17: error: implicit declaration of function ‘of_match_device’; did you mean ‘of_match_node’? [-Werror=implicit-function-declaration]
  541 |         match = of_match_device(tegra210_amx_of_match, dev);
      |                 ^~~~~~~~~~~~~~~
      |                 of_match_node
/build/stage/linux/sound/soc/tegra/tegra210_amx.c:541:15: warning: assignment to ‘const struct of_device_id *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
  541 |         match = of_match_device(tegra210_amx_of_match, dev);
      |               ^
cc1: some warnings being treated as errors

multi_v7_defconfig is also broken.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20231004/3dfe17cb/attachment.sig>


More information about the Linuxppc-dev mailing list