2020-06-01 03:57:55

by Zong Li

[permalink] [raw]
Subject: [PATCH] riscv: fix build warning of missing prototypes

Add the missing header in file, it was losed in original implementation.

The warning message as follows:
- no previous prototype for 'patch_text_nosync' [-Wmissing-prototypes]
- no previous prototype for 'patch_text' [-Wmissing-prototypes]

Signed-off-by: Zong Li <[email protected]>
Reported-by: kbuild test robot <[email protected]>
---
arch/riscv/kernel/patch.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/arch/riscv/kernel/patch.c b/arch/riscv/kernel/patch.c
index 5805791cd5b5..d4a64dfed342 100644
--- a/arch/riscv/kernel/patch.c
+++ b/arch/riscv/kernel/patch.c
@@ -11,6 +11,7 @@
#include <asm/kprobes.h>
#include <asm/cacheflush.h>
#include <asm/fixmap.h>
+#include <asm/patch.h>

struct patch_insn {
void *addr;
--
2.26.2


2020-06-01 06:50:13

by Andreas Schwab

[permalink] [raw]
Subject: Re: [PATCH] riscv: fix build warning of missing prototypes

On Jun 01 2020, Zong Li wrote:

> Add the missing header in file, it was losed in original implementation.

s/losed/lost/

Andreas.

--
Andreas Schwab, [email protected]
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."

2020-06-01 06:58:26

by Zong Li

[permalink] [raw]
Subject: Re: [PATCH] riscv: fix build warning of missing prototypes

On Mon, Jun 1, 2020 at 2:48 PM Andreas Schwab <[email protected]> wrote:
>
> On Jun 01 2020, Zong Li wrote:
>
> > Add the missing header in file, it was losed in original implementation.
>
> s/losed/lost/
>
> Andreas.

Thanks for correcting, let me modify it in the next version.

> --
> Andreas Schwab, [email protected]
> GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
> "And now for something completely different."

2020-06-05 00:04:57

by Palmer Dabbelt

[permalink] [raw]
Subject: Re: [PATCH] riscv: fix build warning of missing prototypes

On Sun, 31 May 2020 20:55:32 PDT (-0700), [email protected] wrote:
> Add the missing header in file, it was losed in original implementation.
>
> The warning message as follows:
> - no previous prototype for 'patch_text_nosync' [-Wmissing-prototypes]
> - no previous prototype for 'patch_text' [-Wmissing-prototypes]
>
> Signed-off-by: Zong Li <[email protected]>
> Reported-by: kbuild test robot <[email protected]>
> ---
> arch/riscv/kernel/patch.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/riscv/kernel/patch.c b/arch/riscv/kernel/patch.c
> index 5805791cd5b5..d4a64dfed342 100644
> --- a/arch/riscv/kernel/patch.c
> +++ b/arch/riscv/kernel/patch.c
> @@ -11,6 +11,7 @@
> #include <asm/kprobes.h>
> #include <asm/cacheflush.h>
> #include <asm/fixmap.h>
> +#include <asm/patch.h>
>
> struct patch_insn {
> void *addr;

Thanks, this one is queued up -- for-next is in flux right now, but with any
luck it'll get sorted out soon.