From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D22C522A7E9 for ; Mon, 2 Mar 2026 19:53:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.50.34 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772481211; cv=none; b=FpPb0dNatAUIfdCjCxWx2UflybXxTKv4/OvmOb+h42Wmgup0DYLHvguJxGFnCZtn04kSa/TBH3F4rQG0Ije3N9a8H+mDO4Brb0yDVl4W/NAdMB4/zZrAPWqbvoVJ/9Xj2ARkns/t7I9x0aVcKa9dDM3ixK1NXsAucdAbLdjsRpM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772481211; c=relaxed/simple; bh=fJwhP4jmhmy0N4zhZgo+VbJtyRHwQH79IyZI8sPwIvM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Cm2YGm3UZm0ajCPlM3thtlIxokgwuk6MwIDPlGllpKN6sS/GGbSWlZTi7u3EoGQQLSZ0EKdIDZNjw55GtCuOWuUAmofFDE00avjEyJQYQwk09yxAyq6veo0pr+DN045r74+/bGajasJCBierN4T08RQ4Kk9G8zMnlpT48KLweZ4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=Q8zFL9Ns; arc=none smtp.client-ip=90.155.50.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="Q8zFL9Ns" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=vg2rbwRhJpGM/YZW+ccotHnBhwZDS+YIHJ2EbjRRlR8=; b=Q8zFL9NswumAat796awyiryo+4 oL8Ex+qYvo5WvYaRj9Ls1PqeGQ4lmKBJdED+K5Z1EEu5dc2Sd69mQ+SZL1vM0bTBd3qV7/pwpd1MA //s63mmdc7Fw6UkBnUofqgkEO9qnrn3hmvCBvR3A1w0BcgljSxjfiNtGn5Fx7OkIgNnDjzMHIGIuH VoPaNVy/EpiEHrKN0D93Q9TgeXyT3oee/1B/XKi5bCjucPPhWbfchmAaHePn2V+D0UNJKk+kSiiOx i8p7DygrDT/RXqyO9UaFmrUnATkOlokRX5q+L6yojgI+PSnwyYPPNTQ1zOsZGE9drkrcQC1y3BzZj 6uw2bL3g==; Received: from willy by casper.infradead.org with local (Exim 4.98.2 #2 (Red Hat Linux)) id 1vx9KZ-0000000A00h-2iCh; Mon, 02 Mar 2026 19:53:27 +0000 Date: Mon, 2 Mar 2026 19:53:27 +0000 From: Matthew Wilcox To: Joshua Hahn Cc: Alexey Suchkov , 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 Message-ID: References: <20260302193405.37961-1-dywoq.contact@gmail.com> <20260302194836.2932150-1-joshua.hahnjy@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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.