From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) (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 928C9221F39; Sun, 14 Dec 2025 22:31:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=156.67.10.101 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765751479; cv=none; b=jSDAQNilMdSnIKIQbPmkhbhdcAiOkraoY8yZBweAvZudnXWr8a/BCA/DKzb2OjH3hqarUpsMxbGxbsaJJIuyGx+WR6+obnhq67O4Bbjhm+ZRzix0xqqEPD1swKaSyRM3d1yQb/yShSDAKg4Lny7laU9IoYmO8lCYHz5jsJHGJ/k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765751479; c=relaxed/simple; bh=n/dhjzhd/Pp2IXEKArQf3Uz07bOuxKVxtYSTm0xXQKc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=tmrPDWw8BZQ0P5gKEujmpJ5OqHqJ9Y3IzSbVBWlPQXdx2DNV9OB2e2q3DQRBEnFcnw+BtzI83kjRb0Qe9eCd4vB8tQeTwGuxYxErXQGdU2TCFHNZZrR8O6+RZNibVQ2fzRP0kWawDZz9RQ6g7gc5XHwxpmpnsCL9Mi0BXbfO2rQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b=2rEh/LIV; arc=none smtp.client-ip=156.67.10.101 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="2rEh/LIV" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=z6fXs+IIbDChxuFtTKIP2sLb6jR6q7HS1FdEpkJpi6g=; b=2rEh/LIVp8lLB0Cmg0619HT3ME YLLfXMm8HuA25MtApqKFp1X85UfJ7fAykF9Eyig4AJuNW1FgFBmoV9/q7aiok7X3EQ1bVhljtMylJ ujYx/7ZUEo/Hz6Dzeq42dceYvih8RtSxHWeGZrY4yWA4IhDxUHx3yvbRglCvtmXq0r24=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1vUubz-00GwZz-Sv; Sun, 14 Dec 2025 23:30:43 +0100 Date: Sun, 14 Dec 2025 23:30:43 +0100 From: Andrew Lunn To: jan.petrous@oss.nxp.com Cc: Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Alexandre Torgue , Chester Lin , Matthias Brugger , Ghennadi Procopciuc , NXP S32 Linux Team , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Rob Herring , Krzysztof Kozlowski , Conor Dooley , netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev, devicetree@vger.kernel.org Subject: Re: [PATCH RFC 1/4] net: stmmac: platform: read channels irq Message-ID: References: <20251214-dwmac_multi_irq-v1-0-36562ab0e9f7@oss.nxp.com> <20251214-dwmac_multi_irq-v1-1-36562ab0e9f7@oss.nxp.com> Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20251214-dwmac_multi_irq-v1-1-36562ab0e9f7@oss.nxp.com> On Sun, Dec 14, 2025 at 11:15:37PM +0100, Jan Petrous via B4 Relay wrote: > From: "Jan Petrous (OSS)" > > Read IRQ resources for all channels, to allow multi IRQ mode > for platform glue drivers. > > Signed-off-by: Jan Petrous (OSS) > --- > .../net/ethernet/stmicro/stmmac/stmmac_platform.c | 38 +++++++++++++++++++++- > 1 file changed, 37 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c > index 8979a50b5507..29e40253bdfe 100644 > --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c > +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c > @@ -700,6 +700,9 @@ EXPORT_SYMBOL_GPL(stmmac_pltfr_find_clk); > int stmmac_get_platform_resources(struct platform_device *pdev, > struct stmmac_resources *stmmac_res) > { > + int i; > + char name[8]; Reverse Christmas tree please. > memset(stmmac_res, 0, sizeof(*stmmac_res)); > > /* Get IRQ information early to have an ability to ask for deferred > @@ -743,7 +746,40 @@ int stmmac_get_platform_resources(struct platform_device *pdev, > > stmmac_res->addr = devm_platform_ioremap_resource(pdev, 0); > > - return PTR_ERR_OR_ZERO(stmmac_res->addr); > + if (IS_ERR(stmmac_res->addr)) > + return PTR_ERR(stmmac_res->addr); > + > + /* RX channels irq */ > + for (i = 0; i < MTL_MAX_RX_QUEUES; i++) { > + scnprintf(name, 8, "rx-queue-%d", i); It would be better to use sizeof(name), not 8. Also, 'rx-queue-' is 9 characters. So i don't see how this can actually work? Andrew