* [PATCH] powerpc/powernv: Squash sparse warnings in opal-call.c
@ 2019-03-14 4:27 Andrew Donnellan
2019-04-21 14:18 ` Michael Ellerman
0 siblings, 1 reply; 2+ messages in thread
From: Andrew Donnellan @ 2019-03-14 4:27 UTC (permalink / raw)
To: linuxppc-dev, npiggin
sparse complains a lot about opal-call.c:
arch/powerpc/platforms/powernv/opal-call.c:128:1: warning: symbol 'opal_invalid_call' was not declared. Should it be static?
arch/powerpc/platforms/powernv/opal-call.c:129:1: warning: symbol 'opal_console_write' was not declared. Should it be static?
arch/powerpc/platforms/powernv/opal-call.c:130:1: warning: symbol 'opal_console_read' was not declared. Should it be static?
Those symbols are forward declared in opal.h, but we can't include that
because the function signatures in opal.h are different. So instead, just
add an extra forward declaration to the OPAL_CALL macro to shut sparse up.
Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
---
arch/powerpc/platforms/powernv/opal-call.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/powerpc/platforms/powernv/opal-call.c b/arch/powerpc/platforms/powernv/opal-call.c
index 578757d403ab..9d8e43b2ebfd 100644
--- a/arch/powerpc/platforms/powernv/opal-call.c
+++ b/arch/powerpc/platforms/powernv/opal-call.c
@@ -120,6 +120,8 @@ static int64_t opal_call(int64_t a0, int64_t a1, int64_t a2, int64_t a3,
#define OPAL_CALL(name, opcode) \
int64_t name(int64_t a0, int64_t a1, int64_t a2, int64_t a3, \
+ int64_t a4, int64_t a5, int64_t a6, int64_t a7); \
+int64_t name(int64_t a0, int64_t a1, int64_t a2, int64_t a3, \
int64_t a4, int64_t a5, int64_t a6, int64_t a7) \
{ \
return opal_call(a0, a1, a2, a3, a4, a5, a6, a7, opcode); \
--
2.11.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: powerpc/powernv: Squash sparse warnings in opal-call.c
2019-03-14 4:27 [PATCH] powerpc/powernv: Squash sparse warnings in opal-call.c Andrew Donnellan
@ 2019-04-21 14:18 ` Michael Ellerman
0 siblings, 0 replies; 2+ messages in thread
From: Michael Ellerman @ 2019-04-21 14:18 UTC (permalink / raw)
To: Andrew Donnellan, linuxppc-dev, npiggin
On Thu, 2019-03-14 at 04:27:27 UTC, Andrew Donnellan wrote:
> sparse complains a lot about opal-call.c:
>
> arch/powerpc/platforms/powernv/opal-call.c:128:1: warning: symbol 'opal_invalid_call' was not declared. Should it be static?
> arch/powerpc/platforms/powernv/opal-call.c:129:1: warning: symbol 'opal_console_write' was not declared. Should it be static?
> arch/powerpc/platforms/powernv/opal-call.c:130:1: warning: symbol 'opal_console_read' was not declared. Should it be static?
>
> Those symbols are forward declared in opal.h, but we can't include that
> because the function signatures in opal.h are different. So instead, just
> add an extra forward declaration to the OPAL_CALL macro to shut sparse up.
>
> Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/2f9196b67237f1e59f2753b2968f8ad6
cheers
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-04-21 14:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-14 4:27 [PATCH] powerpc/powernv: Squash sparse warnings in opal-call.c Andrew Donnellan
2019-04-21 14:18 ` 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).