๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #6268

Re: [PATCH net-next v16 3/5] net: dsa: motorcomm: use fixed-width GENMASK_U*() helpers

#6268
From: netdev-bot+sashiko
Date: Thu, 22 Oct 2026 02:11
76 lines
11048 bytes
Thank you for your contribution! Sashiko AI review found 1 potential
issue(s) to consider.

Critical: 0 ยท High: 0 ยท Medium: 1 ยท Low: 0

If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).

- [Medium] The commit message for "net: dsa: motorcomm: use fixed-width
  GENMASK_U*() helpers" does not match the diff, in three ways.

--

net: dsa: motorcomm: use fixed-width GENMASK_U*() helpers

This commit changes two GENMASK() uses in the YT921x DSA driver to
GENMASK_U32(): the FILTER_UNK value in yt921x_chip_setup_dsa(), and the
mii_bus phy_mask in yt921x_mbus_int_init(). The commit message describes
it as a type-only cleanup with no functional change.

> Some masks assigned to u16 and u32 fields are defined with
> GENMASK(),which is an unsigned long constant and wider than
> the field type on 64-bit builds. Convert the YT921X_MBUS_CTRL_*
> masks used by mdio_bus.c to fixed-width helpers.
>
> This is a type cleanup only, with no functional change. Other
> GENMASK() uses in the driver are intentionally left untouched.

[Severity: Medium]
Does this description match the diff?

The patch doesn't modify drivers/net/dsa/motorcomm/mdio_bus.h, and the
YT921X_MBUS_CTRL_* masks there still use plain GENMASK():

#define  YT921X_MBUS_CTRL_PORT_M		GENMASK(25, 21)
#define  YT921X_MBUS_CTRL_REG_M			GENMASK(20, 16)
#define  YT921X_MBUS_CTRL_TYPE_M		GENMASK(11, 8)  /* wild guess */
#define  YT921X_MBUS_CTRL_OP_M			GENMASK(3, 2)  /* wild guess */

They are still combined into u32 locals in yt921x_intif_read(),
yt921x_intif_write(), yt921x_extif_read() and yt921x_extif_write(). For
example:

	mask = YT921X_MBUS_CTRL_PORT_M | YT921X_MBUS_CTRL_REG_M |
	       YT921X_MBUS_CTRL_OP_M;

The only change in mdio_bus.c is the phy_mask expression in
yt921x_mbus_int_init(), and that is not a YT921X_MBUS_CTRL_* mask:

	mbus->phy_mask = ~GENMASK_U32(max_ports - 1, 0);

Later patches in the series don't seem to convert these masks either.

The message also says other GENMASK() uses are left untouched, but the
patch changes the open-coded value in yt921x_chip_setup_dsa() in chip.c:

	ctrl = GENMASK_U32(10, 0);
	res = yt921x_reg_write(priv, YT921X_FILTER_UNK_UCAST, ctrl);

The message doesn't mention this change. The named mask for the same
field, YT921X_FILTER_PORTS_M in chip.h, is still GENMASK(10, 0).

Both changed sites are u32, so the reference to "u16 and u32 fields"
doesn't match the diff either.

The message may describe a different version of this patch. Could it be
rewritten to describe the two conversions that are actually made? The
other option would be to convert the mdio_bus.h masks as described, and
then drop or explain the chip.c hunk.

-- 
Sashiko AI review ยท https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261020111115.3072180-1-kyle.switch%40motor-comm.com
Technical Details
Message-ID: <179263508406.3135.842025919352184457@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-350345-linux-kernel-netdev=dewy.ru
References: <20261020111115.3072180-4-kyle.switch@motor-comm.com>

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-350345-linux-kernel-netdev=dewy.ru
From: netdev-bot+sashiko@kernel.org
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next v16 3/5] net: dsa: motorcomm: use fixed-width
 GENMASK_U*() helpers
