projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
654b3fa
)
powerpc/module_64: Convert #ifdef to IS_ENABLED()
author
Naveen N Rao
<naveen@kernel.org>
Wed, 30 Oct 2024 07:08:38 +0000
(12:38 +0530)
committer
Michael Ellerman
<mpe@ellerman.id.au>
Thu, 31 Oct 2024 00:00:53 +0000
(11:00 +1100)
Minor refactor for converting #ifdef to IS_ENABLED().
Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Naveen N Rao <naveen@kernel.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link:
https://patch.msgid.link/20241030070850.1361304-6-hbathini@linux.ibm.com
arch/powerpc/kernel/module_64.c
patch
|
blob
|
blame
|
history
diff --git
a/arch/powerpc/kernel/module_64.c
b/arch/powerpc/kernel/module_64.c
index e9bab599d0c2745e4d2b5cae04f2c56395c24654..1db88409bd955978523418f49524c3559ac3c38e 100644
(file)
--- a/
arch/powerpc/kernel/module_64.c
+++ b/
arch/powerpc/kernel/module_64.c
@@
-241,14
+241,8
@@
static unsigned long get_stubs_size(const Elf64_Ehdr *hdr,
}
}
-#ifdef CONFIG_DYNAMIC_FTRACE
- /* make the trampoline to the ftrace_caller */
- relocs++;
-#ifdef CONFIG_DYNAMIC_FTRACE_WITH_REGS
- /* an additional one for ftrace_regs_caller */
- relocs++;
-#endif
-#endif
+ /* stubs for ftrace_caller and ftrace_regs_caller */
+ relocs += IS_ENABLED(CONFIG_DYNAMIC_FTRACE) + IS_ENABLED(CONFIG_DYNAMIC_FTRACE_WITH_REGS);
pr_debug("Looks like a total of %lu stubs, max\n", relocs);
return relocs * sizeof(struct ppc64_stub_entry);