From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f73.google.com (mail-wr1-f73.google.com [209.85.221.73]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C9F853128AC for ; Tue, 16 Dec 2025 09:16:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.73 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765876606; cv=none; b=uXCwMZN175GIT3iM5Lv6vtuj3TNoMtHe509M2spnok/JtrRxnMEMSvBEKaJ66mxcTSMTEdBR665+POVTu/L1cbfysVb0stFeoFWSqP3cslq4zuO+5EhOJDCDPcebTunfU/VTZfd2W2Cn6AK+F5nXff+aIbWIE7nZ1R1DUQusnNo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765876606; c=relaxed/simple; bh=hfQvcAIiD314LNK8xw0Rgvthx7Y011hrmy0ZvVoAdh4=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=iBZBS+t8qsfJbTW5cW1gi64ttaeg5USHT6bW2ZSnb3bpfWA4kkcxi0MYWGkhhcW3sjBM8yrMPKGvjlqZKF89+J9kH2/RdjdlaEFy6JWZuWq79VJWRmJYq1sVGbJOSS4os798+yyq69242spU14bodtaM9G0N2VH2ubZvq4vcL/M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--jackmanb.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=Wykru0zz; arc=none smtp.client-ip=209.85.221.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--jackmanb.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="Wykru0zz" Received: by mail-wr1-f73.google.com with SMTP id ffacd0b85a97d-43009df5ab3so1423981f8f.1 for ; Tue, 16 Dec 2025 01:16:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1765876603; x=1766481403; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:from:to:cc:subject:date:message-id :reply-to; bh=Atd4YLE9/mqRFzixpNkdYRbiwru5t4IMlJ1veGwdJ+0=; b=Wykru0zzduzXh7orROLEm+T/nJj9ocJDVgFR4fXiM9lFo0KsPmMTr1GWMd7FErveeX ysmdqYEoWM6UESK/ucg211kBs7TAEOjTic/QW6Th6dgk/yb8fLq4NdfU9unTPe+PN89q rK/qkWleQkRfV9B3A5rJyVRuGWlha7HHAoo/EV3EVXi5zJSi3tHTqNoIwPCa21fUF0vx ZAT+xnjfmBx7OPbk9yBYtnB0ZApYcfmt3hbN7ZQ/0Uz/CcJmxEoON/uFDoixCp5qq+j1 OLAB+0ecSVr0V4+3ZFE8cZkxhL4BbUrWGYQjEgP9b6yF62VxpLdemA3HCoyvNXVZJbfP l0mw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765876603; x=1766481403; h=content-transfer-encoding:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=Atd4YLE9/mqRFzixpNkdYRbiwru5t4IMlJ1veGwdJ+0=; b=NCefTetchrm70C6KRyH/8NIR6zkj4URSZup/OZcelKQlxDi0BdgEq3cC541nb+kAFX nldMdxEGZB6xMHxkSvqKe5kkzFsdHl2QZAMfQoMCC6wDMSwS9Aghe9qs8BO9z9P4UUu9 89uxUGi9/iIoLfFYUPXxDFN4uXjdbBWvhXIZmjz+h2lr1NELGaNFL4U1/e0M1vfb6ktF pMVGEKFxkqbu2I2ByVi3W+3fSXCOP/IkdOPxDsxjsFSArl7G9nGRhu2SAgSlKnKWO9ky mkPzOKc/8b4E5fkaWaQimdLuyITAHQ0H33pHyK9KwmzATUXZmteS12nBynYWvJocIvnt IIFg== X-Forwarded-Encrypted: i=1; AJvYcCVmjcs2snNXcvfMfVKjB1dMB2xQ2Ug3+S9k04b29HbCs3DJwYacOMRkorW0172oFkf7DWk40NrpkC+22jI=@vger.kernel.org X-Gm-Message-State: AOJu0YxBeUfM4Qp1WP+mSnfkW7LNeBuAH5na1NGaPUnvDz7bgzfo7hxA BekbzfHXUHYM+r8bs+HQ7sLMvxDISELTJ4w106UHQ/dltEh0cJGvTJdRmYlnQDfFXdU3sDUJILY 0GBaayR7z5IYWRg== X-Google-Smtp-Source: AGHT+IERSw+8tSGLYFkX5sflCPlHu25a9iCaChtbaXOE0D+8gWinL3C00K5iNFr/DV+6FCwgE+0GB5/T+NkGwg== X-Received: from wrbeh4.prod.google.com ([2002:a05:6000:4104:b0:430:f68f:5124]) (user=jackmanb job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6000:178e:b0:430:f3ab:569c with SMTP id ffacd0b85a97d-430f3ab58f3mr12088842f8f.53.1765876602873; Tue, 16 Dec 2025 01:16:42 -0800 (PST) Date: Tue, 16 Dec 2025 09:16:41 +0000 In-Reply-To: <20251216084949.GQ3707837@noisy.programming.kicks-ass.net> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251207-warn-printf-gcc-v1-1-b597d612b94b@google.com> <20251215202430.c35c2d29c4f9ff614d2ab534@linux-foundation.org> <20251216084949.GQ3707837@noisy.programming.kicks-ass.net> X-Mailer: aerc 0.21.0 Message-ID: Subject: Re: [PATCH] bug: hush suggest-attribute=format for __warn_printf() From: Brendan Jackman To: Peter Zijlstra , Andrew Morton Cc: Brendan Jackman , , , , , , , Andy Shevchenko , Linus Torvalds Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue Dec 16, 2025 at 8:49 AM UTC, Peter Zijlstra wrote: > On Mon, Dec 15, 2025 at 08:24:30PM -0800, Andrew Morton wrote: >> On Sun, 07 Dec 2025 03:53:18 +0000 Brendan Jackman = wrote: >>=20 >> > Recent additions to this function cause GCC 14.3.0 to get excited and >> > suggest a missing attribute: >> >=20 >> > lib/bug.c: In function =E2=80=98__warn_printf=E2=80=99: >> > lib/bug.c:187:25: error: function =E2=80=98__warn_printf=E2=80=99 migh= t be a candidate for =E2=80=98gnu_printf=E2=80=99 format attribute [-Werror= =3Dsuggest-attribute=3Dformat] >> > 187 | vprintk(fmt, *args); >> > | ^~~~~~~ >> >=20 >> > Disable the diagnostic locally, following the pattern used for stuff >> > like va_format(). >> >=20 >>=20 >> Question please. Why are we suppressing the warning instead of >> addressing it, as Andy attempts to do in >> https://lkml.kernel.org/r/20251208141618.2805983-1-andriy.shevchenko@lin= ux.intel.com? Hm. I thought this warning was a false positive, maybe I don't understand what the printf attribute means here. I will read up on it and comment on that other thread.=20 If that other one gets merged let's just revert this in the TIP tree (or roll the branch back if that's acceptable). >> I went off and looked at the commit which did this to va_format() but >> it didn't tell me. Yeah sorry, I should have actually described this in the commit message, then if I was wrong it would have been obvious. > Blergh, I hadn't even noticed Andy's thing was different :/ > > Fundamentally I'm starting to hate W=3D1. Either we think these warnings > are good and we should get it into the default build, or we don't think > and we should just collectively ignore them. I agree. I like setting W=3D1 for building my own code, I prefer the most pedantic compiler possible. But, this is only useful if the code I'm building on is clean of warnings. So either W=3D1 builds have to be supported (in which case why not make it default?) or we should give up on them since they aren't considered useful enough to justify the effort. Given the kernel is usually W=3D1 clean, it seems like we _do_ support it. It's just that we support it via these akwkward retroactive fixups instead of just expecting code to be W=3D1-clean before we merge it?