* [PATCH net-next] net: usb: usbnet: use proper ep number macros
@ 2026-05-13 13:29 Oliver Neukum
2026-05-15 1:40 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Oliver Neukum @ 2026-05-13 13:29 UTC (permalink / raw)
To: andrew+netdev, davem, edumazet, kuba, pabeni, netdev, linux-usb,
linux-kernel
Cc: Oliver Neukum
We have macros to retrieve endpoint numbers now.
Use them.
Signed-off-by: Oliver Neukum <oneukum@suse.com>
---
drivers/net/usb/usbnet.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
index b72ba0803392..25518635b7b7 100644
--- a/drivers/net/usb/usbnet.c
+++ b/drivers/net/usb/usbnet.c
@@ -149,10 +149,8 @@ int usbnet_get_endpoints(struct usbnet *dev, struct usb_interface *intf)
return tmp;
}
- dev->in = usb_rcvbulkpipe(dev->udev,
- in->desc.bEndpointAddress & USB_ENDPOINT_NUMBER_MASK);
- dev->out = usb_sndbulkpipe(dev->udev,
- out->desc.bEndpointAddress & USB_ENDPOINT_NUMBER_MASK);
+ dev->in = usb_rcvbulkpipe(dev->udev, usb_endpoint_num(&in->desc));
+ dev->out = usb_sndbulkpipe(dev->udev, usb_endpoint_num(&out->desc));
dev->status = status;
return 0;
}
@@ -232,9 +230,7 @@ static int init_status(struct usbnet *dev, struct usb_interface *intf)
if (!dev->driver_info->status)
return 0;
- pipe = usb_rcvintpipe(dev->udev,
- dev->status->desc.bEndpointAddress
- & USB_ENDPOINT_NUMBER_MASK);
+ pipe = usb_rcvintpipe(dev->udev, usb_endpoint_num(&dev->status->desc));
maxp = usb_maxpacket(dev->udev, pipe);
/* avoid 1 msec chatter: min 8 msec poll rate */
--
2.54.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] net: usb: usbnet: use proper ep number macros
2026-05-13 13:29 [PATCH net-next] net: usb: usbnet: use proper ep number macros Oliver Neukum
@ 2026-05-15 1:40 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-05-15 1:40 UTC (permalink / raw)
To: Oliver Neukum
Cc: andrew+netdev, davem, edumazet, kuba, pabeni, netdev, linux-usb,
linux-kernel
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Wed, 13 May 2026 15:29:16 +0200 you wrote:
> We have macros to retrieve endpoint numbers now.
> Use them.
>
> Signed-off-by: Oliver Neukum <oneukum@suse.com>
> ---
> drivers/net/usb/usbnet.c | 10 +++-------
> 1 file changed, 3 insertions(+), 7 deletions(-)
Here is the summary with links:
- [net-next] net: usb: usbnet: use proper ep number macros
https://git.kernel.org/netdev/net-next/c/822d4a8e390a
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] 2+ messages in thread
end of thread, other threads:[~2026-05-15 1:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-13 13:29 [PATCH net-next] net: usb: usbnet: use proper ep number macros Oliver Neukum
2026-05-15 1:40 ` 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