linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Qian Cai <cai@lca.pw>
To: Will Deacon <will.deacon@arm.com>
Cc: catalin.marinas@arm.com, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] arm64: fix pte_unmap() -Wunused-but-set-variable
Date: Mon, 29 Apr 2019 13:18:55 -0400	[thread overview]
Message-ID: <1556558335.6132.9.camel@lca.pw> (raw)
In-Reply-To: <20190429164923.GA26912@fuggles.cambridge.arm.com>

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.

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

      reply	other threads:[~2019-04-29 17:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-27  1:28 [PATCH] arm64: fix pte_unmap() -Wunused-but-set-variable Qian Cai
2019-04-29 16:49 ` Will Deacon
2019-04-29 17:18   ` Qian Cai [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1556558335.6132.9.camel@lca.pw \
    --to=cai@lca.pw \
    --cc=catalin.marinas@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=will.deacon@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).