🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #19653

Re: [PATCH net-next v5 11/24] net: dsa: rzn1-a5psw: Set driver data in probe

#19653
From: Clement Leger
Date: Fri, 20 Nov 2026 06:53
43 lines
9975 bytes

On 11/20/26 01:25, Prabhakar wrote:
> From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> 
> a5psw_remove() and a5psw_shutdown() retrieve the driver private data
> using platform_get_drvdata(), but a5psw_probe() never sets it.
> Consequently, both callbacks return early without unregistering or
> shutting down the DSA switch.
> 
> Set the driver data in probe to ensure the remove and shutdown
> callbacks can access the private data and perform the required DSA
> cleanup.
> 
> Fixes: 888cdb892b61 ("net: dsa: rzn1-a5psw: add Renesas RZ/N1 advanced 5 port switch driver")
> Cc: stable@vger.kernel.org
> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> ---
> v4->v5:
> - New patch
> ---
>   drivers/net/dsa/rzn1_a5psw.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/net/dsa/rzn1_a5psw.c b/drivers/net/dsa/rzn1_a5psw.c
> index df3b3f75b489..0e4bbf34ec27 100644
> --- a/drivers/net/dsa/rzn1_a5psw.c
> +++ b/drivers/net/dsa/rzn1_a5psw.c
> @@ -1221,6 +1221,7 @@ static int a5psw_probe(struct platform_device *pdev)
>   	if (!a5psw)
>   		return -ENOMEM;
>   
> +	platform_set_drvdata(pdev, a5psw);
>   	a5psw->dev = dev;
>   	mutex_init(&a5psw->lk_lock);
>   	spin_lock_init(&a5psw->reg_lock);

Reviewed-by: Clément Léger <clement.leger@linux.dev>

Thanks,

Clément
Technical Details
Message-ID: <77d4edbe-b4fc-480c-860b-5880fbd807ea@linux.dev>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-367719-linux-kernel-netdev=dewy.ru
References: <20261120002549.1908299-1-prabhakar.mahadev-lad.rj@bp.renesas.com> <20261120002549.1908299-12-prabhakar.mahadev-lad.rj@bp.renesas.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-367719-linux-kernel-netdev=dewy.ru
From: clement.leger@linux.dev (Clement Leger)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next v5 11/24] net: dsa: rzn1-a5psw: Set driver data
 in probe
Date: Fri, 20 Nov 2026 07:53:35 +0100
Organization: Usenet Network
Message-ID: <77d4edbe-b4fc-480c-860b-5880fbd807ea@linux.dev>
References: <20261120002549.1908299-1-prabhakar.mahadev-lad.rj@bp.renesas.com>
 <20261120002549.1908299-12-prabhakar.mahadev-lad.rj@bp.renesas.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="3086959"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:HkIQ6q1I9XSNQiUbdhbbXOByB54= sha256:q7LXs24zjAG3OzcQQ6GtZsOm0uJqNJiOIUjvETY80+o=
	sha1:BfyjQH9mpRxUFQrUGsvktmSfRCk= sha256:TrzqCyMtGr68yotmdWMSH/iYFbW65TcEtROLeISR13o=
Content-Language: en-US
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 E11D31158D6; Fri, 20 Nov 2026 09:53:55 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.15
X-Spam-Status: No, score=-3.15 tagged_above=-9999 required=6.31
	tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-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,
	URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (1024-bit key)
	header.d=linux.dev
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 htY4QKBzh3La;
	Fri, 20 Nov 2026 09:53:48 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=netdev+bounces-367719-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=linux.dev
