From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) (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 39600326D4A for ; Mon, 8 Dec 2025 14:16:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.11 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765203392; cv=none; b=t2COrmvu8Io3QYjPk2YU7A3F1DVmIEgWVrql58b3zgO0EiONxiEE3Eb+kWaDxpELCNAfnZXeNAgVYePEAolOrTeX3ytEVRF/E2NXPLEnZLHoZdvo0RWNONJzzEZbFKWdP3iwWj89HhxNFp/oXvd446FOrMdXNaSpbLSQ4JSh+jg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765203392; c=relaxed/simple; bh=Pgfmqrpm3UjqseYrszw4HGW/4vZ1dC26pblBCzpKYSg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=S1nuulGflgOS+Lg05eDG8XsJ2uHcme+/wAw0BKAyKzKyaIg1AqquYf7ttpON7R7VoTDJlbXuLoYbH68U0qp52lFKftargNvePazoGErzCd71YRC/mVZ2k97x+/iAh73IOGuOg9QvgR627DxRTubtQrMpRCWypBQO8wXxDMkMJbA= 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=SF7JhXns; arc=none smtp.client-ip=198.175.65.11 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="SF7JhXns" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1765203390; x=1796739390; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=Pgfmqrpm3UjqseYrszw4HGW/4vZ1dC26pblBCzpKYSg=; b=SF7JhXnsWpVItQ4Sq269Tp7VFTN8s+kD++5zPkU3ul/UYOB9GmiLXn/b Ll40UBsUmsxU5hZr1zt2I2tXtBwDn1VPaBVQltfF+7ukLPp6hNZMik06V Pp33z9xpd5IjXjkNP1xlixog/4yjGIhYHR4EjXCC1Qb30XAgDz4FouErS y+iKgRrtDH22Zwwe8IxTWtYfkzquwG3nKrt7j8ZzG7niOyzFzhbjJ2ARP 4LSqe0dEvx2dpnFy0m/Ka3fdjRGqyAauBMHHUmVQLVCdTeZX/QETTpzfJ g0qMb5Ycl2ErgeVsBV7N9LNY1Aq5muKJMqlVDQXvtT64CRfMLqWZKQu3J Q==; X-CSE-ConnectionGUID: tLOULB8iRkyxyAHwZUbTJg== X-CSE-MsgGUID: 1Uc26Mg2TSCEa53jYW+seQ== X-IronPort-AV: E=McAfee;i="6800,10657,11635"; a="77466260" X-IronPort-AV: E=Sophos;i="6.20,258,1758610800"; d="scan'208";a="77466260" Received: from fmviesa009.fm.intel.com ([10.60.135.149]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Dec 2025 06:16:29 -0800 X-CSE-ConnectionGUID: AE1LVE5RT2ORG16PWhZ6jQ== X-CSE-MsgGUID: eRH0/eCBSoKEcWq5j7+yOg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.20,258,1758610800"; d="scan'208";a="196406733" Received: from black.igk.intel.com ([10.91.253.5]) by fmviesa009.fm.intel.com with ESMTP; 08 Dec 2025 06:16:28 -0800 Received: by black.igk.intel.com (Postfix, from userid 1003) id 3E49D93; Mon, 08 Dec 2025 15:16:27 +0100 (CET) From: Andy Shevchenko To: Peter Zijlstra , linux-kernel@vger.kernel.org Cc: Andrew Morton , Andy Shevchenko Subject: [PATCH v1 1/1] bug: Mark __warn_printf() with __printf() attribute Date: Mon, 8 Dec 2025 15:16:18 +0100 Message-ID: <20251208141618.2805983-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.50.1 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-Transfer-Encoding: 8bit __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; -- 2.50.1