lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Tue, 3 Jan 2012 09:27:53 -0800
From:	Daniel Halperin <dhalperi@...washington.edu>
To:	Stephen Hemminger <shemminger@...tta.com>, netdev@...r.kernel.org
Cc:	shemminger@...ux-foundation.org
Subject: Re: skge warning

>> ---------- Forwarded message ----------
>> From: Daniel Halperin <dhalperi@...washington.edu>
>> Date: Mon, Jan 2, 2012 at 4:01 PM
>> Subject: skge warning
>> To: netdev@...r.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,
>> Dan
>
> This 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
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