* [PATCH net-next] net: usb: sr9700: use ETH_ALEN instead of magic number
@ 2026-01-23 7:06 Ethan Nelson-Moore
2026-01-23 19:35 ` Andrew Lunn
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Ethan Nelson-Moore @ 2026-01-23 7:06 UTC (permalink / raw)
To: netdev, linux-usb
Cc: Ethan Nelson-Moore, Andrew Lunn, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Peter Korsgaard, Simon Horman
The driver hardcodes the number 6 as the number of bytes to write to
the SR_PAR register, which stores the MAC address. Use ETH_ALEN instead
to make the code clearer.
Signed-off-by: Ethan Nelson-Moore <enelsonmoore@gmail.com>
---
drivers/net/usb/sr9700.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/usb/sr9700.c b/drivers/net/usb/sr9700.c
index 9c7cd0db1768..446857de8e15 100644
--- a/drivers/net/usb/sr9700.c
+++ b/drivers/net/usb/sr9700.c
@@ -271,7 +271,7 @@ static int sr9700_set_mac_address(struct net_device *netdev, void *p)
}
eth_hw_addr_set(netdev, addr->sa_data);
- sr_write_async(dev, SR_PAR, 6, netdev->dev_addr);
+ sr_write_async(dev, SR_PAR, ETH_ALEN, netdev->dev_addr);
return 0;
}
--
2.43.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] net: usb: sr9700: use ETH_ALEN instead of magic number
2026-01-23 7:06 [PATCH net-next] net: usb: sr9700: use ETH_ALEN instead of magic number Ethan Nelson-Moore
@ 2026-01-23 19:35 ` Andrew Lunn
2026-01-23 20:04 ` Peter Korsgaard
2026-01-25 23:10 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Andrew Lunn @ 2026-01-23 19:35 UTC (permalink / raw)
To: Ethan Nelson-Moore
Cc: netdev, linux-usb, Andrew Lunn, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Peter Korsgaard, Simon Horman
On Thu, Jan 22, 2026 at 11:06:39PM -0800, Ethan Nelson-Moore wrote:
> The driver hardcodes the number 6 as the number of bytes to write to
> the SR_PAR register, which stores the MAC address. Use ETH_ALEN instead
> to make the code clearer.
>
> Signed-off-by: Ethan Nelson-Moore <enelsonmoore@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] net: usb: sr9700: use ETH_ALEN instead of magic number
2026-01-23 7:06 [PATCH net-next] net: usb: sr9700: use ETH_ALEN instead of magic number Ethan Nelson-Moore
2026-01-23 19:35 ` Andrew Lunn
@ 2026-01-23 20:04 ` Peter Korsgaard
2026-01-25 23:10 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Peter Korsgaard @ 2026-01-23 20:04 UTC (permalink / raw)
To: Ethan Nelson-Moore
Cc: netdev, linux-usb, Andrew Lunn, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Simon Horman
>>>>> "Ethan" == Ethan Nelson-Moore <enelsonmoore@gmail.com> writes:
> The driver hardcodes the number 6 as the number of bytes to write to
> the SR_PAR register, which stores the MAC address. Use ETH_ALEN instead
> to make the code clearer.
> Signed-off-by: Ethan Nelson-Moore <enelsonmoore@gmail.com>
Reviewed-by: Peter Korsgaard <peter@korsgaard.com>
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] net: usb: sr9700: use ETH_ALEN instead of magic number
2026-01-23 7:06 [PATCH net-next] net: usb: sr9700: use ETH_ALEN instead of magic number Ethan Nelson-Moore
2026-01-23 19:35 ` Andrew Lunn
2026-01-23 20:04 ` Peter Korsgaard
@ 2026-01-25 23:10 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-01-25 23:10 UTC (permalink / raw)
To: Ethan Nelson-Moore
Cc: netdev, linux-usb, andrew+netdev, davem, edumazet, kuba, pabeni,
peter, horms
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Thu, 22 Jan 2026 23:06:39 -0800 you wrote:
> The driver hardcodes the number 6 as the number of bytes to write to
> the SR_PAR register, which stores the MAC address. Use ETH_ALEN instead
> to make the code clearer.
>
> Signed-off-by: Ethan Nelson-Moore <enelsonmoore@gmail.com>
> ---
> drivers/net/usb/sr9700.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Here is the summary with links:
- [net-next] net: usb: sr9700: use ETH_ALEN instead of magic number
https://git.kernel.org/netdev/net-next/c/c2e99887807e
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] 4+ messages in thread
end of thread, other threads:[~2026-01-25 23:10 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-23 7:06 [PATCH net-next] net: usb: sr9700: use ETH_ALEN instead of magic number Ethan Nelson-Moore
2026-01-23 19:35 ` Andrew Lunn
2026-01-23 20:04 ` Peter Korsgaard
2026-01-25 23:10 ` 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