From: Christophe Leroy Date: Wed, 4 May 2022 11:16:09 +0000 (+0200) Subject: sungem: Prepare cleanup of powerpc's asm/prom.h X-Git-Tag: v5.19-rc1~159^2~181 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d9ccf770c7c5e5e92ee2189fcddf39e348bb0028;p=thirdparty%2Flinux.git sungem: Prepare cleanup of powerpc's asm/prom.h powerpc's includes some headers that it doesn't need itself. In order to clean powerpc's up in a further step, first clean all files that include sungem_phy.c doesn't use any object provided by . But removing inclusion of leads to the following errors: CC drivers/net/sungem_phy.o drivers/net/sungem_phy.c: In function 'bcm5421_init': drivers/net/sungem_phy.c:448:42: error: implicit declaration of function 'of_get_parent'; did you mean 'dget_parent'? [-Werror=implicit-function-declaration] 448 | struct device_node *np = of_get_parent(phy->platform_data); | ^~~~~~~~~~~~~ | dget_parent drivers/net/sungem_phy.c:448:42: warning: initialization of 'struct device_node *' from 'int' makes pointer from integer without a cast [-Wint-conversion] drivers/net/sungem_phy.c:450:35: error: implicit declaration of function 'of_get_property' [-Werror=implicit-function-declaration] 450 | if (np == NULL || of_get_property(np, "no-autolowpower", NULL)) | ^~~~~~~~~~~~~~~ Remove from included headers but add to handle the above. Signed-off-by: Christophe Leroy Link: https://lore.kernel.org/r/f7a7fab3ec5edf803d934fca04df22631c2b449d.1651662885.git.christophe.leroy@csgroup.eu Signed-off-by: Jakub Kicinski --- diff --git a/drivers/net/sungem_phy.c b/drivers/net/sungem_phy.c index 4daac5fda073c..ff22b6b1c6861 100644 --- a/drivers/net/sungem_phy.c +++ b/drivers/net/sungem_phy.c @@ -29,11 +29,7 @@ #include #include #include - -#ifdef CONFIG_PPC_PMAC -#include -#endif - +#include #include /* Link modes of the BCM5400 PHY */