Skip to content

Commit 335e073

Browse files
author
Jiri Kosina
committed
klp: remove CONFIG_LIVEPATCH dependency from klp headers
There is no need for livepatch.h (generic and arch-specific) to depend on CONFIG_LIVEPATCH. Remove that superfluous dependency. Reported-by: Josh Poimboeuf <jpoimboe@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
1 parent b24b78a commit 335e073

3 files changed

Lines changed: 0 additions & 8 deletions

File tree

‎arch/s390/include/asm/livepatch.h‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919

2020
#include <linux/module.h>
2121

22-
#ifdef CONFIG_LIVEPATCH
2322
static inline int klp_check_compiler_support(void)
2423
{
2524
return 0;
@@ -36,6 +35,5 @@ static inline void klp_arch_set_pc(struct pt_regs *regs, unsigned long ip)
3635
{
3736
regs->psw.addr = ip;
3837
}
39-
#endif
4038

4139
#endif

‎arch/x86/include/asm/livepatch.h‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
#include <linux/module.h>
2626
#include <linux/ftrace.h>
2727

28-
#ifdef CONFIG_LIVEPATCH
2928
static inline int klp_check_compiler_support(void)
3029
{
3130
#ifndef CC_USING_FENTRY
@@ -40,6 +39,5 @@ static inline void klp_arch_set_pc(struct pt_regs *regs, unsigned long ip)
4039
{
4140
regs->ip = ip;
4241
}
43-
#endif
4442

4543
#endif /* _ASM_X86_LIVEPATCH_H */

‎include/linux/livepatch.h‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@
2424
#include <linux/module.h>
2525
#include <linux/ftrace.h>
2626

27-
#if IS_ENABLED(CONFIG_LIVEPATCH)
28-
2927
#include <asm/livepatch.h>
3028

3129
enum klp_state {
@@ -134,6 +132,4 @@ int klp_unregister_patch(struct klp_patch *);
134132
int klp_enable_patch(struct klp_patch *);
135133
int klp_disable_patch(struct klp_patch *);
136134

137-
#endif /* CONFIG_LIVEPATCH */
138-
139135
#endif /* _LINUX_LIVEPATCH_H_ */

0 commit comments

Comments
 (0)