remove unused usb endpoint functions
cover remove unused usb endpoint functions
Remove driver-specific functions to detect the type and direction of a usb endpoint. Their callers have already been updated to use the helper functions from the usb core.
Martin Kaiser (4):
staging: r8188eu: remove unused function usb_endpoint_is_int
staging: r8188eu: remove unused function RT_usb_endpoint_is_bulk_in
staging: r8188eu: remove unused function RT_usb_endpoint_num
staging: r8188eu: remove the remaining usb endpoint functions
drivers/staging/r8188eu/os_dep/usb_intf.c | 40 ----------------------- 1 file changed, 40 deletions(-)
Signature · 1 line
2.20.1
PATCH 1/4 staging: r8188eu: remove unused function usb_endpoint_is_int
The usb_endpoint_is_int is not used and can be removed.
RT_usb_endpoint_xfer_int was used only by usb_endpoint_is_int. Remove this function as well.
--- drivers/staging/r8188eu/os_dep/usb_intf.c | 10 ---------- 1 file changed, 10 deletions(-)
drivers/staging/r8188eu/os_dep/usb_intf.c +0 -10
@@ -83,11 +83,6 @@ static inline int RT_usb_endpoint_dir_out(const struct usb_endpoint_descriptor *return (epd->bEndpointAddress &USB_ENDPOINT_DIR_MASK ) ==USB_DIR_OUT ; } -static inline int RT_usb_endpoint_xfer_int (const struct usb_endpoint_descriptor *epd) -{ -return (epd->bmAttributes &USB_ENDPOINT_XFERTYPE_MASK ) ==USB_ENDPOINT_XFER_INT ; -} -static inline int RT_usb_endpoint_xfer_bulk (const struct usb_endpoint_descriptor *epd) {return (epd->bmAttributes &USB_ENDPOINT_XFERTYPE_MASK ) ==USB_ENDPOINT_XFER_BULK ;
@@ -103,11 +98,6 @@ static inline int RT_usb_endpoint_is_bulk_out(const struct usb_endpoint_descriptreturn RT_usb_endpoint_xfer_bulk (epd) &&RT_usb_endpoint_dir_out (epd); } -static inline int usb_endpoint_is_int (const struct usb_endpoint_descriptor *epd) -{ -return RT_usb_endpoint_xfer_int (epd) &&RT_usb_endpoint_dir_in (epd); -} -static inline int RT_usb_endpoint_num (const struct usb_endpoint_descriptor *epd) {return epd->bEndpointAddress &USB_ENDPOINT_NUMBER_MASK ;
Signature · 1 line
2.20.1
PATCH 2/4 staging: r8188eu: remove unused function RT_usb_endpoint_is_bulk_in
In reply to Martin KaiserRemove the RT_usb_endpoint_is_bulk_in function which is not used.
RT_usb_endpoint_dir_in is no longer used either and can also be removed.
--- drivers/staging/r8188eu/os_dep/usb_intf.c | 10 ---------- 1 file changed, 10 deletions(-)
drivers/staging/r8188eu/os_dep/usb_intf.c +0 -10
@@ -73,11 +73,6 @@ static struct rtw_usb_drv rtl8188e_usb_drv = {static struct rtw_usb_drv *usb_drv = &rtl8188e_usb_drv; -static inline int RT_usb_endpoint_dir_in (const struct usb_endpoint_descriptor *epd) -{ -return (epd->bEndpointAddress &USB_ENDPOINT_DIR_MASK ) ==USB_DIR_IN ; -} -static inline int RT_usb_endpoint_dir_out (const struct usb_endpoint_descriptor *epd) {return (epd->bEndpointAddress &USB_ENDPOINT_DIR_MASK ) ==USB_DIR_OUT ;
@@ -88,11 +83,6 @@ static inline int RT_usb_endpoint_xfer_bulk(const struct usb_endpoint_descriptorreturn (epd->bmAttributes &USB_ENDPOINT_XFERTYPE_MASK ) ==USB_ENDPOINT_XFER_BULK ; } -static inline int RT_usb_endpoint_is_bulk_in (const struct usb_endpoint_descriptor *epd) -{ -return RT_usb_endpoint_xfer_bulk (epd) &&RT_usb_endpoint_dir_in (epd); -} -static inline int RT_usb_endpoint_is_bulk_out (const struct usb_endpoint_descriptor *epd) {return RT_usb_endpoint_xfer_bulk (epd) &&RT_usb_endpoint_dir_out (epd);
Signature · 1 line
2.20.1
PATCH 3/4 staging: r8188eu: remove unused function RT_usb_endpoint_num
In reply to Martin KaiserRT_usb_endpoint_num is unused. Remove this function.
--- drivers/staging/r8188eu/os_dep/usb_intf.c | 5 ----- 1 file changed, 5 deletions(-)
drivers/staging/r8188eu/os_dep/usb_intf.c +0 -5
@@ -88,11 +88,6 @@ static inline int RT_usb_endpoint_is_bulk_out(const struct usb_endpoint_descriptreturn RT_usb_endpoint_xfer_bulk (epd) &&RT_usb_endpoint_dir_out (epd); } -static inline int RT_usb_endpoint_num (const struct usb_endpoint_descriptor *epd) -{ -return epd->bEndpointAddress &USB_ENDPOINT_NUMBER_MASK ; -} -static u8 rtw_init_intf_priv (struct dvobj_priv *dvobj) {u8 rst = _SUCCESS;
Signature · 1 line
2.20.1
PATCH 4/4 staging: r8188eu: remove the remaining usb endpoint functions
In reply to Martin KaiserRemove the last bunch of unused RT_usb_endpoint_... functions.
--- drivers/staging/r8188eu/os_dep/usb_intf.c | 15 --------------- 1 file changed, 15 deletions(-)
drivers/staging/r8188eu/os_dep/usb_intf.c +0 -15
@@ -73,21 +73,6 @@ static struct rtw_usb_drv rtl8188e_usb_drv = {static struct rtw_usb_drv *usb_drv = &rtl8188e_usb_drv; -static inline int RT_usb_endpoint_dir_out (const struct usb_endpoint_descriptor *epd) -{ -return (epd->bEndpointAddress &USB_ENDPOINT_DIR_MASK ) ==USB_DIR_OUT ; -} - -static inline int RT_usb_endpoint_xfer_bulk (const struct usb_endpoint_descriptor *epd) -{ -return (epd->bmAttributes &USB_ENDPOINT_XFERTYPE_MASK ) ==USB_ENDPOINT_XFER_BULK ; -} - -static inline int RT_usb_endpoint_is_bulk_out (const struct usb_endpoint_descriptor *epd) -{ -return RT_usb_endpoint_xfer_bulk (epd) &&RT_usb_endpoint_dir_out (epd); -} -static u8 rtw_init_intf_priv (struct dvobj_priv *dvobj) {u8 rst = _SUCCESS;
Signature · 1 line
2.20.1
Quoted 4 lines · Martin Kaiser
Remove driver-specific functions to detect the type and direction of a usb endpoint. Their callers have already been updated to use the helper functions from the usb core.
Quoted 9 lines
Martin Kaiser (4):
staging: r8188eu: remove unused functionusb_endpoint_is_int
staging: r8188eu: remove unused functionRT_usb_endpoint_is_bulk_in
staging: r8188eu: remove unused functionRT_usb_endpoint_num
staging: r8188eu: remove the remaining usb endpoint functionsdrivers/staging/r8188eu/os_dep/usb_intf.c | 40 ----------------------- 1 file changed, 40 deletions(-)
Compiles and looks good to me.
For all 4 patches