From: Arnd Bergmann <arnd@kernel.org>
To: Matthew Wilcox <willy@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Arnd Bergmann <arnd@arndb.de>,
"Uladzislau Rezki (Sony)" <urezki@gmail.com>,
Stephen Rothwell <sfr@canb.auug.org.au>,
Nicholas Piggin <npiggin@gmail.com>,
Michal Hocko <mhocko@suse.com>,
"Paul E. McKenney" <paulmck@kernel.org>,
Chen Wandun <chenwandun@huawei.com>,
David Hildenbrand <david@redhat.com>,
Linux-MM <linux-mm@kvack.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mm: vmap: avoid -Wsequence-point warning
Date: Thu, 4 Nov 2021 15:39:21 +0100 [thread overview]
Message-ID: <CAK8P3a38r0PwHJUVhtV379+YZgkRpr+gfaRJK_V+ddHu4vEuDg@mail.gmail.com> (raw)
In-Reply-To: <YYPmrAGIBgMq2zQE@casper.infradead.org>
On Thu, Nov 4, 2021 at 2:57 PM Matthew Wilcox <willy@infradead.org> wrote:
> On Thu, Nov 04, 2021 at 02:35:40PM +0100, Arnd Bergmann wrote:
> >
> > This only appeared in one randconfig build so far, and I don't know
> > what caused it, but moving the index increment out of the expression
> > at least addresses the warning.
>
> Would that randconfig include CONFIG_ARM64_PA_BITS_52?
>
> #define __phys_to_pte_val(phys) (((phys) | ((phys) >> 36)) & PTE_ADDR_MASK)
>
> because that's going to double-increment idx. Or single increment.
> Or whatever else the compiler feels like doing.
Ok, got it. I've got a new patch turning that into an inline function now,
which seems like a more reliable fix. I still don't see why the warning only
showed up now, as both the caller and the definition of __phys_to_pte_val()
are not that new, and I've been testing with gcc-11 for a while now.
Arnd
prev parent reply other threads:[~2021-11-04 14:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-04 13:35 Arnd Bergmann
2021-11-04 13:57 ` Matthew Wilcox
2021-11-04 14:39 ` Arnd Bergmann [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=CAK8P3a38r0PwHJUVhtV379+YZgkRpr+gfaRJK_V+ddHu4vEuDg@mail.gmail.com \
--to=arnd@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=chenwandun@huawei.com \
--cc=david@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=npiggin@gmail.com \
--cc=paulmck@kernel.org \
--cc=sfr@canb.auug.org.au \
--cc=urezki@gmail.com \
--cc=willy@infradead.org \
/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