🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #11991

[PATCH net-next] net: xgene: Fix the size of the IRQ name buffer

#11991
From: xujiahao
Date: Fri, 06 Nov 2026 04:44
35 lines
10156 bytes
xgene_enet_set_irq_name() composes the interrupt names as
"<netdev>-rx-txc", "<netdev>-rx-%d" and "<netdev>-txc-%d" into
ring->irq_name[], which is IRQ_ID_SIZE bytes.  A 15-character netdev
name plus "-txc-" and a full-range %d needs 31 bytes including the
terminator, so the names of long interfaces can be truncated, and gcc
reports it in a W=1 build:

  drivers/net/ethernet/apm/xgene/xgene_enet_main.c:888:66: warning: '-rx-txc' directive output may be truncated writing 7 bytes into a region of size between 1 and 16 [-Wformat-truncation=]
  drivers/net/ethernet/apm/xgene/xgene_enet_main.c:891:66: warning: '-rx-' directive output may be truncated writing 4 bytes into a region of size between 1 and 16 [-Wformat-truncation=]
  drivers/net/ethernet/apm/xgene/xgene_enet_main.c:898:58: warning: '-txc-' directive output may be truncated writing 5 bytes into a region of size between 1 and 16 [-Wformat-truncation=]

Size the name buffer to 32 bytes.  It is only ever read as a string, by
request_irq() and the interrupt logging, so nothing else changes.

Signed-off-by: xujiahao <xujiahao@cmss.chinamobile.com>
---
 drivers/net/ethernet/apm/xgene/xgene_enet_main.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/apm/xgene/xgene_enet_main.h b/drivers/net/ethernet/apm/xgene/xgene_enet_main.h
index bce2c19e3..8eb97f6ed 100644
--- a/drivers/net/ethernet/apm/xgene/xgene_enet_main.h
+++ b/drivers/net/ethernet/apm/xgene/xgene_enet_main.h
@@ -71,7 +71,7 @@
 #define X2_START_BP_BUFNUM_1	0x20
 #define X2_START_RING_NUM_1	256
 
-#define IRQ_ID_SIZE		16
+#define IRQ_ID_SIZE		32
 
 #define PHY_POLL_LINK_ON	(10 * HZ)
 #define PHY_POLL_LINK_OFF	(PHY_POLL_LINK_ON / 5)
-- 
2.43.0
Technical Details
Message-ID: <20261106044421.3461816-1-xujiahao@cmss.chinamobile.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-357736-linux-kernel-netdev=dewy.ru

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-357736-linux-kernel-netdev=dewy.ru
From: xujiahao@cmss.chinamobile.com (xujiahao)
Newsgroups: linux.kernel.netdev
Subject: [PATCH net-next] net: xgene: Fix the size of the IRQ name buffer
Date: Fri,  6 Nov 2026 12:44:21 +0800
Organization: Usenet Network
Message-ID: <20261106044421.3461816-1-xujiahao@cmss.chinamobile.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="3795790"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:KP2mhKF1Ct+gVvq+JjQEGF2N2kQ= sha256:AHxL99YrrEfqRd0U3JmN+KALwOSSQ8iKI3NhtnP77I0=
	sha1:FomVC7nQ5jBi4fCPq0geFI9voRo= sha256:tDkaIPIXiDevwQl7W4bmk2UKYtv8qZim1zX1yEMDx5M=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id C9E08113154; Fri,  6 Nov 2026 07:52:14 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -2.751
