mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH net-next] net: usb: asix: remove redundant PHY address short-read check
@ 2026-09-28 19:21 Xinsheng Zhu
  2026-10-01 13:57 ` Simon Horman
  2026-10-02  0:30 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Xinsheng Zhu @ 2026-09-28 19:21 UTC (permalink / raw)
  To: netdev
  Cc: andrew+netdev, davem, edumazet, kuba, pabeni, linux-usb, linux-kernel

Short-read handling was added to asix_read_cmd() by commit
920a9fa27e78 ("net: asix: add proper error handling of usb read errors").
The helper converts short reads to -ENODATA while preserving negative
errors from the underlying USB read operation.

Remove the redundant short-read check in asix_read_phy_addr()
and its unreachable -EIO assignment. The existing negative-return check
handles both short reads and underlying USB read errors.

Signed-off-by: Xinsheng Zhu <xinsheng.zhu.ny@gmail.com>
---
 drivers/net/usb/asix_common.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/net/usb/asix_common.c b/drivers/net/usb/asix_common.c
index 4f03f4e57655..51bf887e3520 100644
--- a/drivers/net/usb/asix_common.c
+++ b/drivers/net/usb/asix_common.c
@@ -327,11 +327,6 @@ int asix_read_phy_addr(struct usbnet *dev, bool internal)
 	if (ret < 0)
 		goto error;
 
-	if (ret < 2) {
-		ret = -EIO;
-		goto error;
-	}
-
 	offset = (internal ? 1 : 0);
 	ret = buf[offset];
 

base-commit: 014d795c73837ea2339a4ea8e8f82c6e959b845d
-- 
2.54.0 (Apple Git-157)


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] net: usb: asix: remove redundant PHY address short-read check
  2026-09-28 19:21 [PATCH net-next] net: usb: asix: remove redundant PHY address short-read check Xinsheng Zhu
@ 2026-10-01 13:57 ` Simon Horman
  2026-10-02  0:30 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Simon Horman @ 2026-10-01 13:57 UTC (permalink / raw)
  To: Xinsheng Zhu
  Cc: netdev, andrew+netdev, davem, edumazet, kuba, pabeni, linux-usb,
	linux-kernel

On Mon, Sep 28, 2026 at 03:21:19PM -0400, Xinsheng Zhu wrote:
> Short-read handling was added to asix_read_cmd() by commit
> 920a9fa27e78 ("net: asix: add proper error handling of usb read errors").
> The helper converts short reads to -ENODATA while preserving negative
> errors from the underlying USB read operation.
> 
> Remove the redundant short-read check in asix_read_phy_addr()
> and its unreachable -EIO assignment. The existing negative-return check
> handles both short reads and underlying USB read errors.
> 
> Signed-off-by: Xinsheng Zhu <xinsheng.zhu.ny@gmail.com>

Reviewed-by: Simon Horman <horms@kernel.org>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] net: usb: asix: remove redundant PHY address short-read check
  2026-09-28 19:21 [PATCH net-next] net: usb: asix: remove redundant PHY address short-read check Xinsheng Zhu
  2026-10-01 13:57 ` Simon Horman
@ 2026-10-02  0:30 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-10-02  0:30 UTC (permalink / raw)
  To: Xinsheng Zhu
  Cc: netdev, andrew+netdev, davem, edumazet, kuba, pabeni, linux-usb,
	linux-kernel

Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Mon, 28 Sep 2026 15:21:19 -0400 you wrote:
> Short-read handling was added to asix_read_cmd() by commit
> 920a9fa27e78 ("net: asix: add proper error handling of usb read errors").
> The helper converts short reads to -ENODATA while preserving negative
> errors from the underlying USB read operation.
> 
> Remove the redundant short-read check in asix_read_phy_addr()
> and its unreachable -EIO assignment. The existing negative-return check
> handles both short reads and underlying USB read errors.
> 
> [...]

Here is the summary with links:
  - [net-next] net: usb: asix: remove redundant PHY address short-read check
    https://git.kernel.org/netdev/net-next/c/264f8ac8ec51

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-10-02  0:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-28 19:21 [PATCH net-next] net: usb: asix: remove redundant PHY address short-read check Xinsheng Zhu
2026-10-01 13:57 ` Simon Horman
2026-10-02  0:30 ` patchwork-bot+netdevbpf

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®