diff options
| -rw-r--r-- | net/core/dev.c | 32 |
1 files changed, 2 insertions, 30 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index 31568b2068ac..e08c0fcd603b 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
| @@ -108,7 +108,6 @@ | |||
| 108 | #include <linux/init.h> | 108 | #include <linux/init.h> |
| 109 | #include <linux/kmod.h> | 109 | #include <linux/kmod.h> |
| 110 | #include <linux/module.h> | 110 | #include <linux/module.h> |
| 111 | #include <linux/kallsyms.h> | ||
| 112 | #include <linux/netpoll.h> | 111 | #include <linux/netpoll.h> |
| 113 | #include <linux/rcupdate.h> | 112 | #include <linux/rcupdate.h> |
| 114 | #include <linux/delay.h> | 113 | #include <linux/delay.h> |
| @@ -2801,31 +2800,6 @@ static void ptype_seq_stop(struct seq_file *seq, void *v) | |||
| 2801 | rcu_read_unlock(); | 2800 | rcu_read_unlock(); |
| 2802 | } | 2801 | } |
| 2803 | 2802 | ||
| 2804 | static void ptype_seq_decode(struct seq_file *seq, void *sym) | ||
| 2805 | { | ||
| 2806 | #ifdef CONFIG_KALLSYMS | ||
| 2807 | unsigned long offset = 0, symsize; | ||
| 2808 | const char *symname; | ||
| 2809 | char *modname; | ||
| 2810 | char namebuf[128]; | ||
| 2811 | |||
| 2812 | symname = kallsyms_lookup((unsigned long)sym, &symsize, &offset, | ||
| 2813 | &modname, namebuf); | ||
| 2814 | |||
| 2815 | if (symname) { | ||
| 2816 | char *delim = ":"; | ||
| 2817 | |||
| 2818 | if (!modname) | ||
| 2819 | modname = delim = ""; | ||
| 2820 | seq_printf(seq, "%s%s%s%s+0x%lx", delim, modname, delim, | ||
| 2821 | symname, offset); | ||
| 2822 | return; | ||
| 2823 | } | ||
| 2824 | #endif | ||
| 2825 | |||
| 2826 | seq_printf(seq, "[%p]", sym); | ||
| 2827 | } | ||
| 2828 | |||
| 2829 | static int ptype_seq_show(struct seq_file *seq, void *v) | 2803 | static int ptype_seq_show(struct seq_file *seq, void *v) |
| 2830 | { | 2804 | { |
| 2831 | struct packet_type *pt = v; | 2805 | struct packet_type *pt = v; |
| @@ -2838,10 +2812,8 @@ static int ptype_seq_show(struct seq_file *seq, void *v) | |||
| 2838 | else | 2812 | else |
| 2839 | seq_printf(seq, "%04x", ntohs(pt->type)); | 2813 | seq_printf(seq, "%04x", ntohs(pt->type)); |
| 2840 | 2814 | ||
| 2841 | seq_printf(seq, " %-8s ", | 2815 | seq_printf(seq, " %-8s %pF\n", |
| 2842 | pt->dev ? pt->dev->name : ""); | 2816 | pt->dev ? pt->dev->name : "", pt->func); |
| 2843 | ptype_seq_decode(seq, pt->func); | ||
| 2844 | seq_putc(seq, '\n'); | ||
| 2845 | } | 2817 | } |
| 2846 | 2818 | ||
| 2847 | return 0; | 2819 | return 0; |
