* [PATCH] net: tsi108: Prevent compiler warning
@ 2013-09-18 12:49 Thierry Reding
2013-09-18 16:38 ` David Miller
0 siblings, 1 reply; 3+ messages in thread
From: Thierry Reding @ 2013-09-18 12:49 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev, linux-kernel
The dump_eth_one() function is only used if DEBUG is enabled, so protect
it by a corresponding #ifdef DEBUG block.
Signed-off-by: Thierry Reding <treding@nvidia.com>
---
drivers/net/ethernet/tundra/tsi108_eth.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/ethernet/tundra/tsi108_eth.c b/drivers/net/ethernet/tundra/tsi108_eth.c
index c4dbf98..a452d93 100644
--- a/drivers/net/ethernet/tundra/tsi108_eth.c
+++ b/drivers/net/ethernet/tundra/tsi108_eth.c
@@ -168,6 +168,7 @@ static struct platform_driver tsi_eth_driver = {
static void tsi108_timed_checker(unsigned long dev_ptr);
+#ifdef DEBUG
static void dump_eth_one(struct net_device *dev)
{
struct tsi108_prv_data *data = netdev_priv(dev);
@@ -192,6 +193,7 @@ static void dump_eth_one(struct net_device *dev)
TSI_READ(TSI108_EC_RXESTAT),
TSI_READ(TSI108_EC_RXERR), data->rxpending);
}
+#endif
/* Synchronization is needed between the thread and up/down events.
* Note that the PHY is accessed through the same registers for both
--
1.8.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] net: tsi108: Prevent compiler warning
2013-09-18 12:49 [PATCH] net: tsi108: Prevent compiler warning Thierry Reding
@ 2013-09-18 16:38 ` David Miller
2013-09-19 11:14 ` Thierry Reding
0 siblings, 1 reply; 3+ messages in thread
From: David Miller @ 2013-09-18 16:38 UTC (permalink / raw)
To: thierry.reding; +Cc: netdev, linux-kernel
From: Thierry Reding <thierry.reding@gmail.com>
Date: Wed, 18 Sep 2013 14:49:55 +0200
> The dump_eth_one() function is only used if DEBUG is enabled, so protect
> it by a corresponding #ifdef DEBUG block.
>
> Signed-off-by: Thierry Reding <treding@nvidia.com>
I would prefer that this function and the one call site is simply
removed instead.
This kind of thing can be provided via ethtool register dumps
and therefore without all of the ugliness this ad-hoc stuff
presents.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] net: tsi108: Prevent compiler warning
2013-09-18 16:38 ` David Miller
@ 2013-09-19 11:14 ` Thierry Reding
0 siblings, 0 replies; 3+ messages in thread
From: Thierry Reding @ 2013-09-19 11:14 UTC (permalink / raw)
To: David Miller; +Cc: netdev, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 927 bytes --]
On Wed, Sep 18, 2013 at 12:38:53PM -0400, David Miller wrote:
> From: Thierry Reding <thierry.reding@gmail.com>
> Date: Wed, 18 Sep 2013 14:49:55 +0200
>
> > The dump_eth_one() function is only used if DEBUG is enabled, so protect
> > it by a corresponding #ifdef DEBUG block.
> >
> > Signed-off-by: Thierry Reding <treding@nvidia.com>
>
> I would prefer that this function and the one call site is simply
> removed instead.
>
> This kind of thing can be provided via ethtool register dumps
> and therefore without all of the ugliness this ad-hoc stuff
> presents.
I just noticed the warning during some test builds I was doing due to
some unrelated patches and thought I'd clean it up along the way.
I'll send a patch to remove the functionality completely if that's what
you prefer, but I won't be able to reimplement it using ethtool. Perhaps
someone with actual hardware can do that.
Thierry
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-09-19 11:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-18 12:49 [PATCH] net: tsi108: Prevent compiler warning Thierry Reding
2013-09-18 16:38 ` David Miller
2013-09-19 11:14 ` Thierry Reding
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).