linux-riscv.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] Fix some build warnings when W=1
@ 2020-07-16  6:15 Zong Li
  2020-07-16  6:15 ` [PATCH 1/2] riscv: Fix build warning for mm/init Zong Li
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Zong Li @ 2020-07-16  6:15 UTC (permalink / raw)
  To: palmer, paul.walmsley, linux-riscv, linux-kernel; +Cc: Zong Li

These patches fix some build warnings when W=1, the most of warnings are
missing prototype as follows:

arch/riscv/mm/init.c:520:13: warning: no previous prototype for 'resource_init' [-Wmissing-prototypes]
arch/riscv/mm/pageattr.c:130:5: warning: no previous prototype for 'set_memory_ro' [-Wmissing-prototypes]
arch/riscv/mm/pageattr.c:136:5: warning: no previous prototype for 'set_memory_rw' [-Wmissing-prototypes]
arch/riscv/mm/pageattr.c:142:5: warning: no previous prototype for 'set_memory_x' [-Wmissing-prototypes]
arch/riscv/mm/pageattr.c:147:5: warning: no previous prototype for 'set_memory_nx' [-Wmissing-prototypes]
arch/riscv/mm/pageattr.c:152:5: warning: no previous prototype for 'set_direct_map_invalid_noflush' [-Wmissing-prototypes]
arch/riscv/mm/pageattr.c:169:5: warning: no previous prototype for 'set_direct_map_default_noflush' [-Wmissing-prototypes]
arch/riscv/mm/pageattr.c:97:1: warning: 'static' is not at beginning of declaration [-Wold-style-declaration]

Zong Li (2):
  riscv: Fix build warning for mm/init
  riscv: fix build warning of mm/pageattr

 arch/riscv/mm/init.c     | 2 +-
 arch/riscv/mm/pageattr.c | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

-- 
2.27.0


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

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

* [PATCH 1/2] riscv: Fix build warning for mm/init
  2020-07-16  6:15 [PATCH 0/2] Fix some build warnings when W=1 Zong Li
@ 2020-07-16  6:15 ` Zong Li
  2020-07-16  6:15 ` [PATCH 2/2] riscv: fix build warning of mm/pageattr Zong Li
  2020-07-25 18:24 ` [PATCH 0/2] Fix some build warnings when W=1 Palmer Dabbelt
  2 siblings, 0 replies; 8+ messages in thread
From: Zong Li @ 2020-07-16  6:15 UTC (permalink / raw)
  To: palmer, paul.walmsley, linux-riscv, linux-kernel; +Cc: Zong Li

Add static keyword for resource_init, this function is only used in this
object file.

Signed-off-by: Zong Li <zong.li@sifive.com>
---
 arch/riscv/mm/init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/riscv/mm/init.c b/arch/riscv/mm/init.c
index 92002952c621..66f5952f39c0 100644
--- a/arch/riscv/mm/init.c
+++ b/arch/riscv/mm/init.c
@@ -517,7 +517,7 @@ void mark_rodata_ro(void)
 }
 #endif
 
