]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
powerpc/powernv: Mark function as __noreturn
authorBreno Leitao <leitao@debian.org>
Tue, 25 Sep 2018 14:29:33 +0000 (11:29 -0300)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 3 Oct 2018 05:40:05 +0000 (15:40 +1000)
There is a mismatch between function pnv_platform_error_reboot() definition
and declaration regarding function modifiers. In the declaration part, it
contains the function attribute __noreturn, while function definition
itself lacks it.

This was reported by sparse tool as an error:

  arch/powerpc/platforms/powernv/opal.c:538:6: error: symbol 'pnv_platform_error_reboot' redeclared with different type (originally declared at arch/powerpc/platforms/powernv/powernv.h:11) - different modifiers

I checked and the function is already being considered as being 'noreturn'
by the compiler, thus, I understand this patch does not change any code
being generated.

Signed-off-by: Breno Leitao <leitao@debian.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/platforms/powernv/opal.c

index 62c291e23dbe2118fea6ffa4729ff70f58dec8a4..06bf532fa00023d5cf02e5d09196e06112ef1a3f 100644 (file)
@@ -535,7 +535,7 @@ static int opal_recover_mce(struct pt_regs *regs,
        return recovered;
 }
 
-void pnv_platform_error_reboot(struct pt_regs *regs, const char *msg)
+void __noreturn pnv_platform_error_reboot(struct pt_regs *regs, const char *msg)
 {
        panic_flush_kmsg_start();