X-Spam-Status: No, score=-2.751 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIM_INVALID=0.1, DKIM_SIGNED=0.1,
	HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1,
	RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001]
	autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=fail (1024-bit key)
	reason="fail (body has been altered)" header.d=cmss.chinamobile.com
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id ZpZZlGOGT0qd;
	Fri,  6 Nov 2026 07:52:11 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-357736-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=cmss.chinamobile.com
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id A846A112EA9; Fri,  6 Nov 2026 07:52:01 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sea.lore.kernel.org (Postfix) with ESMTP id 885B928BC4; Fri,  6 Nov 2026 04:47:57 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1793940476;
	b=borFvh/OEHxeZMLaDsJHyElJcX9N8YqQ+UNL3q3lFuCqp1dFYEs1FoKj0jjGyOU24WOP
	 L19ogCML+vJ7fOPN/AN07pHzQuRGt+ZP5hzjApdaFKaTEezKIP+fRMVHZf9u7wpoUHZIw
	 oM+igCH3Z0s9XDzgxrZEeNsPsdHN3VSnOpvlMR/J1QXVFnMaLlASdF98lzKK6LsKL9jC7
	 wXswDMTd0bHm+L1ZWmya+Dejaz0m8UGvz+h2J0vbGehwJ5wK6p5OodIe02nEp6fTa/wKl
	 9tZWnfDTmTISh1eJIKcnvw1tTTbB3icE6pmQnli5yGSFhvek1M8WFG7xRdTxvyjrSPA==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793940476;
	h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:X-RM-TagInfo:
	 X-RM-SPAM-FLAG:Received:X-RM-TRANSID:X-RM-TagInfo:X-RM-SPAM-FLAG:
	 Received:X-RM-TRANSID:From:To:Cc:Subject:Date:Message-ID:X-Mailer:
	 X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe:
	 List-Unsubscribe:List-Owner:Precedence:MIME-Version:
	 Content-Transfer-Encoding;
	bh=DlJk8YkzI4Sc7IET8R0ZtA9MIi8qi8si9X/PTNgXjeg=;
	b=jXROnHn/WYMc6AuYZESDmRSMD0OhTGSsiCMkOVaxitSASlVIjB1GMNvJKlr7MNADuobQ
	 47lYBkuljOvQq9+gxyDvHSB5Pbn5f6aQ3DK7TPwu828Z44fTR2HHon/ei9TLK5HcbMjna
	 GKQVLua9iguCgOdvAXsfD7seENyQZUT9+uC45tbLtXys4a2EIPyLvSL4+CQBUfM5+CYt7
	 17QWVkq0WmUOcKjE852kACLA8BBufigvUdNWZUC6qniF6bCoZ8/fUIucOiRbGdjFGbSEI
	 huxJcgRoDCzGdqg9cS8mwj3ge6oDXUF3KxmYFpdbqsg3iiijd+u1xg2vawrBg8PVX1g==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=cmss.chinamobile.com header.i=@cmss.chinamobile.com header.a=rsa-sha256 header.s=default header.b=zhokTpdL;
	dmarc=pass header.from=cmss.chinamobile.com;
	spf=pass smtp.mailfrom=cmss.chinamobile.com;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id C2C3C606A328;
	Fri,  6 Nov 2026 04:47:56 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (1024-bit key, unprotected) header.d=cmss.chinamobile.com header.i=@cmss.chinamobile.com header.a=rsa-sha256 header.s=default header.b=zhokTpdL
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=111.22.67.139
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1793940466;
	b=GE1R/9RvGi9T6XNLfPhfD9GlFh5AfTOMvSqrVKcjT52Gb9Y7QWf5DXRmlEH5bWcbXUiZ
	 dDLDl1Bl9go9DBHFdAc2pzs/jX7eNJLhCj0eK1eRH4ArZYwcFH1gjJ+mMGhgLrHwT6V/0
	 bPHhCmW2d0LYTr47/y64Rti74+LLssN6vNzUFZM71rYBvEr5P1NSU9K8j2LKIC4ffh0Sg
	 2xYEvpEmzP6a2X6V+31PoP8ZWnrCpK7prxSaEbLG2DOT13GvSt/kwsjA2f+0VDIl76NcC
	 EaY1DXhXsLmfDEyLa4QIXpC2pez+N+CrGzBX8IMpRMFoGhwYMJ037Zas5irT5Trgtqw==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793940466;
	h=DMARC-Filter:DKIM-Signature:X-RM-TagInfo:X-RM-SPAM-FLAG:Received:
	 X-RM-TRANSID:X-RM-TagInfo:X-RM-SPAM-FLAG:Received:X-RM-TRANSID:From:
	 To:Cc:Subject:Date:Message-ID:X-Mailer:MIME-Version:
	 Content-Transfer-Encoding;
	bh=DlJk8YkzI4Sc7IET8R0ZtA9MIi8qi8si9X/PTNgXjeg=;
	b=srxoN1FPu2hsOwz5p5+4HgpZ5NlbqKHbeHZif1eR+HhKIzh4Pb+7ZA1j58X/N7ICPRGJ
	 lYWOEjQIMGWvRzOqlQ6wWwCd5C9k6qYvj2vQNWLe0D/vYtJTYZW8ulyWZgFLEaqjl/MaC
	 Iavbw4hrFTZws/QViLgbLiLPPsMEtmydQmwJyVUrcs4mIkemQiOHD5SAD2eLTKzr2hWTW
	 XZ4ePJnAz9BgHB3tZZJb7EGc1sXjnkgX09Q6xLg/7QdxbKJSa+Ygk5C7WweWSpOOHEp3F
	 CCsookJ/aBqKr1wLah2OyJJcaWfkn7Hz+2H+JV+QQwI1C87imqqJvdKeCPhfQp0OtIw==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=pass header.from=cmss.chinamobile.com;
	spf=pass smtp.mailfrom=cmss.chinamobile.com;
	dkim=pass header.d=cmss.chinamobile.com header.i=@cmss.chinamobile.com header.a=rsa-sha256 header.s=default header.b=zhokTpdL;
	arc=none smtp.remote-ip=111.22.67.139
