net: fixed_phy: Add forward declaration for struct gpio_desc;
Subsystems (3)
PATCH 1/1 net: fixed_phy: Add forward declaration for struct gpio_desc;
Add forward declaration for struct gpio_desc in order to address the following:
./include/linux/phy_fixed.h:48:17: error: 'struct gpio_desc' declared inside parameter list [-Werror] ./include/linux/phy_fixed.h:48:17: error: its scope is only this definition or declaration, which is probably not what you want [-Werror]
Fixes commit 71bd106d2567 ("net: fixed-phy: Addfixed_phy_register_with_gpiod() API")
--- include/linux/phy_fixed.h | 1 + 1 file changed, 1 insertion(+)
include/linux/phy_fixed.h +1 -0
@@ -11,6 +11,7 @@ struct fixed_phy_status { };struct device_node ; +struct gpio_desc ;#if IS_ENABLED (CONFIG_FIXED_PHY )extern int fixed_phy_change_carrier (struct net_device *dev,bool new_carrier);
Signature · 1 line
2.23.0.187.g17f5b7556c-goog
Quoted 8 lines · Moritz Fischer
Add forward declaration for struct
gpio_descin order to address the following:
./include/linux/phy_fixed.h:48:17: error: 'structgpio_desc' declared inside parameter list [-Werror]./include/linux/phy_fixed.h:48:17: error: its scope is only this definition or declaration, which is probably not what you want [-Werror]Fixes commit
71bd106d2567("net: fixed-phy: Addfixed_phy_register_with_gpiod()API")
There is a standardized tag for that which is:
fixed_phy_register_with_gpiod() API")
Other than that:
Quoted 18 lines
Signed-off-by Moritz Fischer <[email protected]>--- include/linux/phy_fixed.h | 1 + 1 file changed, 1 insertion(+)include/linux/phy_fixed.h +1
-0@@ -11,6 +11,7 @@ struct fixed_phy_status { };struct device_node ; +struct gpio_desc ;#if IS_ENABLED (CONFIG_FIXED_PHY )extern int fixed_phy_change_carrier (struct net_device *dev,bool new_carrier);
Signature · 1 line
Florian
David Miller
maintainerFrom: Moritz Fischer <[email protected]>
Date: Tue, 3 Sep 2019 11:46:52 -0700
Quoted 9 lines
Add forward declaration for struct
gpio_descin order to address the following:
./include/linux/phy_fixed.h:48:17: error: 'structgpio_desc' declared inside parameter list [-Werror]./include/linux/phy_fixed.h:48:17: error: its scope is only this definition or declaration, which is probably not what you want [-Werror]Fixes commit
71bd106d2567("net: fixed-phy: Addfixed_phy_register_with_gpiod()API")Signed-off-by Moritz Fischer <[email protected]>
Applied with Fixes tag fixed up.