Commit 41dead49 authored by Anil S Keshavamurthy's avatar Anil S Keshavamurthy Committed by Linus Torvalds

[PATCH] kprobes: cleanup include/asm/kprobes.h

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: default avatarAnil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 2d14e39d
...@@ -76,14 +76,6 @@ static inline void restore_interrupts(struct pt_regs *regs) ...@@ -76,14 +76,6 @@ static inline void restore_interrupts(struct pt_regs *regs)
local_irq_enable(); local_irq_enable();
} }
#ifdef CONFIG_KPROBES
extern int kprobe_exceptions_notify(struct notifier_block *self, extern int kprobe_exceptions_notify(struct notifier_block *self,
unsigned long val, void *data); 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 */ #endif /* _ASM_KPROBES_H */
...@@ -115,7 +115,6 @@ static inline void arch_copy_kprobe(struct kprobe *p) ...@@ -115,7 +115,6 @@ static inline void arch_copy_kprobe(struct kprobe *p)
{ {
} }
#ifdef CONFIG_KPROBES
extern int kprobe_exceptions_notify(struct notifier_block *self, extern int kprobe_exceptions_notify(struct notifier_block *self,
unsigned long val, void *data); unsigned long val, void *data);
...@@ -124,11 +123,4 @@ static inline void jprobe_return(void) ...@@ -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 */ #endif /* _ASM_KPROBES_H */
...@@ -71,15 +71,7 @@ struct kprobe_ctlblk { ...@@ -71,15 +71,7 @@ struct kprobe_ctlblk {
struct prev_kprobe prev_kprobe; struct prev_kprobe prev_kprobe;
}; };
#ifdef CONFIG_KPROBES
extern int kprobe_exceptions_notify(struct notifier_block *self, extern int kprobe_exceptions_notify(struct notifier_block *self,
unsigned long val, void *data); 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 /* __KERNEL__ */ #endif /* __KERNEL__ */
#endif /* _ASM_POWERPC_KPROBES_H */ #endif /* _ASM_POWERPC_KPROBES_H */
...@@ -38,15 +38,6 @@ struct kprobe_ctlblk { ...@@ -38,15 +38,6 @@ struct kprobe_ctlblk {
struct prev_kprobe prev_kprobe; struct prev_kprobe prev_kprobe;
}; };
#ifdef CONFIG_KPROBES
extern int kprobe_exceptions_notify(struct notifier_block *self, extern int kprobe_exceptions_notify(struct notifier_block *self,
unsigned long val, void *data); 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 */ #endif /* _SPARC64_KPROBES_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment