From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out28-77.mail.aliyun.com (out28-77.mail.aliyun.com [115.124.28.77]) (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 923283D9020; Tue, 29 Sep 2026 02:59:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.124.28.77 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790650795; cv=none; b=GC7KUqvkiKe2/7totygAYl5eTAB/FZeFvUwMhDukXml7vx31BpTCpQ+kU09DfoKSXL+8EKnnSBezhPWZSwx98+XArCCUS8DyvWboyHQQsfrSmTlt8njUM8bhA2dqdO+8mcpeks5w6NSHXfur5AgkBtsKpspWdsWd9++EiM1O09k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790650795; c=relaxed/simple; bh=IBDv8+BMy3dt9kr7KFiHxbSxPzp4r0YYk23asXZz7w8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=T5o2P/eKzJUxVLgW7W0dFQjfTJwDUziUA+B1bzPzQeLL1yXKE8+ukAoXqctvfMly2FDKi/8mVjFTvNHGORvGN1hucwhhJIlcCJPxH3oA5+lcQdMiaRfepZttDPfbNy/opmo0DfNk3S7l+t2Y35RGMiqcWL5fy/j8p0q0qbUHAeI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=motor-comm.com; spf=pass smtp.mailfrom=motor-comm.com; arc=none smtp.client-ip=115.124.28.77 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=motor-comm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=motor-comm.com X-Alimail-AntiSpam:AC=CONTINUE;BC=0.1463734|-1;CH=green;DM=|CONTINUE|false|;DS=CONTINUE|ham_system_inform|0.011701-0.000248947-0.98805;FP=12062793150581313156|1|1|9|0|-1|-1|-1;HT=maildocker-contentspam033037031241;MF=kyle.switch@motor-comm.com;NM=1;PH=DS;RN=16;RT=16;SR=0;TI=SMTPD_---.jQghbt4_1790650468; Received: from motor-comm.com(mailfrom:kyle.switch@motor-comm.com fp:SMTPD_---.jQghbt4_1790650468 cluster:ay29) by smtp.aliyun-inc.com; Tue, 29 Sep 2026 10:54:29 +0800 From: Kyle Switch To: 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 Cc: 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 Subject: [PATCH net-next v10 3/7] net: dsa: motorcomm: use fixed-width GENMASK_U*() helpers Date: Tue, 29 Sep 2026 10:54:10 +0800 Message-Id: <20260929025414.313641-5-kyle.switch@motor-comm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20260929025414.313641-1-kyle.switch@motor-comm.com> References: <20260929025414.313641-1-kyle.switch@motor-comm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Replace the plain GENMASK() uses with the fixed-width GENMASK_U16() and GENMASK_U32() variants. Signed-off-by: Kyle Switch --- drivers/net/dsa/motorcomm/chip.c | 12 ++++++------ drivers/net/dsa/motorcomm/mdio_bus.c | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/net/dsa/motorcomm/chip.c b/drivers/net/dsa/motorcomm/chip.c index 79422def16ff..13fc286d4194 100644 --- a/drivers/net/dsa/motorcomm/chip.c +++ b/drivers/net/dsa/motorcomm/chip.c @@ -101,19 +101,19 @@ static const struct yt921x_mib_desc yt921x_mib_descs[] = { static const struct yt921x_info yt921x_infos[] = { { "YT9215SC", YT9215_MAJOR, 1, 0, - GENMASK(4, 0), + GENMASK_U16(4, 0), BIT(9), BIT(8) | BIT(9), }, { "YT9215S", YT9215_MAJOR, 2, 0, - GENMASK(4, 0), + GENMASK_U16(4, 0), BIT(9), BIT(8), }, { "YT9215RB", YT9215_MAJOR, 3, 0, - GENMASK(4, 0), + GENMASK_U16(4, 0), BIT(8) | BIT(9), 0, }, @@ -131,13 +131,13 @@ static const struct yt921x_info yt921x_infos[] = { }, { "YT9218N", YT9218_MAJOR, 0, 0, - GENMASK(7, 0), + GENMASK_U16(7, 0), 0, 0, }, { "YT9218MB", YT9218_MAJOR, 1, 0, - GENMASK(7, 0), + GENMASK_U16(7, 0), BIT(8) | BIT(9), BIT(8) | BIT(9), }, @@ -4061,7 +4061,7 @@ static int yt921x_chip_setup_dsa(struct yt921x_priv *priv) if (res) return res; - ctrl = GENMASK(10, 0); + ctrl = GENMASK_U32(10, 0); res = yt921x_reg_write(priv, YT921X_FILTER_UNK_UCAST, ctrl); if (res) return res; diff --git a/drivers/net/dsa/motorcomm/mdio_bus.c b/drivers/net/dsa/motorcomm/mdio_bus.c index c5a0f1bc1e36..1ac6a94f4f9d 100644 --- a/drivers/net/dsa/motorcomm/mdio_bus.c +++ b/drivers/net/dsa/motorcomm/mdio_bus.c @@ -161,7 +161,7 @@ int yt921x_mbus_int_init(struct yt921x_priv *priv, struct device_node *mnp) mbus->write = yt921x_mbus_int_write; mbus->parent = dev; max_ports = priv->series->max_ports; - mbus->phy_mask = (u32)~GENMASK(max_ports - 1, 0); + mbus->phy_mask = ~GENMASK_U32(max_ports - 1, 0); res = devm_of_mdiobus_register(dev, mbus, mnp); if (res) -- 2.25.1