Skip to contentSkip to conversation

net: ethernet: stmicro: stmmac: Fix compile error when STMMAC_XMIT_DEBUG used

PATCH Applied [email protected] 3 participants 3 messages Jun 12, 2013 – Jun 13, 2013

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

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__

Cc Giuseppe Cavallaro <[email protected]>
CC David S. Miller <[email protected]>
---
 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
index 618446a..ee919ca 100644
@@ -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
maintainer Applied
#1 lore raw

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_xmit drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:1902:74:
error: expected ) before __func__

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.

#2 lore raw

Hello David

Quoted 9 lines · David Miller

From: <[email protected]>
Date: Wed, 12 Jun 2013 11:05:03 -0500

Quoted 6 lines

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__

Quoted 5 lines
Quoted 3 lines
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.