]> err.no Git - linux-2.6/blobdiff - kernel/kprobes.c
Simplify kallsyms_lookup()
[linux-2.6] / kernel / kprobes.c
index d25a9ada3f8eb57c8b6ab2ac43e7123fb49ffa9f..bee29bde6adf805033b795d6a57bc6212608c216 100644 (file)
 #include <linux/hash.h>
 #include <linux/init.h>
 #include <linux/slab.h>
+#include <linux/stddef.h>
 #include <linux/module.h>
 #include <linux/moduleloader.h>
 #include <linux/kallsyms.h>
 #include <linux/freezer.h>
 #include <linux/seq_file.h>
 #include <linux/debugfs.h>
+#include <linux/kdebug.h>
 #include <asm-generic/sections.h>
 #include <asm/cacheflush.h>
 #include <asm/errno.h>
-#include <asm/kdebug.h>
 
 #define KPROBE_HASH_BITS 6
 #define KPROBE_TABLE_SIZE (1 << KPROBE_HASH_BITS)
@@ -867,13 +868,13 @@ static int __kprobes show_kprobe_addr(struct seq_file *pi, void *v)
        struct kprobe *p, *kp;
        const char *sym = NULL;
        unsigned int i = *(loff_t *) v;
-       unsigned long size, offset = 0;
+       unsigned long offset = 0;
        char *modname, namebuf[128];
 
        head = &kprobe_table[i];
        preempt_disable();
        hlist_for_each_entry_rcu(p, node, head, hlist) {
-               sym = kallsyms_lookup((unsigned long)p->addr, &size,
+               sym = kallsyms_lookup((unsigned long)p->addr, NULL,
                                        &offset, &modname, namebuf);
                if (p->pre_handler == aggr_pre_handler) {
                        list_for_each_entry_rcu(kp, &p->list, list)
@@ -912,7 +913,7 @@ static int __kprobes debugfs_kprobe_init(void)
        if (!dir)
                return -ENOMEM;
 
-       file = debugfs_create_file("list", 0444, dir , 0 ,
+       file = debugfs_create_file("list", 0444, dir, NULL,
                                &debugfs_kprobes_operations);
        if (!file) {
                debugfs_remove(dir);