diff options
author | Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com> | 2006-01-09 23:52:42 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-10 11:01:40 -0500 |
commit | 41dead49ccb4d7f0a34d56478f487342a3c3ab2b (patch) | |
tree | 6782eeedac60688b328394971066dad1b6bfa302 | |
parent | 2d14e39da8712cff8a92298f464a25afb4283ccf (diff) |
[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: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | include/asm-i386/kprobes.h | 8 | ||||
-rw-r--r-- | include/asm-ia64/kprobes.h | 8 | ||||
-rw-r--r-- | include/asm-powerpc/kprobes.h | 10 | ||||
-rw-r--r-- | include/asm-sparc64/kprobes.h | 9 |
4 files changed, 1 insertions, 34 deletions
diff --git a/include/asm-i386/kprobes.h b/include/asm-i386/kprobes.h index ca916a892877..f9e150fa1d44 100644 --- a/include/asm-i386/kprobes.h +++ b/include/asm-i386/kprobes.h | |||
@@ -76,14 +76,6 @@ static inline void restore_interrupts(struct pt_regs *regs) | |||
76 | local_irq_enable(); | 76 | local_irq_enable(); |
77 | } | 77 | } |
78 | 78 | ||
79 | #ifdef CONFIG_KPROBES | ||
80 | extern int kprobe_exceptions_notify(struct notifier_block *self, | 79 | extern int kprobe_exceptions_notify(struct notifier_block *self, |
81 | unsigned long val, void *data); | 80 | unsigned long val, void *data); |
82 | #else /* !CONFIG_KPROBES */ | ||
83 | static inline int kprobe_exceptions_notify(struct notifier_block *self, | ||
84 | unsigned long val, void *data) | ||
85 | { | ||
86 | return 0; | ||
87 | } | ||
88 | #endif | ||
89 | #endif /* _ASM_KPROBES_H */ | 81 | #endif /* _ASM_KPROBES_H */ |
diff --git a/include/asm-ia64/kprobes.h b/include/asm-ia64/kprobes.h index 592abb000e29..5b26462674a7 100644 --- a/include/asm-ia64/kprobes.h +++ b/include/asm-ia64/kprobes.h | |||
@@ -115,7 +115,6 @@ static inline void arch_copy_kprobe(struct kprobe *p) | |||
115 | { | 115 | { |
116 | } | 116 | } |
117 | 117 | ||
118 | #ifdef CONFIG_KPROBES | ||
119 | extern int kprobe_exceptions_notify(struct notifier_block *self, | 118 | extern int kprobe_exceptions_notify(struct notifier_block *self, |
120 | unsigned long val, void *data); | 119 | unsigned long val, void *data); |
121 | 120 | ||
@@ -124,11 +123,4 @@ static inline void jprobe_return(void) | |||
124 | { | 123 | { |
125 | } | 124 | } |
126 | 125 | ||
127 | #else /* !CONFIG_KPROBES */ | ||
128 | static inline int kprobe_exceptions_notify(struct notifier_block *self, | ||
129 | unsigned long val, void *data) | ||
130 | { | ||
131 | return 0; | ||
132 | } | ||
133 | #endif | ||
134 | #endif /* _ASM_KPROBES_H */ | 126 | #endif /* _ASM_KPROBES_H */ |
diff --git a/include/asm-powerpc/kprobes.h b/include/asm-powerpc/kprobes.h index 7c98e547c6d8..42ece411435a 100644 --- a/include/asm-powerpc/kprobes.h +++ b/include/asm-powerpc/kprobes.h | |||
@@ -71,15 +71,7 @@ struct kprobe_ctlblk { | |||
71 | struct prev_kprobe prev_kprobe; | 71 | struct prev_kprobe prev_kprobe; |
72 | }; | 72 | }; |
73 | 73 | ||
74 | #ifdef CONFIG_KPROBES | ||
75 | extern int kprobe_exceptions_notify(struct notifier_block *self, | 74 | extern int kprobe_exceptions_notify(struct notifier_block *self, |
76 | unsigned long val, void *data); | 75 | unsigned long val, void *data); |
77 | #else /* !CONFIG_KPROBES */ | ||
78 | static inline int kprobe_exceptions_notify(struct notifier_block *self, | ||
79 | unsigned long val, void *data) | ||
80 | { | ||
81 | return 0; | ||
82 | } | ||
83 | #endif | ||
84 | #endif /* __KERNEL__ */ | 76 | #endif /* __KERNEL__ */ |
85 | #endif /* _ASM_POWERPC_KPROBES_H */ | 77 | #endif /* _ASM_POWERPC_KPROBES_H */ |
diff --git a/include/asm-sparc64/kprobes.h b/include/asm-sparc64/kprobes.h index 7ba845320f5c..1b47e0d2ee93 100644 --- a/include/asm-sparc64/kprobes.h +++ b/include/asm-sparc64/kprobes.h | |||
@@ -38,15 +38,6 @@ struct kprobe_ctlblk { | |||
38 | struct prev_kprobe prev_kprobe; | 38 | struct prev_kprobe prev_kprobe; |
39 | }; | 39 | }; |
40 | 40 | ||
41 | #ifdef CONFIG_KPROBES | ||
42 | extern int kprobe_exceptions_notify(struct notifier_block *self, | 41 | extern int kprobe_exceptions_notify(struct notifier_block *self, |
43 | unsigned long val, void *data); | 42 | unsigned long val, void *data); |
44 | #else /* !CONFIG_KPROBES */ | ||
45 | static inline int kprobe_exceptions_notify(struct notifier_block *self, | ||
46 | unsigned long val, void *data) | ||
47 | { | ||
48 | return 0; | ||
49 | } | ||
50 | #endif | ||
51 | |||
52 | #endif /* _SPARC64_KPROBES_H */ | 43 | #endif /* _SPARC64_KPROBES_H */ |