igb: Define igb_pm_ops conditionally on CONFIG_PM
Subsystems (3)
PATCH 1/1 igb: Define igb_pm_ops conditionally on CONFIG_PM
For s390, gcc with W=1 reports drivers/net/ethernet/intel/igb/igb_main.c:186:32: error:
'igb_pm_ops' defined but not used [-Werror=unused-const-variable=]
186 | static const struct dev_pm_ops igb_pm_ops = {
| ^~~~~~~~~~The only use of igb_pm_ops is conditional on CONFIG_PM. The definition of igb_pm_ops should also be conditional on CONFIG_PM
--- drivers/net/ethernet/intel/igb/igb_main.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/ethernet/intel/igb/igb_main.c +2 -0
@@ -183,11 +183,13 @@ static int igb_resume(struct device *);static int igb_runtime_suspend (struct device *dev);static int igb_runtime_resume (struct device *dev);static int igb_runtime_idle (struct device *dev); +#ifdef CONFIG_PM static const struct dev_pm_ops igb_pm_ops = { SET_SYSTEM_SLEEP_PM_OPS(igb_suspend, igb_resume)SET_RUNTIME_PM_OPS (igb_runtime_suspend, igb_runtime_resume, igb_runtime_idle) }; +#endif static void igb_shutdown (struct pci_dev *);static int igb_pci_sriov_configure (struct pci_dev *dev,int num_vfs);#ifdef CONFIG_IGB_DCA
Signature · 6 lines
2.27.0 _______________________________________________ Intel-wired-lan mailing list [email protected] https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
Quoted 10 lines · Tom Rix
For s390, gcc with W=1 reports
drivers/net/ethernet/intel/igb/igb_main.c:186:32: error:
'igb_pm_ops' defined but not used [-Werror=unused-const-variable=]186 | static const struct dev_pm_ops igb_pm_ops = { | ^~~~~~~~~~The only use of
igb_pm_opsis conditional onCONFIG_PM. The definition ofigb_pm_opsshould also be conditional onCONFIG_PMSigned-off-by Tom Rix <[email protected]>
_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
Quoted 13 lines
-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Rix, Tom
Sent: Saturday, April 29, 2023 1:30 AM
To: Brandeburg, Jesse <[email protected]>; Nguyen, Anthony L <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]
Cc: [email protected]; [email protected]; [email protected]; Rix, Tom <[email protected]>
Subject: [Intel-wired-lan] [PATCH] igb: Defineigb_pm_opsconditionally onCONFIG_PMFor s390, gcc with W=1 reports
drivers/net/ethernet/intel/igb/igb_main.c:186:32: error:
'igb_pm_ops' defined but not used [-Werror=unused-const-variable=]186 | static const struct dev_pm_ops igb_pm_ops = { | ^~~~~~~~~~
Quoted 8 lines
The only use of
igb_pm_opsis conditional onCONFIG_PM. The definition ofigb_pm_opsshould also be conditional onCONFIG_PMSigned-off-by Tom Rix <[email protected]>---
drivers/net/ethernet/intel/igb/igb_main.c| 2 ++1 file changed, 2 insertions(+)