From: Anil S Keshavamurthy The arch specific kprobes.h files never gets included when CONFIG_KPROBES is turned off. Hence check for CONFIG_KPROBES is not appropriate here in this arch specific kprobes.h files. Also the below defined function kprobes_exception_notify() is not needed when CONFIG_KPROBES is off. Compile tested for both CONFIG_KPROBES=y and N. Signed-off-by: Anil S Keshavamurthy Signed-off-by: Andrew Morton --- include/asm-i386/kprobes.h | 8 -------- include/asm-ia64/kprobes.h | 8 -------- include/asm-powerpc/kprobes.h | 10 +--------- include/asm-sparc64/kprobes.h | 9 --------- 4 files changed, 1 insertion(+), 34 deletions(-) diff -puN include/asm-i386/kprobes.h~kprobes-cleanup-include_asm_kprobes_h include/asm-i386/kprobes.h --- devel/include/asm-i386/kprobes.h~kprobes-cleanup-include_asm_kprobes_h 2005-12-22 04:47:50.000000000 -0800 +++ devel-akpm/include/asm-i386/kprobes.h 2005-12-22 04:47:50.000000000 -0800 @@ -76,14 +76,6 @@ static inline void restore_interrupts(st local_irq_enable(); } -#ifdef CONFIG_KPROBES extern int kprobe_exceptions_notify(struct notifier_block *self, unsigned long val, void *data); -#else /* !CONFIG_KPROBES */ -static inline int kprobe_exceptions_notify(struct notifier_block *self, - unsigned long val, void *data) -{ - return 0; -} -#endif #endif /* _ASM_KPROBES_H */ diff -puN include/asm-ia64/kprobes.h~kprobes-cleanup-include_asm_kprobes_h include/asm-ia64/kprobes.h --- devel/include/asm-ia64/kprobes.h~kprobes-cleanup-include_asm_kprobes_h 2005-12-22 04:47:50.000000000 -0800 +++ devel-akpm/include/asm-ia64/kprobes.h 2005-12-22 04:47:50.000000000 -0800 @@ -115,7 +115,6 @@ static inline void arch_copy_kprobe(stru { } -#ifdef CONFIG_KPROBES extern int kprobe_exceptions_notify(struct notifier_block *self, unsigned long val, void *data); @@ -124,11 +123,4 @@ static inline void jprobe_return(void) { } -#else /* !CONFIG_KPROBES */ -static inline int kprobe_exceptions_notify(struct notifier_block *self, - unsigned long val, void *data) -{ - return 0; -} -#endif #endif /* _ASM_KPROBES_H */ diff -puN include/asm-powerpc/kprobes.h~kprobes-cleanup-include_asm_kprobes_h include/asm-powerpc/kprobes.h --- devel/include/asm-powerpc/kprobes.h~kprobes-cleanup-include_asm_kprobes_h 2005-12-22 04:47:50.000000000 -0800 +++ devel-akpm/include/asm-powerpc/kprobes.h 2005-12-22 04:48:35.000000000 -0800 @@ -71,15 +71,7 @@ struct kprobe_ctlblk { struct prev_kprobe prev_kprobe; }; -#ifdef CONFIG_KPROBES extern int kprobe_exceptions_notify(struct notifier_block *self, - unsigned long val, void *data); -#else /* !CONFIG_KPROBES */ -static inline int kprobe_exceptions_notify(struct notifier_block *self, - unsigned long val, void *data) -{ - return 0; -} -#endif + unsigned long val, void *data); #endif /* __KERNEL__ */ #endif /* _ASM_POWERPC_KPROBES_H */ diff -puN include/asm-sparc64/kprobes.h~kprobes-cleanup-include_asm_kprobes_h include/asm-sparc64/kprobes.h --- devel/include/asm-sparc64/kprobes.h~kprobes-cleanup-include_asm_kprobes_h 2005-12-22 04:47:50.000000000 -0800 +++ devel-akpm/include/asm-sparc64/kprobes.h 2005-12-22 04:47:50.000000000 -0800 @@ -38,15 +38,6 @@ struct kprobe_ctlblk { struct prev_kprobe prev_kprobe; }; -#ifdef CONFIG_KPROBES extern int kprobe_exceptions_notify(struct notifier_block *self, unsigned long val, void *data); -#else /* !CONFIG_KPROBES */ -static inline int kprobe_exceptions_notify(struct notifier_block *self, - unsigned long val, void *data) -{ - return 0; -} -#endif - #endif /* _SPARC64_KPROBES_H */ _