[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1556558335.6132.9.camel@lca.pw>
Date: Mon, 29 Apr 2019 13:18:55 -0400
From: Qian Cai <cai@....pw>
To: Will Deacon <will.deacon@....com>
Cc: catalin.marinas@....com, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] arm64: fix pte_unmap() -Wunused-but-set-variable
On Mon, 2019-04-29 at 17:49 +0100, Will Deacon wrote:
> > arch/arm64/include/asm/pgtable.h | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/arch/arm64/include/asm/pgtable.h
> > b/arch/arm64/include/asm/pgtable.h
> > index de70c1eabf33..7543e345e078 100644
> > --- a/arch/arm64/include/asm/pgtable.h
> > +++ b/arch/arm64/include/asm/pgtable.h
> > @@ -478,6 +478,8 @@ static inline phys_addr_t pmd_page_paddr(pmd_t pmd)
> > return __pmd_to_phys(pmd);
> > }
> >
> > +static inline void pte_unmap(pte_t *pte) { }
>
> Hmm, is this guaranteed to stop the compiler from warning? Assuming the
> pte_unmap() call is inlined, I'd expect it to keep complaining. What
> compiler are you using?
Yes, it is guaranteed. Tested on both gcc and clang.
>
> Also, there are a bunch of other architectures that I would expect to have
> this same issue because they defined pte_unmap() exactly the same way.
This has already fixed in powerpc that went in.
https://lore.kernel.org/lkml/20190307144031.52494-1-cai@lca.pw/
I am not sure if I care about any other arches nor I have real hardware to test
further.
Powered by blists - more mailing lists