]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
usb: gadget: dummy_hcd: Use USB API functions rather than constants
authorChen Ni <nichen@iscas.ac.cn>
Wed, 18 Jun 2025 06:57:50 +0000 (14:57 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 19 Jun 2025 10:25:16 +0000 (12:25 +0200)
commit783e15ddb54072bb9af89bffac9fba40a6ada72c
tree09780d51328ba423ca89ed09059902b1d98c164b
parent1857571e4f50323da9f24f63b8095286d83d490c
usb: gadget: dummy_hcd: Use USB API functions rather than constants

Use the function usb_endpoint_num() rather than constants.

The Coccinelle semantic patch is as follows:

@@ struct usb_endpoint_descriptor *epd; @@

- (epd->bEndpointAddress & \(USB_ENDPOINT_NUMBER_MASK\|0x0f\))
+ usb_endpoint_num(epd)

Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
Link: https://lore.kernel.org/r/20250618065750.816965-1-nichen@iscas.ac.cn
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/udc/dummy_hcd.c