Date: Thu, 22 Oct 2026 02:11:24 +0000
Organization: Usenet Network
Message-ID: <179263508406.3135.842025919352184457@kernel.org>
References: <20261020111115.3072180-4-kyle.switch@motor-comm.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="110799"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:6oy3N3Vv7TCHbUQUf0eeA6ge7uw= sha256:P8pKZON0wvMXddUxfRNjhgbkHbzcVJ2LMgNdXqtA/34=
	sha1:5czgxVW06bA3VQ9G1dDtz2KIZYg= sha256:agXgRIJYUKSJ3tcVFASA450cQnvpaNJC8/B3oTFFRTg=
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 90120111180; Thu, 22 Oct 2026 05:14:50 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.4
X-Spam-Status: No, score=-3.4 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.001, 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 FbTynlD2sL3j;
	Thu, 22 Oct 2026 05:14:47 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-350345-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 35897111167; Thu, 22 Oct 2026 05:14:39 +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 C5CCA3B7D1; Thu, 22 Oct 2026 02:11:31 +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=1792635091;
	b=MYOUHqwfn/Udh9oJRi9ewGVfvdERwUzmxGont+LvZc1nN4tKH5i1lyj4Xq1zpe1V1VFi
	 qDGPSUqB36sVWEKWaZyT7wuCuqYSF3l1u/qvwg/2yur7yBvGaH52Vqvghi4sfgh2MtnDF
	 nbdQnUBnL0yqqvx8VNlrXpMdJg8hS7Axm/Kx/h20OA0XujCD6UnDp4BVz6+V3bcxN8JjO
	 l6DZ1xiAX5OWxcJgZnwMYCulUWpS0K//rQqYqI8iYsn8hl50itD9WTXb/q2rCY0fKGCPP
	 CH740IDhe7vVJj72eeW8+PwtuxFguJ/qj7w46kH/yKEnGu0ekMi4UPHb1r9Tui4e+2w==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792635091;
	h=X-Original-To:Received:Received:DKIM-Signature:Subject:From:To:Cc:
	 Date:Message-ID:In-Reply-To:References:X-sashiko-severity:
	 Content-Type:Content-Transfer-Encoding:X-Mailing-List:List-Id:
	 List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner:
	 Precedence:MIME-Version;
	bh=auptAOYLlT7TARSAwJhMjYGyHIhmiPBoj76ZVpTPfkA=;
	b=J/x+IezcrayBP7PrsU1SM2XP512v/zUUbHuLh339acx+yg/ez8L78whgpq9HEIkGtmkU
	 bruuirKJoWH3B9jyUxJiMAe427gwwQ8CAtqFL7Bi2ufLVl8E7h2Nt7D5VMGp4k9J5/k4A
	 PH+U1SHwJG8zzLE3NY337yWkrls+jL8Ewk+8qdWwolaBFup5S98+jH7P48b244a08uprz
	 W2DWH6XLlACnbZcqFLz6TY2yywEnpY21iaQYy8p+bj4o2nMQhvy02c1JugdiqPkGe/rH6
	 80vYRgwkMt+Z7lYwsUTP0Is2sXZGkoklLmIY2DBuliEQZpIVWiEfs1h5O/NbVCQ9cjw==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=jbBvCW29;
	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 9D7B1606A320;
	Thu, 22 Oct 2026 02:11:31 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=jbBvCW29
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1792635085;
	b=wgyFOf43cx8GZTJFxNsdWv/s4ddUVMt/mC7l34BbrdoHdApxxaBi2qwNBykJr/9l2e+6
	 kT96BNNxJeMf9vTOgHGruTHs19YCm87zNIZOjINUvLtHomdA8/l2OlvA90N+ze7OXxLn1
	 rd6vzvXAhaNc5219aEv9emWKsCCCsethouIm9sK2PqkWcC9YAh5NhcYL0JJ4lsztXiot5
	 NomepRqZ6ltOC8hZJf0AGIEC46sSriY/YMSMPcJd4PIeSSJYdhwGB5TiMgqi/BhwjsGpS
	 NlJeDBVnCnZXx6hoVONYQjzNjfSSavkg/kE1mhIBKWEatrMRe/65t4gmuShoYzNAObQ==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792635085;
	h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID:
	 In-Reply-To:References:X-sashiko-severity:Content-Type:
	 Content-Transfer-Encoding:MIME-Version;
	bh=auptAOYLlT7TARSAwJhMjYGyHIhmiPBoj76ZVpTPfkA=;
	b=EC5SrUywT9HDMXSL4a58TY5LzmYLlPe2YBqt2luTMCn/bwRykVrCiNbdZE8wbJIkPLLW
	 3KEknbTDn0Lm0j4HxVKvP3S9vnf9XwoIjDTenX3y05SYIkFweeb5RGM6UIeEY4/3CccAo
	 Vscad9RRW446YYmGQjB32T2FfHfkesTbn8k0/t5cy/mMZkvOlt+Wo4z6VD2YqWQvLiD3a
	 Bd4Jd4N5Etg+lXQ65xLbAcpa8fB+eg8NwooFZdX4iMzzQb0EcPMX4wzckmi6xU/N9cGyS
	 IyJw5WEV2+DbvJ+q7YlETUCSkrkhhMEbWBAjbbHEC5lLEvnuPuNDYuRJs28N/1rxyeQ==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=jbBvCW29;
	arc=none smtp.remote-ip=100.103.45.18
X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 83D86606A31E;
	Thu, 22 Oct 2026 02:11:25 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7BC1F1F000C2;
	Thu, 22 Oct 2026 02:11:24 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1792635085;
	bh=auptAOYLlT7TARSAwJhMjYGyHIhmiPBoj76ZVpTPfkA=;
	h=Subject:From:To:Cc:Date:In-Reply-To:References;
	b=jbBvCW29Ars2ITitkCDMi9Wi3YvKH504taXn3iFjh4y8wjlBh8qfNQvC7j8xYR+JM
	 fC1G/Wawa3al9+64HYfN5mxZh191BHVbwYSMbuCYD1D43ur3nrX6ssal7CCZ83f8Fp
	 75GojiHxjocnpSx9Xpbe/fbYY1uqwWwcKqahZSkJinIFYU9laDB0ESSTgKFkEYUphy
	 H3+H0gY8HNGdt21zWcxspzQD7WFerGDC3Nn1Q8KEvfHufST64LO1zhPxQn/mrCJjdx
	 PK4004yyTw7lp8MOIrTmRUP53W+a+iJCz0+oACvDs2fjkXPofy8WPWnOrmEu/8m17p
	 0tpMiebWnc0/w==
X-Cc: andrew@lunn.ch, olteanv@gmail.com, davem@davemloft.net,
 edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, mmyangfl@gmail.com,
 horms@kernel.org, linux@armlinux.org.uk, netdev@vger.kernel.org,
 linux-kernel@vger.kernel.org, ming.xu@motor-comm.com,
 xiaolin.xu@motor-comm.com, jianmin.wang@motor-comm.com, wei.zhang@gl-inet.com,
 sijia.huang@gl-inet.com
X-In-Reply-To: <20261020111115.3072180-4-kyle.switch@motor-comm.com>
X-sashiko-severity: Medium
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