From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) (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 7A70F2F85B for ; Wed, 4 Feb 2026 15:59:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.8 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770220781; cv=none; b=SYK8j3pew8atnz6+/GqpHDly931ds/0TYb7mUsq/NbpzPF/g9GT0zeseMChq4+g9pVKvE2nQwQD0jqx34iZ8o7vGoZQ9x1aiKNqA9JRQZHTyhl36s7YK2MyiLUETy7TGGGJDqs3mOFMfaiJlqqXMQ6TedYDLaXCMkniFqhCJTTk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770220781; c=relaxed/simple; bh=2rYdnpqJrizIImq6LmPxaMvW8rBF6mGx5zFX5PePYTE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=i4yU8sjJrUSD3UTq6u5fXr2OttCoHtiLFfcr7uphdM0oIu3W7FmxoiR/raXJxTnxsBClrIUfxB97OG0AF50A4y/aGj/xKF3Xlvoyy3PlybeOApSPXfWARSSF1v87Fz9W8ZNrZsgaAcKw7/CmN7UJaZ0SzpuearGsFTgaurBv3gc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=pass smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=XihpWD3t; arc=none smtp.client-ip=192.198.163.8 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="XihpWD3t" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1770220782; x=1801756782; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=2rYdnpqJrizIImq6LmPxaMvW8rBF6mGx5zFX5PePYTE=; b=XihpWD3t+PIiRINKQe03/1N0+KdzNySKxV6XapUjiZEobNA2uOZJbio0 zlNh+iFATAEqNl4E5YcS1ajU8P9eQdBp1io5S7tZioeWn4+PfMeiFn5zC hThC1m8580bnC6SuqtvNba0r/51DiPkbc/IWpp4ddxPrG3lhS64LwGwaH XcnPZkdCEjyVrzbjscbEqn6rKXJGYJGoykfnd5B3vfY/SGt++QjsZhiec GK2voxOdx0N0+Z8rzi6upSKWolaLchtn0qxFAf0s2Qkb8iLeiD89iA2AU 0kGDwyomb7eWfMauy9UE8kXDOZBbp/Ctebbs60e2UkyDHH466zA+cBY/q g==; X-CSE-ConnectionGUID: Jvf9kSwGQJm0n05EwDBAwA== X-CSE-MsgGUID: qHX7O2D7TxKDCcOf55dy9Q== X-IronPort-AV: E=McAfee;i="6800,10657,11691"; a="88988766" X-IronPort-AV: E=Sophos;i="6.21,272,1763452800"; d="scan'208";a="88988766" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Feb 2026 07:59:41 -0800 X-CSE-ConnectionGUID: yxutFS3uQhqEwAvlNOhmng== X-CSE-MsgGUID: cSBb0Y33S6+aQ2y9mxrE2Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.21,272,1763452800"; d="scan'208";a="247799828" Received: from pgcooper-mobl3.ger.corp.intel.com (HELO localhost) ([10.245.245.188]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Feb 2026 07:59:39 -0800 Date: Wed, 4 Feb 2026 17:59:37 +0200 From: Andy Shevchenko To: Peter Zijlstra , linux-kernel@vger.kernel.org Cc: Andrew Morton , Arnd Bergmann Subject: Re: [PATCH v1 1/1] bug: Mark __warn_printf() with __printf() attribute Message-ID: References: <20251208141618.2805983-1-andriy.shevchenko@linux.intel.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=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20251208141618.2805983-1-andriy.shevchenko@linux.intel.com> Organization: Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs, Bertel Jungin Aukio 5, 02600 Espoo +Cc: Arnd (just FYI) On Mon, Dec 08, 2025 at 03:16:18PM +0100, Andy Shevchenko wrote: > __warn_printf() is using printf() type of format, and compiler > is not happy about them as is: > > lib/bug.c:187:25: error: function ‘__warn_printf’ might be a candidate for ‘gnu_printf’ format attribute [-Werror=suggest-attribute=format] > 187 | vprintk(fmt, *args); > | ^~~~~~~ > > Fix the compilation errors by adding __printf() attribute. > > Fixes: 5c47b7f3d1a9 ("bug: Add BUG_FORMAT_ARGS infrastructure") > Signed-off-by: Andy Shevchenko > --- > lib/bug.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lib/bug.c b/lib/bug.c > index edd9041f89f3..d7db57280ab7 100644 > --- a/lib/bug.c > +++ b/lib/bug.c > @@ -173,7 +173,7 @@ struct bug_entry *find_bug(unsigned long bugaddr) > return module_find_bug(bugaddr); > } > > -static void __warn_printf(const char *fmt, struct pt_regs *regs) > +static __printf(1, 0) void __warn_printf(const char *fmt, struct pt_regs *regs) > { > if (!fmt) > return; -- With Best Regards, Andy Shevchenko