-void __init resource_init(void)
+static void __init resource_init(void)
 {
 	struct memblock_region *region;
 
-- 
2.27.0


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

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

* [PATCH 2/2] riscv: fix build warning of mm/pageattr
  2020-07-16  6:15 [PATCH 0/2] Fix some build warnings when W=1 Zong Li
  2020-07-16  6:15 ` [PATCH 1/2] riscv: Fix build warning for mm/init Zong Li
@ 2020-07-16  6:15 ` Zong Li
  2020-07-16  7:11   ` Pekka Enberg
  2020-07-16  7:24   ` Andreas Schwab
  2020-07-25 18:24 ` [PATCH 0/2] Fix some build warnings when W=1 Palmer Dabbelt
  2 siblings, 2 replies; 8+ messages in thread
From: Zong Li @ 2020-07-16  6:15 UTC (permalink / raw)
  To: palmer, paul.walmsley, linux-riscv, linux-kernel; +Cc: Zong Li

Add hearder for missing prototype. Also, static keyword should be at
beginning of declaration.

Signed-off-by: Zong Li <zong.li@sifive.com>
---
 arch/riscv/mm/pageattr.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/riscv/mm/pageattr.c b/arch/riscv/mm/pageattr.c
index 289a9a5ea5b5..19fecb362d81 100644
--- a/arch/riscv/mm/pageattr.c
+++ b/arch/riscv/mm/pageattr.c
@@ -7,6 +7,7 @@
 #include <linux/pgtable.h>
 #include <asm/tlbflush.h>
 #include <asm/bitops.h>
+#include <asm/set_memory.h>
 
 struct pageattr_masks {
 	pgprot_t set_mask;
@@ -94,7 +95,7 @@ static int pageattr_pte_hole(unsigned long addr, unsigned long next,
 	return 0;
 }
 
-const static struct mm_walk_ops pageattr_ops = {
+static const struct mm_walk_ops pageattr_ops = {
 	.pgd_entry = pageattr_pgd_entry,
 	.p4d_entry = pageattr_p4d_entry,
 	.pud_entry = pageattr_pud_entry,
-- 
2.27.0


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

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

* Re: [PATCH 2/2] riscv: fix build warning of mm/pageattr
  2020-07-16  6:15 ` [PATCH 2/2] riscv: fix build warning of mm/pageattr Zong Li
@ 2020-07-16  7:11   ` Pekka Enberg
  2020-07-16  7:13     ` Pekka Enberg
  2020-07-16  7:24   ` Andreas Schwab
  1 sibling, 1 reply; 8+ messages in thread
From: Pekka Enberg @ 2020-07-16  7:11 UTC (permalink / raw)
  To: Zong Li; +Cc: linux-riscv, Palmer Dabbelt, LKML, Paul Walmsley

On Thu, Jul 16, 2020 at 9:16 AM Zong Li <zong.li@sifive.com> wrote:
>
> Add hearder for missing prototype. Also, static keyword should be at
> beginning of declaration.
>
> Signed-off-by: Zong Li <zong.li@sifive.com>

Which prototype is missing?

- Pekka

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

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

* Re: [PATCH 2/2] riscv: fix build warning of mm/pageattr
  2020-07-16  7:11   ` Pekka Enberg
@ 2020-07-16  7:13     ` Pekka Enberg
  0 siblings, 0 replies; 8+ messages in thread
From: Pekka Enberg @ 2020-07-16  7:13 UTC (permalink / raw)
  To: Zong Li; +Cc: linux-riscv, Palmer Dabbelt, LKML, Paul Walmsley

On Thu, Jul 16, 2020 at 10:11 AM Pekka Enberg <penberg@gmail.com> wrote:
>
> On Thu, Jul 16, 2020 at 9:16 AM Zong Li <zong.li@sifive.com> wrote:
> >
> > Add hearder for missing prototype. Also, static keyword should be at
> > beginning of declaration.
> >
> > Signed-off-by: Zong Li <zong.li@sifive.com>
>
> Which prototype is missing?

Aah, never mind, you mention them in the cover letter. I think patch
description would be a better place to ensure they end up in git logs.

For both patches:

Reviewed-by: Pekka Enberg <penberg@kernel.org>

- Pekka

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

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

* Re: [PATCH 2/2] riscv: fix build warning of mm/pageattr
  2020-07-16  6:15 ` [PATCH 2/2] riscv: fix build warning of mm/pageattr Zong Li
  2020-07-16  7:11   ` Pekka Enberg
@ 2020-07-16  7:24   ` Andreas Schwab
  2020-07-16  7:46     ` Zong Li
  1 sibling, 1 reply; 8+ messages in thread
From: Andreas Schwab @ 2020-07-16  7:24 UTC (permalink / raw)
  To: Zong Li; +Cc: linux-riscv, palmer, linux-kernel, paul.walmsley

On Jul 16 2020, Zong Li wrote:

> Add hearder for missing prototype. Also, static keyword should be at

s/hearder/header/

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."

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

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

* Re: [PATCH 2/2] riscv: fix build warning of mm/pageattr
  2020-07-16  7:24   ` Andreas Schwab
@ 2020-07-16  7:46     ` Zong Li
  0 siblings, 0 replies; 8+ messages in thread
From: Zong Li @ 2020-07-16  7:46 UTC (permalink / raw)
  To: Andreas Schwab
  Cc: linux-riscv, Palmer Dabbelt, linux-kernel@vger.kernel.org List,
	Paul Walmsley

On Thu, Jul 16, 2020 at 3:24 PM Andreas Schwab <schwab@linux-m68k.org> wrote:
>
> On Jul 16 2020, Zong Li wrote:
>
> > Add hearder for missing prototype. Also, static keyword should be at
>
> s/hearder/header/
>
> Andreas.
>
> --
> Andreas Schwab, schwab@linux-m68k.org
> GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
> "And now for something completely different."

Hi all,

Let me describe the details in the commit message and fix the typo in
the next version.
Thanks for reviewing.

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

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

* Re: [PATCH 0/2] Fix some build warnings when W=1
  2020-07-16  6:15 [PATCH 0/2] Fix some build warnings when W=1 Zong Li
  2020-07-16  6:15 ` [PATCH 1/2] riscv: Fix build warning for mm/init Zong Li
  2020-07-16  6:15 ` [PATCH 2/2] riscv: fix build warning of mm/pageattr Zong Li
@ 2020-07-25 18:24 ` Palmer Dabbelt
  2 siblings, 0 replies; 8+ messages in thread
From: Palmer Dabbelt @ 2020-07-25 18:24 UTC (permalink / raw)
  To: zong.li; +Cc: linux-riscv, linux-kernel, zong.li, Paul Walmsley

On Wed, 15 Jul 2020 23:15:25 PDT (-0700), zong.li@sifive.com wrote:
> These patches fix some build warnings when W=1, the most of warnings are
> missing prototype as follows:
>
> arch/riscv/mm/init.c:520:13: warning: no previous prototype for 'resource_init' [-Wmissing-prototypes]
> arch/riscv/mm/pageattr.c:130:5: warning: no previous prototype for 'set_memory_ro' [-Wmissing-prototypes]
> arch/riscv/mm/pageattr.c:136:5: warning: no previous prototype for 'set_memory_rw' [-Wmissing-prototypes]
> arch/riscv/mm/pageattr.c:142:5: warning: no previous prototype for 'set_memory_x' [-Wmissing-prototypes]
> arch/riscv/mm/pageattr.c:147:5: warning: no previous prototype for 'set_memory_nx' [-Wmissing-prototypes]
> arch/riscv/mm/pageattr.c:152:5: warning: no previous prototype for 'set_direct_map_invalid_noflush' [-Wmissing-prototypes]
> arch/riscv/mm/pageattr.c:169:5: warning: no previous prototype for 'set_direct_map_default_noflush' [-Wmissing-prototypes]
> arch/riscv/mm/pageattr.c:97:1: warning: 'static' is not at beginning of declaration [-Wold-style-declaration]
>
> Zong Li (2):
>   riscv: Fix build warning for mm/init
>   riscv: fix build warning of mm/pageattr
>
>  arch/riscv/mm/init.c     | 2 +-
>  arch/riscv/mm/pageattr.c | 3 ++-
>  2 files changed, 3 insertions(+), 2 deletions(-)

Thanks, these are on for-next.

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

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

end of thread, other threads:[~2020-07-25 18:25 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-16  6:15 [PATCH 0/2] Fix some build warnings when W=1 Zong Li
2020-07-16  6:15 ` [PATCH 1/2] riscv: Fix build warning for mm/init Zong Li
2020-07-16  6:15 ` [PATCH 2/2] riscv: fix build warning of mm/pageattr Zong Li
2020-07-16  7:11   ` Pekka Enberg
2020-07-16  7:13     ` Pekka Enberg
2020-07-16  7:24   ` Andreas Schwab
2020-07-16  7:46     ` Zong Li
2020-07-25 18:24 ` [PATCH 0/2] Fix some build warnings when W=1 Palmer Dabbelt

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).