public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net: use %pF for /proc/net/ptype
@ 2008-11-14 11:10 Alexey Dobriyan
  2008-11-17  3:50 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Alexey Dobriyan @ 2008-11-14 11:10 UTC (permalink / raw)
  To: davem; +Cc: netdev

Technically, patch changes format for modules, but I think nobody cares.

	-86dd          :ipv6:ipv6_rcv+0x0
	+86dd          ipv6_rcv+0x0/0x400 [ipv6]

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---

 net/core/dev.c |   32 ++------------------------------
 1 file changed, 2 insertions(+), 30 deletions(-)

--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -108,7 +108,6 @@
 #include <linux/init.h>
 #include <linux/kmod.h>
 #include <linux/module.h>
-#include <linux/kallsyms.h>
 #include <linux/netpoll.h>
 #include <linux/rcupdate.h>
 #include <linux/delay.h>
@@ -2797,31 +2796,6 @@ static void ptype_seq_stop(struct seq_file *seq, void *v)
 	rcu_read_unlock();
 }
 
-static void ptype_seq_decode(struct seq_file *seq, void *sym)
-{
-#ifdef CONFIG_KALLSYMS
-	unsigned long offset = 0, symsize;
-	const char *symname;
-	char *modname;
-	char namebuf[128];
-
-	symname = kallsyms_lookup((unsigned long)sym, &symsize, &offset,
-				  &modname, namebuf);
-
-	if (symname) {
-		char *delim = ":";
-
-		if (!modname)
-			modname = delim = "";
-		seq_printf(seq, "%s%s%s%s+0x%lx", delim, modname, delim,
-			   symname, offset);
-		return;
-	}
-#endif
-
-	seq_printf(seq, "[%p]", sym);
-}
-
 static int ptype_seq_show(struct seq_file *seq, void *v)
 {
 	struct packet_type *pt = v;
@@ -2834,10 +2808,8 @@ static int ptype_seq_show(struct seq_file *seq, void *v)
 		else
 			seq_printf(seq, "%04x", ntohs(pt->type));
 
-		seq_printf(seq, " %-8s ",
-			   pt->dev ? pt->dev->name : "");
-		ptype_seq_decode(seq,  pt->func);
-		seq_putc(seq, '\n');
+		seq_printf(seq, " %-8s %pF\n",
+			   pt->dev ? pt->dev->name : "", pt->func);
 	}
 
 	return 0;

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

* Re: [PATCH] net: use %pF for /proc/net/ptype
  2008-11-14 11:10 [PATCH] net: use %pF for /proc/net/ptype Alexey Dobriyan
@ 2008-11-17  3:50 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2008-11-17  3:50 UTC (permalink / raw)
  To: adobriyan; +Cc: netdev

From: Alexey Dobriyan <adobriyan@gmail.com>
Date: Fri, 14 Nov 2008 14:10:04 +0300

> Technically, patch changes format for modules, but I think nobody cares.
> 
> 	-86dd          :ipv6:ipv6_rcv+0x0
> 	+86dd          ipv6_rcv+0x0/0x400 [ipv6]
> 
> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>

Indeed, this is a good patch, applied.

Thanks Alexey.

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

end of thread, other threads:[~2008-11-17  3:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-14 11:10 [PATCH] net: use %pF for /proc/net/ptype Alexey Dobriyan
2008-11-17  3:50 ` David Miller

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