Skip to contentSkip to conversation

net: usb: asix: remove redundant assignment to variable reg

PATCH Applied Colin Ian King 3 participants 3 messages Jan 23, 2022 – Jan 25, 2022

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: usb: asix: remove redundant assignment to variable reg

Variable reg is being masked however the variable is never read after this. The assignment is redundant and can be removed.

---
 drivers/net/usb/asix_devices.c | 1 -
 1 file changed, 1 deletion(-)
drivers/net/usb/asix_devices.c +0 -1
index 4514d35ef4c4..9b72334aabb6 100644
@@ -858,7 +858,6 @@ static int marvell_phy_init(struct usbnet *dev)
 		reg = asix_mdio_read(dev->net, dev->mii.phy_id,
 			MII_MARVELL_LED_CTRL);
 		netdev_dbg(dev->net, "MII_MARVELL_LED_CTRL (2) = 0x%04x\n", reg);
-		reg &= 0xfc0f;
 	}
 
 	return 0;
Signature · 1 line
2.33.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Colin Ian King

Variable reg is being masked however the variable is never read after this. The assignment is redundant and can be removed.

Thank you!

Quoted 20 lines
---
 drivers/net/usb/asix_devices.c | 1 -
 1 file changed, 1 deletion(-)
drivers/net/usb/asix_devices.c +0 -1
index 4514d35ef4c4..9b72334aabb6 100644
@@ -858,7 +858,6 @@ static int marvell_phy_init(struct usbnet *dev)
 		reg = asix_mdio_read(dev->net, dev->mii.phy_id,
 			MII_MARVELL_LED_CTRL);
 		netdev_dbg(dev->net, "MII_MARVELL_LED_CTRL (2) = 0x%04x\n", reg);
-		reg &= 0xfc0f;
 	}
 
 	return 0;
Signature · 1 line
2.33.1
Signature · 4 lines
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
#2 lore raw
In reply to Colin Ian King
This patch was applied to netdev/net-next.git (master) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (master) by Jakub Kicinski <[email protected]>:

Quoted 7 lines · On Sun, 23 Jan 2022 18:40:35 +0000 you wrote:

Variable reg is being masked however the variable is never read after this. The assignment is redundant and can be removed.

---
 drivers/net/usb/asix_devices.c | 1 -
 1 file changed, 1 deletion(-)

Here is the summary with links:
- net: usb: asix: remove redundant assignment to variable reg

    https://git.kernel.org/netdev/net-next/c/9f16e0fa1079

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html