net: ethernet: stmicro: stmmac: Fix compile error when STMMAC_XMIT_DEBUG used
Subsystems (4)
PATCH 1/1 net: ethernet: stmicro: stmmac: Fix compile error when STMMAC_XMIT_DEBUG used
From: Dinh Nguyen <[email protected]>
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c: In function:stmmac_xmit drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:1902:74:
error: expected ) before __func__
--- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +1 -1
@@ -1899,7 +1899,7 @@ static netdev_tx_t stmmac_xmit(struct sk_buff *skb, struct net_device *dev)#ifdef STMMAC_XMIT_DEBUG if (netif_msg_pktdata (priv)) { -pr_info ("%s: curr %d dirty=%d entry=%d, first=%p, nfrags=%d" +pr_info ("%s: curr %d dirty=%d entry=%d, first=%p, nfrags=%d" , __func__, (priv->cur_tx % txsize), (priv->dirty_tx % txsize), entry, first, nfrags);if (priv->extend_desc)
Signature · 1 line
1.7.9.5
From: <[email protected]>
Date: Wed, 12 Jun 2013 11:05:03 -0500
Quoted 9 lines
From: Dinh Nguyen <[email protected]>
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c: In function:stmmac_xmitdrivers/net/ethernet/stmicro/stmmac/stmmac_main.c:1902:74:
error: expected ) before__func__Signed-off-by Dinh Nguyen <[email protected]>Cc Giuseppe Cavallaro <[email protected]>CC David S. Miller <[email protected]>
Applied, but this debugging mechanism is completely unacceptable.
We have a dynamic, run time, way to do stuff like this without peppering up a driver with gross ifdefs.
This driver must be converted over to use "netif_msg_*()" et al. to guard message logging of different types of events.
Hello David
Quoted 9 lines · David Miller
From: <[email protected]>
Date: Wed, 12 Jun 2013 11:05:03 -0500Quoted 6 lines
From: Dinh Nguyen <[email protected]>
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c: In function:stmmac_xmitdrivers/net/ethernet/stmicro/stmmac/stmmac_main.c:1902:74:
error: expected ) before__func__
Quoted 5 lines
Quoted 3 lines
Signed-off-by Dinh Nguyen <[email protected]>Cc Giuseppe Cavallaro <[email protected]>CC David S. Miller <[email protected]>Applied, but this debugging mechanism is completely unacceptable.
I agree with you, I do not like it too
this debug code is quite old and fixed to the initial driver version. I had used it to the initial debug so I must rework it (also because debug has to be guarantee w/o errors and w/o ifdef proliferation)
I'll prepare a patch asap.
Peppe
Quoted 8 lines
We have a dynamic, run time, way to do stuff like this without peppering up a driver with gross ifdefs.
This driver must be converted over to use "netif_msg_*()" et al. to guard message logging of different types of events.