Minor refactor for converting #ifdef to IS_ENABLED().

Signed-off-by: Naveen N Rao <nav...@kernel.org>
---
 arch/powerpc/kernel/module_64.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/arch/powerpc/kernel/module_64.c b/arch/powerpc/kernel/module_64.c
index e9bab599d0c2..c202be11683b 100644
--- a/arch/powerpc/kernel/module_64.c
+++ b/arch/powerpc/kernel/module_64.c
@@ -241,14 +241,13 @@ 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
+       if (IS_ENABLED(CONFIG_DYNAMIC_FTRACE))
+               relocs++;
+
        /* an additional one for ftrace_regs_caller */
-       relocs++;
-#endif
-#endif
+       if (IS_ENABLED(CONFIG_DYNAMIC_FTRACE_WITH_REGS))
+               relocs++;
 
        pr_debug("Looks like a total of %lu stubs, max\n", relocs);
        return relocs * sizeof(struct ppc64_stub_entry);
-- 
2.45.2


Reply via email to