Skip to contentSkip to conversation

USB: serial: quatech2: remove unused qt2_setdevice function

PATCH In review Tom Rix 2 participants 2 messages Mar 21, 2023 – Apr 5, 2023

Subsystems (2)
lore
Share & tools
lore

Tom Rix

author
#0 lore raw

PATCH 1/1 USB: serial: quatech2: remove unused qt2_setdevice function

clang with W=1 reports drivers/usb/serial/quatech2.c:179:19: error: unused function
'qt2_setdevice' [-Werror,-Wunused-function]
static inline int qt2_setdevice(struct usb_device *dev, u8 *data)

                  ^

This function is not used, so remove it.

---
 drivers/usb/serial/quatech2.c | 8 --------
 1 file changed, 8 deletions(-)
drivers/usb/serial/quatech2.c +0 -8
index 6fca40ace83a..fee581409bf6 100644
@@ -176,14 +176,6 @@ static inline int qt2_control_msg(struct usb_device *dev,
 			       NULL, 0, QT2_USB_TIMEOUT);
 }
 
-static inline int qt2_setdevice(struct usb_device *dev, u8 *data)
-{
-	u16 x = ((u16) (data[1] << 8) | (u16) (data[0]));
-
-	return qt2_control_msg(dev, QT_SET_GET_DEVICE, x, 0);
-}
-
-
 static inline int qt2_getregister(struct usb_device *dev,
 				  u8 uart,
 				  u8 reg,
Signature · 1 line
2.27.0
maintainer
#1 lore raw
Quoted 8 lines · Tom Rix

clang with W=1 reports drivers/usb/serial/quatech2.c:179:19: error: unused function
'qt2_setdevice' [-Werror,-Wunused-function]
static inline int qt2_setdevice(struct usb_device *dev, u8 *data)

                  ^

This function is not used, so remove it.

Now applied, thanks.

Johan