From: Vyacheslav Cherkashin Date: Mon, 8 Sep 2014 12:35:17 +0000 (+0400) Subject: [REFACTOR] remove unused code X-Git-Tag: Tizen_SDK_2.3~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=66b1325405ffddc21e692acfc9f07583d34017ec;p=kernel%2Fswap-modules.git [REFACTOR] remove unused code Change-Id: Id2d90fdb25cb2ad5cb17ea5ec4695032360bb2b1 Signed-off-by: Vyacheslav Cherkashin --- diff --git a/kprobe/arch/asm-arm/swap_kprobes.c b/kprobe/arch/asm-arm/swap_kprobes.c index 6f5b90e..df1bfe4 100644 --- a/kprobe/arch/asm-arm/swap_kprobes.c +++ b/kprobe/arch/asm-arm/swap_kprobes.c @@ -57,8 +57,6 @@ #define sign_extend(x, signbit) ((x) | (0 - ((x) & (1 << (signbit))))) #define branch_displacement(insn) sign_extend(((insn) & 0xffffff) << 2, 25) -extern struct kprobe * per_cpu__current_kprobe; -extern struct hlist_head kprobe_table[KPROBE_TABLE_SIZE]; static void (*__swap_register_undef_hook)(struct undef_hook *hook); static void (*__swap_unregister_undef_hook)(struct undef_hook *hook); diff --git a/kprobe/arch/asm-x86/swap_kprobes.c b/kprobe/arch/asm-x86/swap_kprobes.c index f9cf8f6..0e671f9 100644 --- a/kprobe/arch/asm-x86/swap_kprobes.c +++ b/kprobe/arch/asm-x86/swap_kprobes.c @@ -41,10 +41,6 @@ #include #define SUPRESS_BUG_MESSAGES /**< Debug-off definition. */ -extern struct kprobe * per_cpu__current_kprobe; -extern struct kprobe * per_cpu__current_kprobe; -extern struct kprobe *swap_current_kprobe; - static int (*swap_fixup_exception)(struct pt_regs * regs); static void *(*swap_text_poke)(void *addr, const void *opcode, size_t len); diff --git a/kprobe/swap_kprobes.h b/kprobe/swap_kprobes.h index 592b5eb..944bb44 100644 --- a/kprobe/swap_kprobes.h +++ b/kprobe/swap_kprobes.h @@ -299,8 +299,6 @@ int trampoline_probe_handler (struct kprobe *p, struct pt_regs *regs); DECLARE_PER_CPU(struct kprobe *, swap_current_kprobe); -extern struct hlist_head kprobe_table[KPROBE_TABLE_SIZE]; -//extern struct hlist_head kretprobe_inst_table[KPROBE_TABLE_SIZE]; extern atomic_t kprobe_count; extern unsigned long sched_addr; diff --git a/uprobe/swap_uprobes.c b/uprobe/swap_uprobes.c index aba404b..aa6904c 100644 --- a/uprobe/swap_uprobes.c +++ b/uprobe/swap_uprobes.c @@ -56,40 +56,6 @@ static struct hlist_head uretprobe_inst_table[UPROBE_TABLE_SIZE]; #define DEBUG_PRINT_HASH_TABLE 0 #if DEBUG_PRINT_HASH_TABLE -void print_kprobe_hash_table(void) -{ - int i; - struct hlist_head *head; - struct kprobe *p; - DECLARE_NODE_PTR_FOR_HLIST(node); - - // print uprobe table - for (i = 0; i < KPROBE_TABLE_SIZE; ++i) { - head = &kprobe_table[i]; - swap_hlist_for_each_entry_rcu(p, node, head, is_hlist_arm) { - printk("####### find K tgid=%u, addr=%x\n", - p->tgid, p->addr); - } - } -} - -void print_kretprobe_hash_table(void) -{ - int i; - struct hlist_head *head; - struct kprobe *p; - DECLARE_NODE_PTR_FOR_HLIST(node); - - // print uprobe table - for (i = 0; i < KPROBE_TABLE_SIZE; ++i) { - head = &kretprobe_inst_table[i]; - swap_hlist_for_each_entry_rcu(p, node, head, is_hlist_arm) { - printk("####### find KR tgid=%u, addr=%x\n", - p->tgid, p->addr); - } - } -} - void print_uprobe_hash_table(void) { int i;