X-Received: from cmccmta6.chinamobile.com (cmccmta6.chinamobile.com [111.22.67.139])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 3617C606A31B;
	Fri,  6 Nov 2026 04:47:42 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 3617C606A31B
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=cmss.chinamobile.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=cmss.chinamobile.com
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=cmss.chinamobile.com; s=default; l=0;
	h=from:subject:message-id:to:cc:mime-version;
	bh=47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=;
	b=zhokTpdLVF1Gruuw4w6n1bd7rTN74jHQ+QXghz1tcN4hy3n72GQR7wA1tapH9cu3XWxWU5y35clN9
	 exf0M/ucSe53kg9VCg0yffjbA90PzFVS7cdNl8/aivpFORMSUZSwM1JyCsTBWdR51K/jjikVyZ+mJh
	 Wgsh9NP0yUsjyWhc=
X-RM-TagInfo: emlType=0                                       
X-RM-SPAM-FLAG: 00000000
X-Received: from spf.mail.chinamobile.com (unknown[10.188.0.87])
	by rmmx-syy-dmz-app09-12009 (RichMail) with SMTP id 2ee96aed5bedf2f-b1f2a;
	Fri, 06 Nov 2026 12:47:41 +0800 (CST)
X-RM-TRANSID: 2ee96aed5bedf2f-b1f2a
X-RM-TagInfo: emlType=0                                       
X-RM-SPAM-FLAG: 00000000
X-Received: from [25.255.2.225] (unknown[10.55.1.70])
	by rmsmtp-syy-appsvr09-12009 (RichMail) with SMTP id 2ee96aed5bea254-1245f;
	Fri, 06 Nov 2026 12:47:41 +0800 (CST)
X-RM-TRANSID: 2ee96aed5bea254-1245f
X-Cc: Iyappan Subramanian <iyappan@os.amperecomputing.com>,
	Keyur Chudgar <keyur@os.amperecomputing.com>,
	Quan Nguyen <quan@os.amperecomputing.com>,
	linux-kernel@vger.kernel.org,
	xujiahao <xujiahao@cmss.chinamobile.com>
X-Mailer: git-send-email 2.43.0
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list