X-Received: from sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74])
	by mail.dewy.ru (Postfix) with ESMTPS id D24B71158D2; Fri, 20 Nov 2026 09:53:40 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sto.lore.kernel.org (Postfix) with ESMTP id 7729A6262F0; Fri, 20 Nov 2026 06:53:40 +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=1795157619;
	b=4P2wkfkngb1N6uUQwnf3Eocvf3IB7N3VSSIXd7HJ66brUmVqCYTjpDRxP6/iy8l+nYqL
	 V/AbmxayLLbIw73hsZyYBEdTcEjcsCkNqAotE6ERTDnnPmW4c1Q63ReH3BrR+m0tFG52Z
	 nXfZnlUTXslSD96I7SuM7LQBUPo613PxXElS4MBYnh7yEgAzFv3Va7sRFm5HTjDoYkShp
	 /L39vdH7AvY01hOAW5WTKiYuWB8OOKaCPuxrHJ1rk5RtBiqWq5kHPbF5g8SS5X+XbpSnq
	 fp1hEqpMriF9DoNWyVw4+AB/nLj+XyXw3OEL8O2lTGjiVl73SBgD3AlJ5idtY6Shd9w==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795157619;
	h=X-Original-To:Received:DMARC-Filter:X-Envelope-To:DKIM-Signature:
	 X-Envelope-To:Received:X-Mizu-Trace-ID:X-Migadu-Flow:Message-ID:Date:
	 X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe:
	 List-Unsubscribe:List-Owner:Precedence:MIME-Version:User-Agent:
	 Subject:To:Cc:References:Content-Language:From:In-Reply-To:
	 Content-Type:Content-Transfer-Encoding;
	bh=/5mED0zlZbWclf6hKMztAT43+oQHdLuqWKYHDbNLEWs=;
	b=U8+yXGMCLlq/XeKXWGkiZj0y6dkUAqk/omFjBa3mvKY4se/h3VvjXgGqY6JsHknRDjAt
	 TJ7FusPL5swtOSXG/qdlTtpr3I0w0Mmnk16VN3gmJaKiHxb1iONugzs8sRMXmmYWdadF6
	 1jhdUIXmeP7tf/kInTyMUBwCEu3lq+fAxACcW8uSR2ZKDWb/n9Y7e8RAuWnLCYOAAGbnE
	 D2dkLtncqXMRuJtSKILYG4WcGIHQUjYyYDAEXkHMI4z/Vuupf5MUiFkaCljYjoEf+31rZ
	 zpx6Rt4nu6YECMJRkFody8+Znw8ZKDzQRolkQwhRIG3r2o9BLMJd6rZFVADbjCwwlEg==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=asPFejUS;
	dmarc=pass header.from=linux.dev;
	spf=pass smtp.mailfrom=linux.dev;
	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 A83F0606A338;
	Fri, 20 Nov 2026 06:53:39 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (1024-bit key, unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=asPFejUS
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=95.215.58.220
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1795157618;
	b=D3JiAKgKaxhIrxwD6b5hN+NRDcKh0hVKlt7QjgiDVddXJ+kVAezF413K2PlQj3QqMoZW
	 Ura8BWtlqcA4131F4Q7jAxWEnmXLlIa/V2+Wb18l7or09xvvj+Vx2YfCr0EWBPWb94AfQ
	 vCUuLhG/6I5e5ma1IR1zLdHRYqgfMF/IF4zYkPvZ8XyfeuJwBZfsWuc8bl0XSArIqlNU8
	 8rYvmF6gH1CVkE78Nqy10TEMu4pqPe1erf4XpmaA4yFVnfpWDqltBYmHYws6jStBd3oHl
	 /1aadXDj+AMeCnXUeSu/nq39AT7T87J6XRpGS3ehcHqlkG/7w5ZVeahHoVPbMuOcdIg==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795157618;
	h=DMARC-Filter:X-Envelope-To:DKIM-Signature:X-Envelope-To:Received:
	 X-Mizu-Trace-ID:X-Migadu-Flow:Message-ID:Date:MIME-Version:User-Agent:
	 Subject:To:Cc:References:Content-Language:From:In-Reply-To:
	 Content-Type:Content-Transfer-Encoding;
	bh=/5mED0zlZbWclf6hKMztAT43+oQHdLuqWKYHDbNLEWs=;
	b=gaS69XPYE/0MBVs2O+EzqsRZQauCP3JeanKtDj85cUwj1KFK8sTfN4AaLSWnmaXznryx
	 2EbTJbgUo9SL5Mc10Hcq+528YFmaX2NyNv5BsDedWqKgcZQDG8g52gEqVO13/RFBCOA6E
	 0vR2VFhwlvRdSnIdTSyRZ8PYCzi80ihNZfBW7z3QBdh9v0Rlg5Z/AeN+3K641NuBnGyId
	 c5nox1Kg7shxHsjQnbQcHtIb3wE8RUwNkWt3xvKy2hY/kMyq6sfqA7m8iLerKtHu7MkM3
	 mlLbthdVSNrkV+3XQPQ0rHQ+tIeNo/aWbIE4boLdtnsMkP7kmxZcHXjqDNBMjO50p0w==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=pass header.from=linux.dev;
	spf=pass smtp.mailfrom=linux.dev;
	dkim=pass header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=asPFejUS;
	arc=none smtp.remote-ip=95.215.58.220
X-Received: from mta1.migadu.com (out-220.mta1.migadu.com [95.215.58.220])
	(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3F0C6606A32A
	for <netdev@vger.kernel.org>; Fri, 20 Nov 2026 06:53:37 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 3F0C6606A32A
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev
X-Envelope-To: netdev@vger.kernel.org
X-DKIM-Signature: a=rsa-sha256; bh=/1Qnc6yuGP8/bJRwORfaWD/9W6hWPIsUbF/BQQzaA7M=;
 c=simple/simple; d=linux.dev;
 h=from:to:subject:date:message-id:mime-version:content-type; s=key1;
 t=1795157616; v=1; x=1795762416;
 b=asPFejUSo4rwADv4+XgGNJxilMmZN3T+sCQ9Ov161PWTh4+IPJpEd1qWKXUfmSZ9N5o2vsiK
 dhA6xanVXGMADfwPHMEAjEEy5cwLwdaRJgKZhS07ABKPCnj2nTGcKpUvZExqjFs3U/SEfF2rMPn
 s+P8XN6rcg6l1DjhY/Y8g4vE=
X-Envelope-To: netdev@vger.kernel.org
X-Received: by smtp.migadu.com with ESMTPS id d7c91ca9ef99ff3a;
	Fri, 20 Nov 2026 06:53:36 +0000
X-Mizu-Trace-ID: d7c91ca9ef99ff3a
X-Migadu-Flow: FLOW_OUT
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
X-User-Agent: Mozilla Thunderbird
X-Cc: Florian Fainelli <f.fainelli@gmail.com>,
 Ralph Siemsen <ralph.siemsen@linaro.org>, linux-renesas-soc@vger.kernel.org,
 netdev@vger.kernel.org, devicetree@vger.kernel.org,
 Prabhakar <prabhakar.csengg+renesas@gmail.com>,
 Biju Das <biju.das.jz@bp.renesas.com>,
 Fabrizio Castro <fabrizio.castro.jz@renesas.com>,
 Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>,
 stable@vger.kernel.org
X-In-Reply-To: <20261120002549.1908299-12-prabhakar.mahadev-lad.rj@bp.renesas.com>