lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Fri, 30 Jul 2010 18:51:51 -0400
From:	Javier Martinez Canillas <martinez.javier@...il.com>
To:	Greg Kroah-Hartman <gregkh@...e.de>,
	Richard Ash <richard@...acityteam.org>,
	André Goddard Rosa <andre.goddard@...il.com>,
	Soeren Moeller <soerenmoeller2001@...il.com>,
	Németh Márton <nm127@...email.hu>,
	devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: [PATCH] staging/quatech_usb2: remove unused qt2_box_flush function

Hello, 

In today linux-next I got a compilation warning:

drivers/staging/quatech_usb2/quatech_usb2.c:1852: warning: ‘qt2_box_flush’ defined but not used

Since -next is an integration three, maybe this function is going to be used. 
But anyway I send a patch that fix the warning removing the qt2_box_flush function just in case.

Thanks a lot.

Javier

Signed-off-by: Javier Martinez Canillas <martinez.javier@...il.com>
---
 drivers/staging/quatech_usb2/quatech_usb2.c |   24 +-----------------------
 1 files changed, 1 insertions(+), 23 deletions(-)

diff --git a/drivers/staging/quatech_usb2/quatech_usb2.c b/drivers/staging/quatech_usb2/quatech_usb2.c
index ecd7313..9838ea2 100644
--- a/drivers/staging/quatech_usb2/quatech_usb2.c
+++ b/drivers/staging/quatech_usb2/quatech_usb2.c
@@ -258,8 +258,6 @@ static int qt2_box_get_register(struct usb_serial *serial,
 static int qt2_box_set_register(struct usb_serial *serial,
 		unsigned short Uart_Number, unsigned short Register_Num,
 		unsigned short Value);
-static int qt2_box_flush(struct usb_serial *serial,  unsigned char uart_number,
-		unsigned short rcv_or_xmit);
 static int qt2_boxsetuart(struct usb_serial *serial, unsigned short Uart_Number,
 		unsigned short default_divisor, unsigned char default_LCR);
 static int qt2_boxsethw_flowctl(struct usb_serial *serial,
@@ -645,9 +643,6 @@ static void qt2_close(struct usb_serial_port *port)
 	/* get the device private data */
 	port_extra = qt2_get_port_private(port); /* port private data */
 
-	/* we don't need to force flush though the hardware, so we skip using
-	 * qt2_box_flush() here */
-
 	/* we can now (and only now) stop reading data */
 	port_extra->close_pending = true;
 	dbg("%s(): port_extra->close_pending = true", __func__);
@@ -1841,24 +1836,6 @@ static int qt2_box_set_register(struct usb_serial *serial,
 	return result;
 }
 
-
-/** @brief Request the Tx or Rx buffers on the USB side be flushed
- *
- * Tx flush: When all the currently buffered data has been sent, send an escape
- * sequence back up the data stream to us
- * Rx flush: add a flag in the data stream now so we know when it's made it's
- * way up to us.
- */
-static int qt2_box_flush(struct usb_serial *serial,  unsigned char uart_number,
-		    unsigned short rcv_or_xmit)
-{
-	int result;
-	result = usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev, 0),
-		QT2_FLUSH_DEVICE, 0x40, rcv_or_xmit, uart_number, NULL, 0,
-		300);
-	return result;
-}
-
 /** qt2_boxsetuart - Issue a SET_UART vendor-spcific request on the default
  * control pipe. If successful sets baud rate divisor and LCR value.
  */
@@ -1873,6 +1850,7 @@ static int qt2_boxsetuart(struct usb_serial *serial, unsigned short Uart_Number,
 			QT2_GET_SET_UART, 0x40, default_divisor, UartNumandLCR,
 			NULL, 0, 300);
 }
+
 /** qt2_boxsethw_flowctl - Turn hardware (RTS/CTS) flow control on and off for
  * a hardware UART.
  */
-- 
1.7.0.4



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