powerpc/fadump: define an empty fadump_cleanup()
authorChristophe Leroy <christophe.leroy@c-s.fr>
Fri, 22 Mar 2019 08:08:39 +0000 (08:08 +0000)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 2 May 2019 15:58:10 +0000 (01:58 +1000)
To avoid #ifdefs, define an static inline fadump_cleanup() function
when CONFIG_FADUMP is not selected

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/fadump.h
arch/powerpc/kernel/setup-common.c

index 188776befaf9b834031f1f04a90ef9ed5b58f1d5..e2099c0a15c3a2d26e5fd8ab1567cf18710a4ae5 100644 (file)
@@ -219,5 +219,6 @@ extern void fadump_cleanup(void);
 static inline int is_fadump_active(void) { return 0; }
 static inline int should_fadump_crash(void) { return 0; }
 static inline void crash_fadump(struct pt_regs *regs, const char *str) { }
+static inline void fadump_cleanup(void) { }
 #endif
 #endif
index 3f8805d3c0c997025cf0b812b2775274091e60e0..13054980e11a20068085bc34bfb825ef885e33f5 100644 (file)
@@ -134,13 +134,11 @@ int crashing_cpu = -1;
 /* also used by kexec */
 void machine_shutdown(void)
 {
-#ifdef CONFIG_FA_DUMP
        /*
         * if fadump is active, cleanup the fadump registration before we
         * shutdown.
         */
        fadump_cleanup();
-#endif
 
        if (ppc_md.machine_shutdown)
                ppc_md.machine_shutdown();