Skip to content

Commit 66cf350

Browse files
Paul Gortmakerdavem330
authored andcommitted
net/ethernet: tundra: fix dump_eth_one warning in tsi108_eth
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" <[email protected]> Cc: [email protected] Cc: [email protected] Signed-off-by: Paul Gortmaker <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 61ec4bc commit 66cf350

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/net/ethernet/tundra/tsi108_eth.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ static struct platform_driver tsi_eth_driver = {
166166

167167
static void tsi108_timed_checker(unsigned long dev_ptr);
168168

169+
#ifdef DEBUG
169170
static void dump_eth_one(struct net_device *dev)
170171
{
171172
struct tsi108_prv_data *data = netdev_priv(dev);
@@ -190,6 +191,7 @@ static void dump_eth_one(struct net_device *dev)
190191
TSI_READ(TSI108_EC_RXESTAT),
191192
TSI_READ(TSI108_EC_RXERR), data->rxpending);
192193
}
194+
#endif
193195

194196
/* Synchronization is needed between the thread and up/down events.
195197
* Note that the PHY is accessed through the same registers for both

0 commit comments

Comments
 (0)