From nobody Sat Feb 7 18:15:33 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 8D9513A7F56 for ; Tue, 3 Feb 2026 16:25:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770135950; cv=none; b=M4E5HFN3q5IyiqzfuS20Y/f/3e5AjK54x3wZ+HkiJzqTCFS8oWdeACqzXQ4Hnk7XcohLYRL0E50DelAUc4EX6ozkd+8gMu9YEOITxcGsABjlFUl7tZ5RVTt+u1B28epsfc45qSRXaMcCBaoiSEL3PI8cTh5DNjc3EJXrwAKIjpM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770135950; c=relaxed/simple; bh=wLx/OGwNI5UijiztR2zILsUhZJO3/G/xSZDrmzTyYRw=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=P675JKCznRub+mov4dwS+byYQmJ3HhrEu7gJ9/JNHMpyBET08oJfwTgMIwEZbXB7+W4zd0NXY5PtRVXNqT+9MMPO1q+YXkxf8v7mk0sP52lfHiE/tqUn/uFBuPbKawMeQJNnkdcw+QVnsqKGDcfGsJ35DBjR+dPqpmMkS5dUHa8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=aX2+8Ju+; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="aX2+8Ju+" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B74D1C116D0; Tue, 3 Feb 2026 16:25:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1770135950; bh=wLx/OGwNI5UijiztR2zILsUhZJO3/G/xSZDrmzTyYRw=; h=From:To:Cc:Subject:Date:From; b=aX2+8Ju+HBq+2NuRKTss1OgTGOPwhK7LIpdVa7e/cxqm7vdmJRELINfxjr/4WYu6J eajja0NEkEb7QnIXx9nMR2+GUv7gvqccgkq0tyjYbRYNiUHNufvck30G0OBtLnCrQH Gw9EeAoFCTmjnJHAw9vOBjcsVeHugsvz+Z8DiBSzzqQYRVKtXZEv2zuw5CtDMCynXJ u3FpoRLLdSnEXIh6OLITGMOy81+WsVCsHvJXRoVDkc0kz/sd45/oK6dW+seQZA0I9J kOybrA6UbBTmnywmYcmNqDpEOT3HDMzjmDVY2tUI9hfe9JXItbwjgdmZDmB6PBi3Lt KnHoEyOG2zqVg== From: Arnd Bergmann To: Cc: Arnd Bergmann , linux-kernel@vger.kernel.org Subject: [PATCH] tracing: turn off -Wsuggest-attribute=format for sample Date: Tue, 3 Feb 2026 17:25:41 +0100 Message-Id: <20260203162546.2254900-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.5 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Arnd Bergmann The foo_bar tracing sample produces a few harmless warnings when -Wsuggest-attribute=3Dformat is enabled, which can lead to failed build in combination with -Werror: In file included from include/trace/define_trace.h:132, from samples/trace_events/trace-events-sample.h:640, from samples/trace_events/trace-events-sample.c:12: samples/trace_events/./trace-events-sample.h: In function 'trace_event_get_= offsets_foo_bar': include/trace/stages/stage5_get_offsets.h:33:31: error: function 'trace_eve= nt_get_offsets_foo_bar' might be a candidate for 'gnu_printf' format attrib= ute [-Werror=3Dsuggest-attribute=3Dformat] 33 | { (void)sizeof(struct _test_no_array_##item *); } | ^~~~~~~~~~~~~~~ This seems to be a false positive and I can't see an obvious way to annotate it, so instead just shut up that warning. Signed-off-by: Arnd Bergmann --- samples/trace_events/trace-events-sample.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/samples/trace_events/trace-events-sample.c b/samples/trace_eve= nts/trace-events-sample.c index ecc7db237f2e..9993fb5d5f98 100644 --- a/samples/trace_events/trace-events-sample.c +++ b/samples/trace_events/trace-events-sample.c @@ -9,6 +9,8 @@ * creates the handles for the trace points. */ #define CREATE_TRACE_POINTS +__diag_ignore(GCC, all, "-Wsuggest-attribute=3Dformat", + "trace_event_get_offsets_foo_bar can't easily be annotated as= __printf"); #include "trace-events-sample.h" =20 static const char *random_strings[] =3D { --=20 2.39.5