net: Fix ehea warning when built in
Subsystems (2)
PATCH 1/1 net: Fix ehea warning when built in
In:
commit 7a3a62128388a6af771e99df8628ddee2e8be7ca
Author: Olaf Hering <[email protected]> drivers/net/ethernet/ibm/ehea/ehea_main.c: add alias entry for portN properties
We added ehea_module_device_table. Unfortunately we only use this when building as a module so we get the following warning when built in, like in pseries_defconfig:
drivers/net/ethernet/ibm/ehea/ehea_main.c:105:1: warning: 'ehea_module_device_table' defined but not used [-Wunused-variable]
This wraps ehea_module_device_table with #if MODULE.
drivers/net/ethernet/ibm/ehea/ehea_main.c +2 -0
@@ -102,6 +102,7 @@ static int ehea_probe_adapter(struct platform_device *dev);static int ehea_remove (struct platform_device *dev); +#ifdef MODULE static struct of_device_id ehea_module_device_table[] = { { .name = "lhea",
@@ -114,6 +115,7 @@ static struct of_device_id ehea_module_device_table[] = { {}, };MODULE_DEVICE_TABLE (of, ehea_module_device_table); +#endif static struct of_device_id ehea_device_table[] = { {
David Miller
maintainerFrom: Michael Neuling <[email protected]>
Date: Thu, 21 Nov 2013 15:36:49 +1100
Quoted 8 lines
In:
commit7a3a62128388a6af771e99df8628ddee2e8be7ca
Author: Olaf Hering <[email protected]>drivers/net/ethernet/ibm/ehea/ehea_main.c: add alias entry for portN properties
We addedehea_module_device_table. Unfortunately we only use this when building as a module so we get the following warning when built in, like inpseries_defconfig:
Quoted 5 lines
drivers/net/ethernet/ibm/ehea/ehea_main.c:105:1: warning: 'ehea_module_device_table' defined but not used [-Wunused-variable]This wraps
ehea_module_device_tablewith #if MODULE.Signed-off-by Michael Neuling <[email protected]>
I think putting an ugly MODULE ifdef into every driver that does something like this is not going to cut it.
Rather, the MODULE_DEVICE_TABLE() definition when !MODULE should do something reasonable, like make a void reference to the symbole.
I'm not applying this, the fix belongs in a generic place.
Thanks.