lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAAhSdy3q8SCj4aTanyvgywuEa+DWCOZeOF3=-xHW+UjzXXcd_w@mail.gmail.com>
Date:   Thu, 16 Jul 2020 18:50:14 +0530
From:   Anup Patel <anup@...infault.org>
To:     Zong Li <zong.li@...ive.com>
Cc:     Palmer Dabbelt <palmer@...belt.com>,
        Paul Walmsley <paul.walmsley@...ive.com>,
        linux-riscv <linux-riscv@...ts.infradead.org>,
        "linux-kernel@...r.kernel.org List" <linux-kernel@...r.kernel.org>,
        Pekka Enberg <penberg@...nel.org>
Subject: Re: [PATCH v2 2/2] riscv: Fix build warning for mm/pageattr

On Thu, Jul 16, 2020 at 6:36 PM Zong Li <zong.li@...ive.com> wrote:
>
> Add header for missing prototype. Also, static keyword should be at
> beginning of declaration.
>
> The warning messages as follows (with W=1 build):
>
> 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]
>
> Signed-off-by: Zong Li <zong.li@...ive.com>
> Reviewed-by: Pekka Enberg <penberg@...nel.org>
> ---
>  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
>

Looks good to me.

Reviewed-by: Anup Patel <anup@...infault.org>

Regards,
Anup

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