* [PATCH] powerpc/powernv: Mark function as __noreturn
@ 2018-09-25 14:29 Breno Leitao
2018-10-04 6:14 ` Michael Ellerman
0 siblings, 1 reply; 2+ messages in thread
From: Breno Leitao @ 2018-09-25 14:29 UTC (permalink / raw)
To: linuxppc-dev; +Cc: npiggin, Breno Leitao
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>
---
arch/powerpc/platforms/powernv/opal.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/platforms/powernv/opal.c b/arch/powerpc/platforms/powernv/opal.c
index 38fe4087484a..a4641515956f 100644
--- a/arch/powerpc/platforms/powernv/opal.c
+++ b/arch/powerpc/platforms/powernv/opal.c
@@ -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();
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: powerpc/powernv: Mark function as __noreturn
2018-09-25 14:29 [PATCH] powerpc/powernv: Mark function as __noreturn Breno Leitao
@ 2018-10-04 6:14 ` Michael Ellerman
0 siblings, 0 replies; 2+ messages in thread
From: Michael Ellerman @ 2018-10-04 6:14 UTC (permalink / raw)
To: Breno Leitao, linuxppc-dev; +Cc: Breno Leitao, npiggin
On Tue, 2018-09-25 at 14:29:33 UTC, Breno Leitao wrote:
> 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>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/62dea077f56728979e40a741c8a094
cheers
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-10-04 6:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-25 14:29 [PATCH] powerpc/powernv: Mark function as __noreturn Breno Leitao
2018-10-04 6:14 ` Michael Ellerman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).