Re: [PATCH] [PATCH v2] mm: initialize 'seq' in gup_fast to remove -Wmaybe-uninitialized warning

From: Matthew Wilcox

Date: Mon Mar 02 2026 - 14:44:17 EST


On Mon, Mar 02, 2026 at 10:34:05PM +0300, Alexey Suchkov wrote:
> The local variable 'seq' in gup_fast (mm/gup.c) was declared
> without initialization, which can trigger:
>
> mm/gup.c:3165:20: warning: ‘seq’ may be used uninitialized [-Wmaybe-uninitialized]
>
> Initialize 'seq' to 0. This does not change behavior, since
> read_seqcount_retry() always writes to it before use.

What compiler?