Thread (2 messages) flat view 2 messages, 2 authors, 2016-08-08

Re: [PATCH -net] net/ethernet: tundra: fix dump_eth_one warning in tsi108_eth

From: David Miller <davem@davemloft.net>
Date: 2016-08-08 20:08:47
Also in: linuxppc-dev

From: Paul Gortmaker <redacted>
Date: Thu, 4 Aug 2016 16:07:58 -0400
The call site for this function appears as:

  #ifdef DEBUG
        data->msg_enable = DEBUG;
        dump_eth_one(dev);
  #endif

...leading to the following warning for !DEBUG builds:

drivers/net/ethernet/tundra/tsi108_eth.c:169:13: warning: 'dump_eth_one' defined but not used [-Wunused-function]
 static void dump_eth_one(struct net_device *dev)
             ^

...when using the arch/powerpc/configs/mpc7448_hpc2_defconfig

Put the function definition under the same #ifdef as the call site
to avoid the warning.

Cc: "David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Paul Gortmaker <redacted>
Applied, thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help