From: netdev-bot+sashiko@kernel.org
To: kyle.switch@motor-comm.com
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
Subject: Re: [PATCH net-next v11 3/7] net: dsa: motorcomm: use fixed-width GENMASK_U*() helpers
Date: Tue, 06 Oct 2026 18:44:05 +0000 [thread overview]
Message-ID: <179131224591.434549.13716645949884608730@kernel.org> (raw)
In-Reply-To: <20261002173706.1225502-4-kyle.switch@motor-comm.com>
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 says what the patch does but not why, and its
wording claims more than the patch does.
--
net: dsa: motorcomm: use fixed-width GENMASK_U*() helpers
This commit switches the GENMASK() call sites in chip.c and mdio_bus.c to
the fixed-width GENMASK_U16() and GENMASK_U32() helpers. The converted
values are unchanged, so the patch has no runtime effect.
> Replace the plain GENMASK() uses with the fixed-width GENMASK_U16()
> and GENMASK_U32() variants.
> diff --git a/drivers/net/dsa/motorcomm/chip.c b/drivers/net/dsa/motorcomm/chip.c
> index 79422def16ffb..13fc286d4194b 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),
> },
[ ... ]
[Severity: Low]
This isn't a bug, but does the commit message match what the patch does?
"Replace the plain GENMASK() uses" reads as if every plain GENMASK() in
the driver is converted. Only six call sites in chip.c and mdio_bus.c
change.
After this patch, drivers/net/dsa/motorcomm/ still has 153 plain GENMASK()
uses: 133 in chip.h, 16 in leds.h and 4 in mdio_bus.h. The mdio_bus.h ones
are the field masks for the mdio_bus.c file this patch edits:
drivers/net/dsa/motorcomm/mdio_bus.h:
#define YT921X_MBUS_CTRL_PORT_M GENMASK(25, 21)
#define YT921X_MBUS_CTRL_REG_M GENMASK(20, 16)
...
Even inside yt921x_infos[], only the GENMASK() values for the u16
internal_mask field are converted. The BIT() values for xmii_mask and
serdes_mask, which are also u16, stay as unsigned long BIT() constants.
So does internal_mask for YT9214NB and YT9213NB:
{
"YT9214NB", YT9215_MAJOR, 3, 2,
BIT(1) | BIT(3),
BIT(9),
BIT(8),
},
include/linux/bits.h already has BIT_U16() and BIT_U32() for these.
The later YT922x patch in this series ("net: dsa: motorcomm: Add support
for Motorcomm YT922x") also adds new plain GENMASK() defines to chip.h,
such as YT922X_PORT_SPEED_M and YT922X_SERDES_MODE_M. That means the
series never finishes the conversion.
Could the commit message explain why this conversion is wanted and why it
stops at these call sites? Could it also say that there is no functional
change?
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261002173706.1225502-1-kyle.switch%40motor-comm.com
next prev parent reply other threads:[~2026-10-06 18:44 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-02 17:36 [PATCH net-next v11 0/7] net: dsa: motorcomm: add support yt922x driver Kyle Switch
2026-10-02 17:37 ` [PATCH net-next v11 1/7] net: dsa: motorcomm: initialize dsa_switch based on chipid Kyle Switch
2026-10-06 18:44 ` netdev-bot+sashiko
2026-10-02 17:37 ` [PATCH net-next v11 2/7] net: dsa: motorcomm: use max_ports in series for port bounds checking Kyle Switch
2026-10-02 17:37 ` [PATCH net-next v11 3/7] net: dsa: motorcomm: use fixed-width GENMASK_U*() helpers Kyle Switch
2026-10-06 18:44 ` netdev-bot+sashiko [this message]
2026-10-02 17:37 ` [PATCH net-next v11 4/7] net: dsa: motorcomm: move mib start from probe() to dsa_setup() Kyle Switch
2026-10-06 18:44 ` netdev-bot+sashiko
2026-10-02 17:37 ` [PATCH net-next v11 5/7] net: dsa: motorcomm: move mib stop from remove() to teardown() Kyle Switch
2026-10-06 18:44 ` netdev-bot+sashiko
2026-10-02 17:37 ` [PATCH net-next v11 6/7] net: dsa: tag_yt922x: add support for Motorcomm YT922x tags Kyle Switch
2026-10-06 18:44 ` netdev-bot+sashiko
2026-10-02 17:37 ` [PATCH net-next v11 7/7] net: dsa: motorcomm: Add support for Motorcomm YT922x Kyle Switch
2026-10-06 18:44 ` netdev-bot+sashiko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=179131224591.434549.13716645949884608730@kernel.org \
--to=netdev-bot+sashiko@kernel.org \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=jianmin.wang@motor-comm.com \
--cc=kuba@kernel.org \
--cc=kyle.switch@motor-comm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=ming.xu@motor-comm.com \
--cc=mmyangfl@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
--cc=sijia.huang@gl-inet.com \
--cc=wei.zhang@gl-inet.com \
--cc=xiaolin.xu@motor-comm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®