All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arm64: syscall: include prototype for EL0 SVC functions
@ 2021-01-14 12:48 Mark Rutland
  2021-01-14 17:49 ` Catalin Marinas
  2021-01-15 13:11 ` Mark Rutland
  0 siblings, 2 replies; 3+ messages in thread
From: Mark Rutland @ 2021-01-14 12:48 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: Mark Rutland, Catalin Marinas, Will Deacon

The kbuild test robot reports that when building with W=1, GCC will warn
for a couple of missing prototypes in syscall.c:

|  arch/arm64/kernel/syscall.c:157:6: warning: no previous prototype for 'do_el0_svc' [-Wmissing-prototypes]
|    157 | void do_el0_svc(struct pt_regs *regs)
|        |      ^~~~~~~~~~
|  arch/arm64/kernel/syscall.c:164:6: warning: no previous prototype for 'do_el0_svc_compat' [-Wmissing-prototypes]
|    164 | void do_el0_svc_compat(struct pt_regs *regs)
|        |      ^~~~~~~~~~~~~~~~~

While this isn't a functional problem, as a general policy we should
include the prototype for functions wherever possible to catch any
accidental divergence between the prototype and implementation. Here we
can easily include <asm/exception.h>, so let's do so.

While there are a number of warnings elsewhere and some warnings enabled
under W=1 are of questionable benefit, this change helps to make the
code more robust as it evolved and reduces the noise somewhat, so it
seems worthwhile.

Reported-by: kernel test robot <lkp@intel.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/202101141046.n8iPO3mw-lkp@intel.com
---
 arch/arm64/kernel/syscall.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm64/kernel/syscall.c b/arch/arm64/kernel/syscall.c
index f61e9d8cc55a..5991e72d4b8f 100644
--- a/arch/arm64/kernel/syscall.c
+++ b/arch/arm64/kernel/syscall.c
@@ -9,6 +9,7 @@
 
 #include <asm/daifflags.h>
 #include <asm/debug-monitors.h>
+#include <asm/exception.h>
 #include <asm/fpsimd.h>
 #include <asm/syscall.h>
 #include <asm/thread_info.h>
-- 
2.11.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] arm64: syscall: include prototype for EL0 SVC functions
  2021-01-14 12:48 [PATCH] arm64: syscall: include prototype for EL0 SVC functions Mark Rutland
@ 2021-01-14 17:49 ` Catalin Marinas
  2021-01-15 13:11 ` Mark Rutland
  1 sibling, 0 replies; 3+ messages in thread
From: Catalin Marinas @ 2021-01-14 17:49 UTC (permalink / raw)
  To: Mark Rutland, linux-arm-kernel; +Cc: Will Deacon

On Thu, 14 Jan 2021 12:48:12 +0000, Mark Rutland wrote:
> The kbuild test robot reports that when building with W=1, GCC will warn
> for a couple of missing prototypes in syscall.c:
> 
> |  arch/arm64/kernel/syscall.c:157:6: warning: no previous prototype for 'do_el0_svc' [-Wmissing-prototypes]
> |    157 | void do_el0_svc(struct pt_regs *regs)
> |        |      ^~~~~~~~~~
> |  arch/arm64/kernel/syscall.c:164:6: warning: no previous prototype for 'do_el0_svc_compat' [-Wmissing-prototypes]
> |    164 | void do_el0_svc_compat(struct pt_regs *regs)
> |        |      ^~~~~~~~~~~~~~~~~
> 
> [...]

Applied to arm64 (for-next/fixes), thanks!

[1/1] arm64: syscall: include prototype for EL0 SVC functions
      https://git.kernel.org/arm64/c/b5639879902a

-- 
Catalin


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] arm64: syscall: include prototype for EL0 SVC functions
  2021-01-14 12:48 [PATCH] arm64: syscall: include prototype for EL0 SVC functions Mark Rutland
  2021-01-14 17:49 ` Catalin Marinas
@ 2021-01-15 13:11 ` Mark Rutland
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Rutland @ 2021-01-15 13:11 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: Catalin Marinas, Will Deacon

On Thu, Jan 14, 2021 at 12:48:12PM +0000, Mark Rutland wrote:
> The kbuild test robot reports that when building with W=1, GCC will warn
> for a couple of missing prototypes in syscall.c:
> 
> |  arch/arm64/kernel/syscall.c:157:6: warning: no previous prototype for 'do_el0_svc' [-Wmissing-prototypes]
> |    157 | void do_el0_svc(struct pt_regs *regs)
> |        |      ^~~~~~~~~~
> |  arch/arm64/kernel/syscall.c:164:6: warning: no previous prototype for 'do_el0_svc_compat' [-Wmissing-prototypes]
> |    164 | void do_el0_svc_compat(struct pt_regs *regs)
> |        |      ^~~~~~~~~~~~~~~~~
> 
> While this isn't a functional problem, as a general policy we should
> include the prototype for functions wherever possible to catch any
> accidental divergence between the prototype and implementation. Here we
> can easily include <asm/exception.h>, so let's do so.
> 
> While there are a number of warnings elsewhere and some warnings enabled
> under W=1 are of questionable benefit, this change helps to make the
> code more robust as it evolved and reduces the noise somewhat, so it
> seems worthwhile.
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Will Deacon <will@kernel.org>
> Link: https://lore.kernel.org/r/202101141046.n8iPO3mw-lkp@intel.com

Whoops; I messed up the tags here.

For the record, the tags should have started with:

Signed-off-by: Mark Rutland <mark.rutland@arm.com>

... and please feel free to fold that in!

Mark.

> ---
>  arch/arm64/kernel/syscall.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/arm64/kernel/syscall.c b/arch/arm64/kernel/syscall.c
> index f61e9d8cc55a..5991e72d4b8f 100644
> --- a/arch/arm64/kernel/syscall.c
> +++ b/arch/arm64/kernel/syscall.c
> @@ -9,6 +9,7 @@
>  
>  #include <asm/daifflags.h>
>  #include <asm/debug-monitors.h>
> +#include <asm/exception.h>
>  #include <asm/fpsimd.h>
>  #include <asm/syscall.h>
>  #include <asm/thread_info.h>
> -- 
> 2.11.0
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-01-15 13:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-14 12:48 [PATCH] arm64: syscall: include prototype for EL0 SVC functions Mark Rutland
2021-01-14 17:49 ` Catalin Marinas
2021-01-15 13:11 ` Mark Rutland

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.