diff mbox series

[net-next,v2,12/13] sunhme: Use vdbg for spam-y prints

Message ID 20220924015339.1816744-13-seanga2@gmail.com (mailing list archive)
State Accepted
Commit 26657c70b91cf859d2205c246b13e51a38a40aa4
Delegated to: Netdev Maintainers
Headers show
Series net: sunhme: Cleanups and logging improvements | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix success Link
netdev/cover_letter success Series has a cover letter
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers success CCed 6 of 6 maintainers
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 59 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Sean Anderson Sept. 24, 2022, 1:53 a.m. UTC
The SXD, TXD, and RXD macros are used only once (or twice). Just use the
vdbg print, which seems to have been devised for these sorts of very
verbose messages.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
---

(no changes since v1)

 drivers/net/ethernet/sun/sunhme.c | 29 ++++-------------------------
 1 file changed, 4 insertions(+), 25 deletions(-)
diff mbox series

Patch

diff --git a/drivers/net/ethernet/sun/sunhme.c b/drivers/net/ethernet/sun/sunhme.c
index 51a04353e08e..3afa73db500c 100644
--- a/drivers/net/ethernet/sun/sunhme.c
+++ b/drivers/net/ethernet/sun/sunhme.c
@@ -90,27 +90,6 @@  static struct quattro *qfe_pci_list;
 #define ASD(...)
 #endif
 
-/* Transmit debug */
-#if 1
-#define TXD hme_debug
-#else
-#define TXD(...)
-#endif
-
-/* Skid buffer debug */
-#if 1
-#define SXD hme_debug
-#else
-#define SXD(...)
-#endif
-
-/* Receive debug */
-#if 1
-#define RXD hme_debug
-#else
-#define RXD(...)
-#endif
-
 #if 0
 struct hme_tx_logent {
 	unsigned int tstamp;
@@ -1832,7 +1811,7 @@  static void happy_meal_tx(struct happy_meal *hp)
 		u32 flags, dma_addr, dma_len;
 		int frag;
 
-		TXD("TX[%d]\n", elem);
+		netdev_vdbg(hp->dev, "TX[%d]\n", elem);
 		this = &txbase[elem];
 		flags = hme_read_desc32(hp, &this->tx_flags);
 		if (flags & TXFLAG_OWN)
@@ -1899,7 +1878,7 @@  static void happy_meal_rx(struct happy_meal *hp, struct net_device *dev)
 
 		/* Check for errors. */
 		if ((len < ETH_ZLEN) || (flags & RXFLAG_OVERFLOW)) {
-			RXD("RX[%d ERR(%08x)]", elem, flags);
+			netdev_vdbg(dev, "RX[%d ERR(%08x)]", elem, flags);
 			dev->stats.rx_errors++;
 			if (len < ETH_ZLEN)
 				dev->stats.rx_length_errors++;
@@ -1971,7 +1950,7 @@  static void happy_meal_rx(struct happy_meal *hp, struct net_device *dev)
 		skb->csum = csum_unfold(~(__force __sum16)htons(csum));
 		skb->ip_summed = CHECKSUM_COMPLETE;
 
-		RXD("RX[%d len=%d csum=%4x]", elem, len, csum);
+		netdev_vdbg(dev, "RX[%d len=%d csum=%4x]", elem, len, csum);
 		skb->protocol = eth_type_trans(skb, dev);
 		netif_rx(skb);
 
@@ -2177,7 +2156,7 @@  static netdev_tx_t happy_meal_start_xmit(struct sk_buff *skb,
 	}
 
 	entry = hp->tx_new;
-	SXD("SX<l[%d]e[%d]>\n", skb->len, entry);
+	netdev_vdbg(dev, "SX<l[%d]e[%d]>\n", skb->len, entry);
 	hp->tx_skbs[entry] = skb;
 
 	if (skb_shinfo(skb)->nr_frags == 0) {