[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1c0ee3d4-2b24-48ea-b34f-b5653abe11d4@lunn.ch>
Date: Sun, 16 Nov 2025 20:32:30 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Mietek N <namiltd@...oo.com>
Cc: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linus.walleij@...aro.org" <linus.walleij@...aro.org>,
"edumazet@...gle.com" <edumazet@...gle.com>,
"alsi@...g-olufsen.dk" <alsi@...g-olufsen.dk>,
"olteanv@...il.com" <olteanv@...il.com>,
"kuba@...nel.org" <kuba@...nel.org>,
"pabeni@...hat.com" <pabeni@...hat.com>,
"davem@...emloft.net" <davem@...emloft.net>
Subject: Re: [PATCH] net: dsa: realtek: rtl8365mb: fix return value in
rtl8365mb_phy_ocp_write
On Sun, Nov 16, 2025 at 05:18:31PM +0000, Mietek N wrote:
> Function rtl8365mb_phy_ocp_write() always returns 0, even when an erroroccurs during register access. This patch fixes the return value to
> propagate the actual error code from regmap operations.
>
> Fixes: 964a56e ("net: dsa: realtek: add RTL8365MB switch driver")
> Signed-off-by: Mieczyslaw Nalewaj <namiltd@...oo.com>
Please take a read of
https://www.kernel.org/doc/html/latest/process/maintainer-netdev.html
https://docs.kernel.org/process/submitting-patches.html
Netdev requests that you only submit one version of a patch a day. If
you notice something wrong in your patch, reply to it, and say what is
wrong. And then post a new version the next day.
This is also v3 of the patch. Please put the version number in the
[patch vX] part.
Your hash in the Fixes: is also too short. The kernel requests 12
character hashes. There is a git configuration for this.
Also, 964a56e does not seem correct.
The history is a bit complex. It appears it was first added in
commit 4af2950c50c8634ed2865cf81e607034f78b84aa
Author: Alvin Šipraga <alsi@...g-olufsen.dk>
Date: Mon Oct 18 11:38:01 2021 +0200
net: dsa: realtek-smi: add rtl8365mb subdriver for RTL8365MB-VC
which added the file drivers/net/dsa/rtl8365mb.c. That version is
correct, it ends with:
+ ret = rtl8365mb_phy_poll_busy(smi);
+ if (ret)
+ return ret;
+
+ return 0;
+}
We have:
commit 319a70a5fea9590e9431dd57f56191996c4787f4
Author: Luiz Angelo Daros de Luca <luizluca@...il.com>
Date: Fri Jan 28 03:04:58 2022 -0300
net: dsa: realtek-smi: move to subdirectory
and if you look at that version, the return value is still O.K.
What actually seems to break it is:
commit 2796728460b822d549841e0341752b263dc265c4
Author: Alvin Šipraga <alsi@...g-olufsen.dk>
Date: Mon Feb 21 19:46:31 2022 +0100
net: dsa: realtek: rtl8365mb: serialize indirect PHY register access
ret = rtl8365mb_phy_poll_busy(priv);
if (ret)
- return ret;
+ goto out;
+
+out:
+ mutex_unlock(&priv->map_lock);
return 0;
}
So instead of directly returning the error code, it now does an
unlock, and return 0. So this is what your Fixes tag needs to be.
Andrew
---
pw-bot: cr
Powered by blists - more mailing lists