๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #1717

Re: [PATCH net-next 13/37] can: rcar_canfd: Do not set registers selecting the CAN mode

#1717
From: netdev-bot+sashiko
Date: Sat, 10 Oct 2026 14:02
63 lines
7782 bytes
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.

Low priority / nit picks for your consideration:

- [Low] The commit message does not match the code.

--

can: rcar_canfd: Do not set registers selecting the CAN mode

This patch adds a hardware feature flag to struct rcar_canfd_hw_info. On
RZ/G3S, which only supports CAN-FD mode, the flag makes
rcar_canfd_reset_controller() skip writing the CLOE and FDOE bits in the
channel CAN-FD configuration register. Every existing hw_info instance
now sets the new flag to 0 explicitly.

Link: https://lore.kernel.org/all/1d9719e3-10ff-4cd8-b729-55fea93c37ce@wanadoo.fr
Link: https://patch.msgid.link/20260902141544.565763-5-claudiu.beznea+renesas@tuxon.dev

> Add the mode_select_na flag in struct rcar_canfd_hw_info to cover RZ/G3S
> and avoid writing to unavailable bits.

[Severity: Low]
This isn't a bug, but the flag name in the commit message doesn't match
the code.

The patch adds this field to struct rcar_canfd_hw_info in
drivers/net/can/rcar/rcar_canfd.c:

> diff --git a/drivers/net/can/rcar/rcar_canfd.c b/drivers/net/can/rcar/rcar_canfd.c
> index f9173774387fa..ac5d5959d8e4c 100644
> --- a/drivers/net/can/rcar/rcar_canfd.c
> +++ b/drivers/net/can/rcar/rcar_canfd.c
> @@ -445,6 +445,7 @@ struct rcar_canfd_hw_info {
>  	unsigned shared_can_regs:1;	/* Has shared classical can registers */
>  	unsigned external_clk:1;	/* Has external clock */
>  	unsigned fcan_pclk:1;		/* Has fcan sourced from pclk. */
> +	unsigned fixed_canfd:1;		/* Has mode fixed to canfd. */
>  };

[ ... ]

> @@ -846,6 +852,9 @@ static int rcar_canfd_reset_controller(struct rcar_canfd_global *gpriv)
>  		}
>  
>  		/* Set the controller into appropriate mode */
> +		if (gpriv->info->fixed_canfd)
> +			continue;
> +

Both the hw_info initializers and the check in
rcar_canfd_reset_controller() use fixed_canfd. The name mode_select_na
does not appear anywhere in drivers/net/can/, either at this commit or
later in the series. It looks like the flag was renamed during review
and the commit message was not updated.

Could the commit message be updated to say fixed_canfd?

-- 
Sashiko AI review ยท https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261009134323.64064-2-mkl%40pengutronix.de
Technical Details
Message-ID: <179164097392.434549.8433276236723519282@kernel.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-344225-linux-kernel-netdev=dewy.ru
References: <20261009134323.64064-14-mkl@pengutronix.de>

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-344225-linux-kernel-netdev=dewy.ru
From: netdev-bot+sashiko@kernel.org
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next 13/37] can: rcar_canfd: Do not set registers
 selecting the CAN mode
Date: Sat, 10 Oct 2026 14:02:53 +0000
Organization: Usenet Network
Message-ID: <179164097392.434549.8433276236723519282@kernel.org>
References: <20261009134323.64064-14-mkl@pengutronix.de>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="1345510"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:Z2vQkXrIAa0LioO3qqI0FEYJy+8= sha256:Hb2xcs5JzJsXVUCFbPR6qafDFUiIOm0UXMVZAM/BG9U=
	sha1:h8ULqg0FvJBlpBMbZt5g8kgHtOY= sha256:ADoQpM/dHPVCzPRX+LsrSR0zjqcs4ByjincCmQpWglg=
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 AB7C610F8FA; Sat, 10 Oct 2026 17:05:33 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.64
X-Spam-Status: No, score=-3.64 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.241, DKIM_SIGNED=0.1,
	DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
	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 (2048-bit key)
	header.d=kernel.org
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 K4pE96fVVw_e;
	Sat, 10 Oct 2026 17:05:30 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-344225-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id BD43510F8F0; Sat, 10 Oct 2026 17:05:26 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1])
	by sea.lore.kernel.org (Postfix) with ESMTP id 97BBD3BA2A; Sat, 10 Oct 2026 14:02:56 +0000 (UTC)
X-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 11C5648E0F4;
	Sat, 10 Oct 2026 14:02:56 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="nnV7Bw8o"
X-Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18])
	(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 E6BD0491589;
	Sat, 10 Oct 2026 14:02:54 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18
X-ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1791640976; cv=none; b=lvsBuxU87sD5MVLt0yoeMwfcIkfbZs6MwS1PlFiuaLmoaZzsUZDVzE+uEq2vpGC+j239yF+gV22vCT2C1Wj/aCBOci3ahrjiovy1/UDDpsFx1DUkg9aCjn5J+ekzGm05pslkWNjL58/nTSgkT0VAzpfVyb0J0gsq6Ofrqsu5xps=
X-ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1791640976; c=relaxed/simple;
	bh=YlpiSc53nXbjuqMKgo9JNHtzC0sIkmpQ1y5f4UEoACo=;
	h=Subject:From:To:Cc:Date:Message-ID:In-Reply-To:References:
	 Content-Type:MIME-Version; b=fNIwg5oCuQHoQaLF907Jbj1LHDpWfNcvOdiVybtG2uEf/7tjB9DD1hnuuSjihiOR6ME3dPd8xiicbek0zXpmDdUWUac1T8r8jbLUQUKA86lZ1bWvdqwwssNBNPwdzfyWxi/U9XKRuSSm6KvE6euKcQ5YAMOfetPdMLfZvYcbDbc=
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=nnV7Bw8o; arc=none smtp.client-ip=100.103.45.18
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 66F0F1F000FF;
	Sat, 10 Oct 2026 14:02:54 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1791640974;
	bh=tB+ZCdWKEnk2LOSvqb0rMSPCxPS0cwOesOru7QdkXYY=;
	h=Subject:From:To:Cc:Date:In-Reply-To:References;
	b=nnV7Bw8ojOZWp579Pv3BGJJ1s6qJmToDdpL91qtHU04tXWXmqpqAj+HI0Vllvxy6W
	 gWpv11/985lNEQHcboAVdWYrLak8dnO4dUmoDYvvfCVCg0BFzN/hvj6y+3vx0jnWEi
	 5BQl3u7L0pfEW25Byqy31yn1Wh1ODCeuG+KmnkhcjcDPtM/GgnFxvRg1Nf4nYRKduF
	 LCtBLSo0FfhRyIbLKdeuJ0cHE8oSC9bLgeqKEfzw0MF52V6Ff1pF/01x7EkrHJ+R9T
	 PXU20LyBcLaX9YIUUtCCc2HsmyCf5KjJV4RgpjTv5PXUH2Wj/J74OdMOp8id7Olg89
	 KsFHP0W86hAqA==
X-Cc: netdev@vger.kernel.org, davem@davemloft.net, kuba@kernel.org,
 linux-can@vger.kernel.org, kernel@pengutronix.de, hemanth.selam@gmail.com
X-In-Reply-To: <20261009134323.64064-14-mkl@pengutronix.de>
X-sashiko-severity: Low
X-Precedence: bulk
X-Mailing-List: netdev@vger.kernel.org
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>