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
| ||
|
Date: Sat, 01 Jan 2011 16:22:46 +0100 From: Eric Dumazet <eric.dumazet@...il.com> To: David Miller <davem@...emloft.net> Cc: rjw@...k.pl, netdev@...r.kernel.org, mcarlson@...adcom.com, mchan@...adcom.com, linux-pm@...ts.linux-foundation.org, Jesse Gross <jesse@...ira.com> Subject: [PATCH net-next-2.6] tg3: fix warnings Le vendredi 31 décembre 2010 à 11:14 -0800, David Miller a écrit : > From: "Rafael J. Wysocki" <rjw@...k.pl> > Date: Sat, 25 Dec 2010 23:56:23 +0100 > > > From: Rafael J. Wysocki <rjw@...k.pl> > > > > The tg3 driver uses the legacy PCI power management, so it has to do > > some PCI-specific things in its ->suspend() and ->resume() callbacks, > > which isn't necessary and should better be done by the PCI > > sybsystem-level power management code. > > > > Convert tg3 to the new PCI power management framework and make it > > let the PCI subsystem take care of all the PCI-specific aspects of > > device handling during system power transitions. > > > > Tested on HP nx6325 with a NetXtreme BCM5788 adapter. > > > > Signed-off-by: Rafael J. Wysocki <rjw@...k.pl> > > Applied. Happy new year everybody ;) Here is a followup to avoid some warnings if CONFIG_PM_SLEEP=n Now I have to understand why vlan/bonding doesnt work anymore with tg3 on current net-next-2.6 :( Is anybody already on this problem ? (Cc Jesse Gross) Thanks [PATCH net-next-2.6] tg3: fix warnings In case CONFIG_PM_SLEEP is disabled, we dont need tg3_suspend() and tg3_resume(). drivers/net/tg3.c:15056: warning: ‘tg3_suspend’ defined but not used drivers/net/tg3.c:15110: warning: ‘tg3_resume’ defined but not used Signed-off-by: Eric Dumazet <eric.dumazet@...il.com> Cc: Rafael J. Wysocki <rjw@...k.pl> Cc: Michael Chan <mchan@...adcom.com> Cc: Matt Carlson <mcarlson@...adcom.com> --- drivers/net/tg3.c | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 6137869..e3d80c9 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c @@ -15052,6 +15052,7 @@ static void __devexit tg3_remove_one(struct pci_dev *pdev) } } +#ifdef CONFIG_PM_SLEEP static int tg3_suspend(struct device *device) { struct pci_dev *pdev = to_pci_dev(device); @@ -15140,13 +15141,20 @@ out: } static SIMPLE_DEV_PM_OPS(tg3_pm_ops, tg3_suspend, tg3_resume); +#define TG3_PM_OPS (&tg3_pm_ops) + +#else + +#define TG3_PM_OPS NULL + +#endif /* CONFIG_PM_SLEEP */ static struct pci_driver tg3_driver = { .name = DRV_MODULE_NAME, .id_table = tg3_pci_tbl, .probe = tg3_init_one, .remove = __devexit_p(tg3_remove_one), - .driver.pm = &tg3_pm_ops, + .driver.pm = TG3_PM_OPS, }; static int __init tg3_init(void) -- 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