Message ID | 1371053103-13536-1-git-send-email-dinguyen@altera.com |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show |
From: <dinguyen@altera.com> Date: Wed, 12 Jun 2013 11:05:03 -0500 > From: Dinh Nguyen <dinguyen@altera.com> > > 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__ > > Signed-off-by: Dinh Nguyen <dinguyen@altera.com> > Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com> > CC: David S. Miller <davem@davemloft.net> 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. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Hello David On 6/13/2013 10:31 AM, David Miller wrote: > From: <dinguyen@altera.com> > Date: Wed, 12 Jun 2013 11:05:03 -0500 > >> From: Dinh Nguyen <dinguyen@altera.com> >> >> 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__ >> >> Signed-off-by: Dinh Nguyen <dinguyen@altera.com> >> Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com> >> CC: David S. Miller <davem@davemloft.net> > > 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 > > 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. > > -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index 618446a..ee919ca 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -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)