From: David Yang <mmyangfl@gmail.com>
To: netdev@vger.kernel.org
Cc: David Yang <mmyangfl@gmail.com>, Andrew Lunn <andrew@lunn.ch>,
Vladimir Oltean <olteanv@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Russell King <linux@armlinux.org.uk>,
linux-kernel@vger.kernel.org
Subject: [PATCH net-next v2 1/8] net: dsa: motorcomm: Remove YT921X_PORT_MASK_* macros
Date: Thu, 17 Sep 2026 00:43:01 +0800 [thread overview]
Message-ID: <20260916164310.3168269-2-mmyangfl@gmail.com> (raw)
In-Reply-To: <20260916164310.3168269-1-mmyangfl@gmail.com>
Remove YT921X_PORT_MASK_* macros since they are only thin wrappers
around BIT() and GENMASK() and are not used in other places (plain BIT()
and GENMASK() are used there). No functional change.
Signed-off-by: David Yang <mmyangfl@gmail.com>
---
drivers/net/dsa/motorcomm/chip.c | 31 +++++++++++++------------------
1 file changed, 13 insertions(+), 18 deletions(-)
diff --git a/drivers/net/dsa/motorcomm/chip.c b/drivers/net/dsa/motorcomm/chip.c
index d663af010f43..5acd7d27ff40 100644
--- a/drivers/net/dsa/motorcomm/chip.c
+++ b/drivers/net/dsa/motorcomm/chip.c
@@ -108,46 +108,41 @@ struct yt921x_info {
u16 external_mask;
};
-#define YT921X_PORT_MASK_INTn(port) BIT(port)
-#define YT921X_PORT_MASK_INT0_n(n) GENMASK((n) - 1, 0)
-#define YT921X_PORT_MASK_EXT0 BIT(8)
-#define YT921X_PORT_MASK_EXT1 BIT(9)
-
static const struct yt921x_info yt921x_infos[] = {
{
"YT9215SC", YT9215_MAJOR, 1, 0,
- YT921X_PORT_MASK_INT0_n(5),
- YT921X_PORT_MASK_EXT0 | YT921X_PORT_MASK_EXT1,
+ GENMASK(4, 0),
+ BIT(8) | BIT(9),
},
{
"YT9215S", YT9215_MAJOR, 2, 0,
- YT921X_PORT_MASK_INT0_n(5),
- YT921X_PORT_MASK_EXT0 | YT921X_PORT_MASK_EXT1,
+ GENMASK(4, 0),
+ BIT(8) | BIT(9),
},
{
"YT9215RB", YT9215_MAJOR, 3, 0,
- YT921X_PORT_MASK_INT0_n(5),
- YT921X_PORT_MASK_EXT0 | YT921X_PORT_MASK_EXT1,
+ GENMASK(4, 0),
+ BIT(8) | BIT(9),
},
{
"YT9214NB", YT9215_MAJOR, 3, 2,
- YT921X_PORT_MASK_INTn(1) | YT921X_PORT_MASK_INTn(3),
- YT921X_PORT_MASK_EXT0 | YT921X_PORT_MASK_EXT1,
+ BIT(1) | BIT(3),
+ BIT(8) | BIT(9),
},
{
"YT9213NB", YT9215_MAJOR, 3, 3,
- YT921X_PORT_MASK_INTn(1) | YT921X_PORT_MASK_INTn(3),
- YT921X_PORT_MASK_EXT1,
+ BIT(1) | BIT(3),
+ BIT(9),
},
{
"YT9218N", YT9218_MAJOR, 0, 0,
- YT921X_PORT_MASK_INT0_n(8),
+ GENMASK(7, 0),
0,
},
{
"YT9218MB", YT9218_MAJOR, 1, 0,
- YT921X_PORT_MASK_INT0_n(8),
- YT921X_PORT_MASK_EXT0 | YT921X_PORT_MASK_EXT1,
+ GENMASK(7, 0),
+ BIT(8) | BIT(9),
},
{}
};
--
2.53.0
next prev parent reply other threads:[~2026-09-16 16:43 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-16 16:43 [PATCH net-next v2 0/8] net: dsa: motorcomm: Add SerDes PCS David Yang
2026-09-16 16:43 ` David Yang [this message]
2026-09-16 16:43 ` [PATCH net-next v2 2/8] net: dsa: motorcomm: Split xMII and SERDES port masks David Yang
2026-09-16 16:43 ` [PATCH net-next v2 3/8] net: dsa: motorcomm: Check port type with runtime info David Yang
2026-09-16 16:43 ` [PATCH net-next v2 4/8] net: dsa: motorcomm: Fix register bit field names David Yang
2026-09-16 16:43 ` [PATCH net-next v2 5/8] net: dsa: motorcomm: Introduce yt921x_speed David Yang
2026-09-16 16:43 ` [PATCH net-next v2 6/8] net: dsa: motorcomm: Hoist port_to_priv helper into chip.h David Yang
2026-09-16 16:43 ` [PATCH net-next v2 7/8] net: dsa: motorcomm: Split MDIO bus module David Yang
2026-09-16 16:43 ` [PATCH net-next v2 8/8] net: dsa: motorcomm: Add SerDes PCS David Yang
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=20260916164310.3168269-2-mmyangfl@gmail.com \
--to=mmyangfl@gmail.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.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®