Hi all, After merging the devicetree tree, today's linux-next build (x86_64 allmodconfig) failed like this: drivers/w1/masters/amd_axi_w1.c: In function 'amd_axi_w1_probe': drivers/w1/masters/amd_axi_w1.c:296:35: error: invalid use of undefined type 'struct platform_device' 296 | struct device *dev = &pdev->dev; | ^~ drivers/w1/masters/amd_axi_w1.c:307:25: error: implicit declaration of function 'devm_platform_ioremap_resource'; did you mean 'devm_ioremap_resource'? [-Werror=implicit-function-declaration] 307 | lp->base_addr = devm_platform_ioremap_resource(pdev, 0); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | devm_ioremap_resource drivers/w1/masters/amd_axi_w1.c:307:23: warning: assignment to 'void *' from 'int' makes pointer from integer without a cast [-Wint-conversion] 307 | lp->base_addr = devm_platform_ioremap_resource(pdev, 0); | ^ drivers/w1/masters/amd_axi_w1.c:311:19: error: implicit declaration of function 'platform_get_irq'; did you mean 'platform_notify'? [-Werror=implicit-function-declaration] 311 | lp->irq = platform_get_irq(pdev, 0); | ^~~~~~~~~~~~~~~~ | platform_notify drivers/w1/masters/amd_axi_w1.c:360:9: error: implicit declaration of function 'platform_set_drvdata' [-Werror=implicit-function-declaration] 360 | platform_set_drvdata(pdev, lp); | ^~~~~~~~~~~~~~~~~~~~ drivers/w1/masters/amd_axi_w1.c: In function 'amd_axi_w1_remove': drivers/w1/masters/amd_axi_w1.c:372:39: error: implicit declaration of function 'platform_get_drvdata' [-Werror=implicit-function-declaration] 372 | struct amd_axi_w1_local *lp = platform_get_drvdata(pdev); | ^~~~~~~~~~~~~~~~~~~~ drivers/w1/masters/amd_axi_w1.c:372:39: warning: initialization of 'struct amd_axi_w1_local *' from 'int' makes pointer from integer without a cast [-Wint-conversion] drivers/w1/masters/amd_axi_w1.c: At top level: drivers/w1/masters/amd_axi_w1.c:383:15: error: variable 'amd_axi_w1_driver' has initializer but incomplete type 383 | static struct platform_driver amd_axi_w1_driver = { | ^~~~~~~~~~~~~~~ drivers/w1/masters/amd_axi_w1.c:384:10: error: 'struct platform_driver' has no member named 'probe' 384 | .probe = amd_axi_w1_probe, | ^~~~~ drivers/w1/masters/amd_axi_w1.c:384:18: warning: excess elements in struct initializer 384 | .probe = amd_axi_w1_probe, | ^~~~~~~~~~~~~~~~ drivers/w1/masters/amd_axi_w1.c:384:18: note: (near initialization for 'amd_axi_w1_driver') drivers/w1/masters/amd_axi_w1.c:385:10: error: 'struct platform_driver' has no member named 'remove_new' 385 | .remove_new = amd_axi_w1_remove, | ^~~~~~~~~~ drivers/w1/masters/amd_axi_w1.c:385:23: warning: excess elements in struct initializer 385 | .remove_new = amd_axi_w1_remove, | ^~~~~~~~~~~~~~~~~ drivers/w1/masters/amd_axi_w1.c:385:23: note: (near initialization for 'amd_axi_w1_driver') drivers/w1/masters/amd_axi_w1.c:386:10: error: 'struct platform_driver' has no member named 'driver' 386 | .driver = { | ^~~~~~ drivers/w1/masters/amd_axi_w1.c:386:19: error: extra brace group at end of initializer 386 | .driver = { | ^ drivers/w1/masters/amd_axi_w1.c:386:19: note: (near initialization for 'amd_axi_w1_driver') drivers/w1/masters/amd_axi_w1.c:386:19: warning: excess elements in struct initializer drivers/w1/masters/amd_axi_w1.c:386:19: note: (near initialization for 'amd_axi_w1_driver') drivers/w1/masters/amd_axi_w1.c:391:1: warning: data definition has no type or storage class 391 | module_platform_driver(amd_axi_w1_driver); | ^~~~~~~~~~~~~~~~~~~~~~ drivers/w1/masters/amd_axi_w1.c:391:1: error: type defaults to 'int' in declaration of 'module_platform_driver' [-Werror=implicit-int] drivers/w1/masters/amd_axi_w1.c:391:1: warning: parameter names (without types) in function declaration drivers/w1/masters/amd_axi_w1.c:383:31: error: storage size of 'amd_axi_w1_driver' isn't known 383 | static struct platform_driver amd_axi_w1_driver = { | ^~~~~~~~~~~~~~~~~ drivers/w1/masters/amd_axi_w1.c:383:31: warning: 'amd_axi_w1_driver' defined but not used [-Wunused-variable] Caused by commit 0d18bcdebb2f ("of: Stop circularly including of_device.h and of_platform.h") interacting with commit 271c81935801 ("w1: Add AXI 1-wire host driver for AMD programmable logic IP core") from the w1 tree. I have applied the following merge fix patch for today (that could just be applied to the w1 tree). From: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx> Date: Fri, 8 Dec 2023 13:37:03 +1100 Subject: [PATCH] amd_axi_w1: include the correct files This is to cope with "of: Stop circularly including of_device.h and of_platform.h" Signed-off-by: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx> --- drivers/w1/masters/amd_axi_w1.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/w1/masters/amd_axi_w1.c b/drivers/w1/masters/amd_axi_w1.c index 24a05c2de5f1..f8b31cae450d 100644 --- a/drivers/w1/masters/amd_axi_w1.c +++ b/drivers/w1/masters/amd_axi_w1.c @@ -13,7 +13,8 @@ #include <linux/jiffies.h> #include <linux/kernel.h> #include <linux/module.h> -#include <linux/of_platform.h> +#include <linux/platform_device.h> +#include <linux/mod_devicetable.h> #include <linux/types.h> #include <linux/wait.h> -- 2.40.1 -- Cheers, Stephen Rothwell
Attachment:
pgp3gRMaLjcGo.pgp
Description: OpenPGP digital signature