public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [TRIVIAL PATCH V2] smsc9194: Remove uncompilable #if 0'd use of pr_dbg
@ 2015-08-26 18:49 Joe Perches
  2015-08-27 20:56 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Joe Perches @ 2015-08-26 18:49 UTC (permalink / raw)
  To: netdev; +Cc: LKML

No pr_dbg method exists.

While this code is #if 0'd, it'd be nicer to
use the generic hex_dump, so use it instead.

Signed-off-by: Joe Perches <joe@perches.com>
---

<snorts> no print_hex_dump_dbg method exists either.

V2: Change the uncompilable print_hex_dump_dbg call to
    print_hex_dump_debug that actually could be compiled...

Or maybe just delete the driver altogether.

It'd probably be nice to one day create something
like drivers/net/ethernet/obsolete and eventually
kill off code for the stuff that hasn't been
supported or sold in the last 20 years.

 drivers/net/ethernet/smsc/smc9194.c | 32 ++------------------------------
 1 file changed, 2 insertions(+), 30 deletions(-)

diff --git a/drivers/net/ethernet/smsc/smc9194.c b/drivers/net/ethernet/smsc/smc9194.c
index 67d9fde..94857c1 100644
--- a/drivers/net/ethernet/smsc/smc9194.c
+++ b/drivers/net/ethernet/smsc/smc9194.c
@@ -1031,36 +1031,8 @@ err_out:
 static void print_packet( byte * buf, int length )
 {
 #if 0
-	int i;
-	int remainder;
-	int lines;
-
-	pr_dbg("Packet of length %d\n", length);
-	lines = length / 16;
-	remainder = length % 16;
-
-	for ( i = 0; i < lines ; i ++ ) {
-		int cur;
-
-		printk(KERN_DEBUG);
-		for ( cur = 0; cur < 8; cur ++ ) {
-			byte a, b;
-
-			a = *(buf ++ );
-			b = *(buf ++ );
-			pr_cont("%02x%02x ", a, b);
-		}
-		pr_cont("\n");
-	}
-	printk(KERN_DEBUG);
-	for ( i = 0; i < remainder/2 ; i++ ) {
-		byte a, b;
-
-		a = *(buf ++ );
-		b = *(buf ++ );
-		pr_cont("%02x%02x ", a, b);
-	}
-	pr_cont("\n");
+	print_hex_dump_debug(DRV_NAME, DUMP_PREFIX_OFFSET, 16, 1,
+			     buf, length, true);
 #endif
 }
 #endif


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [TRIVIAL PATCH V2] smsc9194: Remove uncompilable #if 0'd use of pr_dbg
  2015-08-26 18:49 [TRIVIAL PATCH V2] smsc9194: Remove uncompilable #if 0'd use of pr_dbg Joe Perches
@ 2015-08-27 20:56 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2015-08-27 20:56 UTC (permalink / raw)
  To: joe; +Cc: netdev, linux-kernel

From: Joe Perches <joe@perches.com>
Date: Wed, 26 Aug 2015 11:49:35 -0700

> No pr_dbg method exists.
> 
> While this code is #if 0'd, it'd be nicer to
> use the generic hex_dump, so use it instead.
> 
> Signed-off-by: Joe Perches <joe@perches.com>

Applied to net-next, thanks Joe.

I don't know what to do with "really old" drivers.  People still use
them, some via qemu or whatever.

But yeah this particular case is likely unused by anyone.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-08-27 20:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-26 18:49 [TRIVIAL PATCH V2] smsc9194: Remove uncompilable #if 0'd use of pr_dbg Joe Perches
2015-08-27 20:56 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox