[PATCH] riscv: Fix compilation warning

Atish Patra atishp at atishpatra.org
Wed Sep 16 00:52:25 EDT 2020


On Tue, Sep 15, 2020 at 6:29 PM Damien Le Moal <Damien.LeMoal at wdc.com> wrote:
>
> On 2020/09/16 4:44, Atish Patra wrote:
> > On Tue, Sep 15, 2020 at 2:16 AM Damien Le Moal <damien.lemoal at wdc.com> wrote:
> >>
> >> Move the declaration of pt_ops under "#ifdef iCONFIG_MMU" to avoid the
> >> compilation warning:
> >>
> >> arch/riscv/mm/init.c:44:28: warning: ‘pt_ops’ defined but not used
> >> [-Wunused-variable]
> >>    44 | static struct pt_alloc_ops pt_ops;
> >>       |                            ^~~~~~
> >>
> >> with NO MMU builds (e.g. nommu_k210_defconfig).
> >>
> >
> > Thanks for the fix. pt_ops was added as a part of EFI series.
> > I am planning to send v8 to include some more generic EFI changes.
> >
> > Do you mind if I just include this fix in my series ?
>
> Please feel free to integrate/squash this change in your series. No need for a
> separate patch for just that. But: If your EFI series is not final, what is it
> doing on the for-next branch ???
>
> Palmer,
>
> What is going on here ? If Atish V7 series has problems and is not final, why is
> it already in for-next ?
>

UEFI support is going through a shared tree between UEFI & RISC-V. The
v7 was supposed to be the final version but
there were few patches in generic EFI code last week and Ard suggested
to rebase the RISC-V UEFI series on top of it.
Here is the thread.
https://www.spinics.net/lists/linux-efi/msg20272.html

That's why I am planning to send another series with few other improvements.

> >
> >> Signed-off-by: Damien Le Moal <damien.lemoal at wdc.com>
> >> ---
> >>  arch/riscv/mm/init.c | 4 ++--
> >>  1 file changed, 2 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/arch/riscv/mm/init.c b/arch/riscv/mm/init.c
> >> index 32e7258da9bb..c888c4470b34 100644
> >> --- a/arch/riscv/mm/init.c
> >> +++ b/arch/riscv/mm/init.c
> >> @@ -41,8 +41,6 @@ struct pt_alloc_ops {
> >>  #endif
> >>  };
> >>
> >> -static struct pt_alloc_ops pt_ops;
> >> -
> >>  static void __init zone_sizes_init(void)
> >>  {
> >>         unsigned long max_zone_pfns[MAX_NR_ZONES] = { 0, };
> >> @@ -214,6 +212,8 @@ void __init setup_bootmem(void)
> >>  }
> >>
> >>  #ifdef CONFIG_MMU
> >> +static struct pt_alloc_ops pt_ops;
> >> +
> >>  unsigned long va_pa_offset;
> >>  EXPORT_SYMBOL(va_pa_offset);
> >>  unsigned long pfn_base;
> >> --
> >> 2.26.2
> >>
> >>
> >> _______________________________________________
> >> linux-riscv mailing list
> >> linux-riscv at lists.infradead.org
> >> http://lists.infradead.org/mailman/listinfo/linux-riscv
> >
> >
> >
>
>
> --
> Damien Le Moal
> Western Digital Research



-- 
Regards,
Atish



More information about the linux-riscv mailing list