linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: Joshua Hahn <joshua.hahnjy@gmail.com>
Cc: Alexey Suchkov <aleks.koyf@gmail.com>,
	akpm@linux-foundation.org, dywoq.contact@gmail.com,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH] [PATCH v2] mm: initialize 'seq' in gup_fast to remove -Wmaybe-uninitialized warning
Date: Mon, 2 Mar 2026 19:53:27 +0000	[thread overview]
Message-ID: <aaXqt8TD7r5wcrRI@casper.infradead.org> (raw)
In-Reply-To: <20260302194836.2932150-1-joshua.hahnjy@gmail.com>

On Mon, Mar 02, 2026 at 11:48:35AM -0800, Joshua Hahn wrote:
> Unfortunately I think that this patch is still unneeded. The variable seq is
> used in two places, raw_seqcount_try_begin and read_seqcount_retry, and nowhere
> else in the function. Both are guarded by if (gup_flags & FOLL_PIN).

Yeah, historically GCC wasn't great with that pattern.  It failed to
notice that the condition was the same and so there was no path through
the code that would use an uninit variable.  Hence my question about
what compiler version he's using to see whether we can disregard this
because it's an old compiler that we don't support any more.


  reply	other threads:[~2026-03-02 19:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-02 19:12 [PATCH] " Alexey Suchkov
2026-03-02 19:22 ` Matthew Wilcox
2026-03-02 19:34 ` [PATCH] [PATCH v2] " Alexey Suchkov
2026-03-02 19:44   ` Matthew Wilcox
2026-03-02 19:57     ` Alexey Suchkov
2026-03-02 19:48   ` Joshua Hahn
2026-03-02 19:53     ` Matthew Wilcox [this message]
2026-03-02 20:09     ` Alexey Suchkov
2026-03-02 20:43   ` Andrew Morton

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=aaXqt8TD7r5wcrRI@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=aleks.koyf@gmail.com \
    --cc=dywoq.contact@gmail.com \
    --cc=joshua.hahnjy@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.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