net: usb: sr9700: rename register write commands for clarity
Subsystems (4)
PATCH 1/1 net: usb: sr9700: rename register write commands for clarity
SR_WR_REG and SR_WR_REGS may be confused at a cursory glance. Rename them to be more easily differentiated to prevent this.
--- drivers/net/usb/sr9700.c | 8 ++++---- drivers/net/usb/sr9700.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-)
drivers/net/usb/sr9700.c +4 -4
@@ -37,7 +37,7 @@ static int sr_write(struct usbnet *dev, u8 reg, u16 length, void *data) {int err; - err =usbnet_write_cmd (dev,SR_WR_REGS ,SR_REQ_WR_REG ,0 , reg, data, + err =usbnet_write_cmd (dev,SR_WR_MULTIPLE_REGS ,SR_REQ_WR_REG ,0 , reg, data, length);if ((err >=0 ) && (err < length)) err = -EINVAL ;
@@ -51,20 +51,20 @@ static int sr_read_reg(struct usbnet *dev, u8 reg, u8 *value)static int sr_write_reg (struct usbnet *dev,u8 reg,u8 value) { -return usbnet_write_cmd (dev,SR_WR_REG ,SR_REQ_WR_REG , +return usbnet_write_cmd (dev,SR_WR_SINGLE_REG ,SR_REQ_WR_REG , value, reg,NULL ,0 ); }static void sr_write_async (struct usbnet *dev,u8 reg,u16 length,const void *data) { -usbnet_write_cmd_async (dev,SR_WR_REGS ,SR_REQ_WR_REG , +usbnet_write_cmd_async (dev,SR_WR_MULTIPLE_REGS ,SR_REQ_WR_REG ,0 , reg, data, length); }static void sr_write_reg_async (struct usbnet *dev,u8 reg,u8 value) { -usbnet_write_cmd_async (dev,SR_WR_REG ,SR_REQ_WR_REG , +usbnet_write_cmd_async (dev,SR_WR_SINGLE_REG ,SR_REQ_WR_REG , value, reg,NULL ,0 ); }
drivers/net/usb/sr9700.h +2 -2
@@ -150,8 +150,8 @@/* Register access commands and flags */ #define SR_RD_REGS 0x00 -#define SR_WR_REGS 0x01 -#define SR_WR_REG 0x03 +#define SR_WR_MULTIPLE_REGS 0x01 +#define SR_WR_SINGLE_REG 0x03#define SR_REQ_RD_REG (USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE)#define SR_REQ_WR_REG (USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE)
Signature · 1 line
2.43.0
Quoted 5 lines · Ethan Nelson-Moore
SR_WR_REGandSR_WR_REGSmay be confused at a cursory glance. Rename them to be more easily differentiated to prevent this.Suggested-by Andrew Lunn <[email protected]>Signed-off-by Ethan Nelson-Moore <[email protected]>
Andrew
Quoted 7 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Ethan" == Ethan Nelson-Moore <[email protected]> writes:
SR_WR_REGandSR_WR_REGSmay be confused at a cursory glance. Rename them to be more easily differentiated to prevent this.Suggested-by Andrew Lunn <[email protected]>Signed-off-by Ethan Nelson-Moore <[email protected]>
Signature · 1 line
Bye, Peter Korsgaard
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 9 lines · On Fri, 23 Jan 2026 00:03:58 -0800 you wrote:
SR_WR_REGandSR_WR_REGSmay be confused at a cursory glance. Rename them to be more easily differentiated to prevent this.Suggested-by Andrew Lunn <[email protected]>Signed-off-by Ethan Nelson-Moore <[email protected]>--- drivers/net/usb/sr9700.c | 8 ++++---- drivers/net/usb/sr9700.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-)
Here is the summary with links:
- [net-next] net: usb: sr9700: rename register write commands for clarity
https://git.kernel.org/netdev/net-next/c/4a7bbaa663f5
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html