From: Eric Dumazet <eric.dumazet@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: rjw@sisk.pl, netdev@vger.kernel.org, mcarlson@broadcom.com,
mchan@broadcom.com, linux-pm@lists.linux-foundation.org,
Jesse Gross <jesse@nicira.com>
Subject: [PATCH net-next-2.6] tg3: fix warnings
Date: Sat, 01 Jan 2011 16:22:46 +0100 [thread overview]
Message-ID: <1293895366.2535.43.camel@edumazet-laptop> (raw)
In-Reply-To: <20101231.111440.28810446.davem@davemloft.net>
Le vendredi 31 décembre 2010 à 11:14 -0800, David Miller a écrit :
> From: "Rafael J. Wysocki" <rjw@sisk.pl>
> Date: Sat, 25 Dec 2010 23:56:23 +0100
>
> > From: Rafael J. Wysocki <rjw@sisk.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@sisk.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@gmail.com>
Cc: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Michael Chan <mchan@broadcom.com>
Cc: Matt Carlson <mcarlson@broadcom.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)
next prev parent reply other threads:[~2011-01-01 15:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-25 22:56 [PATCH] tg3: Do not use legacy PCI power management Rafael J. Wysocki
2010-12-31 19:14 ` David Miller
2011-01-01 15:22 ` Eric Dumazet [this message]
2011-01-01 21:51 ` [PATCH net-next-2.6] tg3: fix warnings David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1293895366.2535.43.camel@edumazet-laptop \
--to=eric.dumazet@gmail.com \
--cc=davem@davemloft.net \
--cc=jesse@nicira.com \
--cc=linux-pm@lists.linux-foundation.org \
--cc=mcarlson@broadcom.com \
--cc=mchan@broadcom.com \
--cc=netdev@vger.kernel.org \
--cc=rjw@sisk.pl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox