Thread (16 messages) flat view 16 messages, 3 authors, 3d ago

Re: [PATCH net-next v8 2/6] net: dsa: motorcomm: use max_ports in series for port bounds checking

From: Kyle Switch <hidden>
Date: 2026-09-23 01:08:01
Also in: lkml

On 9/22/26 20:47, Andrew Lunn wrote:
quoted
@@ -402,7 +403,8 @@ yt921x_mbus_int_init(struct yt921x_priv *priv, struct device_node *mnp)
  	mbus->read = yt921x_mbus_int_read;
  	mbus->write = yt921x_mbus_int_write;
  	mbus->parent = dev;
-	mbus->phy_mask = (u32)~GENMASK(YT921X_PORT_NUM - 1, 0);
+	max_ports = priv->series->max_ports;
+	mbus->phy_mask = (u32)~GENMASK(max_ports - 1, 0);
A separate patch, but can this be changed to GENMASK_U32() so the cast
is not needed? There maybe be other instances in this driver which can
be changed as well.
Ans: okay, will be updated in next patch.
Reviewed-by: Andrew Lunn <andrew@lunn.ch>

     Andrew
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help