Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

net: usb: sr9700: use ETH_ALEN instead of magic number

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>
Reviewed-by: Peter Korsgaard <peter@korsgaard.com>
Link: https://patch.msgid.link/20260123070645.56434-1-enelsonmoore@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Ethan Nelson-Moore and committed by
Jakub Kicinski
c2e99887 6290f7e7

+1 -1
+1 -1
drivers/net/usb/sr9700.c
··· 271 271 } 272 272 273 273 eth_hw_addr_set(netdev, addr->sa_data); 274 - sr_write_async(dev, SR_PAR, 6, netdev->dev_addr); 274 + sr_write_async(dev, SR_PAR, ETH_ALEN, netdev->dev_addr); 275 275 276 276 return 0; 277 277 }