Re: skge warning
From: Daniel Halperin <hidden>
Date: 2012-01-03 17:28:14
quoted
---------- Forwarded message ---------- From: Daniel Halperin <redacted> Date: Mon, Jan 2, 2012 at 4:01 PM Subject: skge warning To: netdev@vger.kernel.org I'm using Linus' current branch. drivers/net/ethernet/marvell/skge.c:4046: warning: ‘skge_suspend’ defined but not used drivers/net/ethernet/marvell/skge.c:4071: warning: ‘skge_resume’ defined but not used It appears to be the use of the wrong CONFIG option. (The code curently uses CONFIG_PM to see whether these functions are used). Here's the relevant section of my .config: # # Power management and ACPI options # # CONFIG_SUSPEND is not set # CONFIG_HIBERNATION is not set CONFIG_PM_RUNTIME=y CONFIG_PM=y CONFIG_PM_DEBUG=y # CONFIG_PM_ADVANCED_DEBUG is not set Thanks, DanThis usage pattern is common across all network drivers, therefore either all should change to use CONFIG_PM_SLEEP, or just ignore the extra code.
Thanks, Stephen! Interestingly, I checked out how the other Ethernet drivers define their suspend/resume functions via: % grep SIMPLE_DEV_PM_OPS **/*c atheros/atl1c/atl1c_main.c:static SIMPLE_DEV_PM_OPS(atl1c_pm_ops, atl1c_suspend, atl1c_resume); atheros/atlx/atl1.c:static SIMPLE_DEV_PM_OPS(atl1_pm_ops, atl1_suspend, atl1_resume); broadcom/tg3.c:static SIMPLE_DEV_PM_OPS(tg3_pm_ops, tg3_suspend, tg3_resume); jme.c:static SIMPLE_DEV_PM_OPS(jme_pm_ops, jme_suspend, jme_resume); marvell/skge.c:static SIMPLE_DEV_PM_OPS(skge_pm_ops, skge_suspend, skge_resume); marvell/sky2.c:static SIMPLE_DEV_PM_OPS(sky2_pm_ops, sky2_suspend, sky2_resume); nvidia/forcedeth.c:static SIMPLE_DEV_PM_OPS(nv_pm_ops, nv_suspend, nv_resume); and all of them but skge.c use CONFIG_PM_SLEEP instead of CONFIG_PM. It looks like you hit the nail on the head, but skge.c is the exception here. I can submit a patch if you like. Thanks! Dan