Message ID | 20220626074315.61209-1-linus.walleij@linaro.org (mailing list archive) |
---|---|
State | Accepted |
Commit | 620f83b8326ce9706b1118334f0257ae028ce045 |
Headers | show |
Series | soc: ixp4xx/npe: Fix unused match warning | expand |
Hello: This patch was applied to soc/soc.git (arm/fixes) by Arnd Bergmann <arnd@arndb.de>: On Sun, 26 Jun 2022 09:43:15 +0200 you wrote: > The kernel test robot found this inconsistency: > > drivers/soc/ixp4xx/ixp4xx-npe.c:737:34: warning: > 'ixp4xx_npe_of_match' defined but not used [-Wunused-const-variable=] > 737 | static const struct of_device_id ixp4xx_npe_of_match[] = { > > This is because the match is enclosed in the of_match_ptr() > which compiles into NULL when OF is disabled and this > is unnecessary. > > [...] Here is the summary with links: - soc: ixp4xx/npe: Fix unused match warning https://git.kernel.org/soc/soc/c/620f83b8326c You are awesome, thank you!
diff --git a/drivers/soc/ixp4xx/ixp4xx-npe.c b/drivers/soc/ixp4xx/ixp4xx-npe.c index 613935cb6a48..58240e320c13 100644 --- a/drivers/soc/ixp4xx/ixp4xx-npe.c +++ b/drivers/soc/ixp4xx/ixp4xx-npe.c @@ -758,7 +758,7 @@ static const struct of_device_id ixp4xx_npe_of_match[] = { static struct platform_driver ixp4xx_npe_driver = { .driver = { .name = "ixp4xx-npe", - .of_match_table = of_match_ptr(ixp4xx_npe_of_match), + .of_match_table = ixp4xx_npe_of_match, }, .probe = ixp4xx_npe_probe, .remove = ixp4xx_npe_remove,
The kernel test robot found this inconsistency: drivers/soc/ixp4xx/ixp4xx-npe.c:737:34: warning: 'ixp4xx_npe_of_match' defined but not used [-Wunused-const-variable=] 737 | static const struct of_device_id ixp4xx_npe_of_match[] = { This is because the match is enclosed in the of_match_ptr() which compiles into NULL when OF is disabled and this is unnecessary. Fix it by dropping of_match_ptr() around the match. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> --- SoC folks: please apply this directly for fixes. --- drivers/soc/ixp4xx/ixp4xx-npe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)