Thread (10 messages) 10 messages, 4 authors, 2026-01-22

Re: [PATCH net-next v6 2/3] net: dsa: yt921x: Return early for failed MIB read

From: Andrew Lunn <andrew@lunn.ch>
Date: 2026-01-18 16:07:01
Also in: lkml

On Sun, Jan 18, 2026 at 09:30:15AM +0800, David Yang wrote:
quoted hunk ↗ jump to hunk
This patch does not change anything effectively, but serves as a
prerequisite for another patch.

Signed-off-by: David Yang <mmyangfl@gmail.com>
---
 drivers/net/dsa/yt921x.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/drivers/net/dsa/yt921x.c b/drivers/net/dsa/yt921x.c
index 5e4e8093ba16..fe08385445d2 100644
--- a/drivers/net/dsa/yt921x.c
+++ b/drivers/net/dsa/yt921x.c
@@ -707,6 +707,12 @@ static int yt921x_read_mib(struct yt921x_priv *priv, int port)
 		WRITE_ONCE(*valp, val);
 	}
 
+	if (res) {
+		dev_err(dev, "Failed to %s port %d: %i\n", "read stats for",
+			port, res);
+		return res;
+	}
I know you are just moving code around, so i can understand a straight
cut/paste.

However, when i look at the code, what is the point of %s and the
constant "read stats for"?

	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