On Fri, Dec 03, 2004 at 12:25:46AM -0600, Al Borchers wrote:
> Greg --
>
> Ok, changed to use circ_buf.h. I am only resending the first
> of the three patches--the other two did not change.
Thanks, I've applied this one, and the 2 others to my trees.
I had to apply the following patch in order to get it to compile with
gcc 3.4.3 and build with no sparse warnings.
thanks,
greg k-h
-------
USB: fix sparse and compiler warnings in ti_usb_3410_5052.c
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
diff -Nru a/drivers/usb/serial/ti_usb_3410_5052.c
b/drivers/usb/serial/ti_usb_3410_5052.c
--- a/drivers/usb/serial/ti_usb_3410_5052.c 2004-12-15 14:12:00 -08:00
+++ b/drivers/usb/serial/ti_usb_3410_5052.c 2004-12-15 14:12:00 -08:00
@@ -179,7 +179,7 @@
static int ti_get_serial_info(struct ti_port *tport,
struct serial_struct __user *ret_arg);
static int ti_set_serial_info(struct ti_port *tport,
- struct serial_struct *new_arg);
+ struct serial_struct __user *new_arg);
static void ti_handle_new_msr(struct ti_port *tport, __u8 msr);
static void ti_drain(struct ti_port *tport, unsigned long timeout, int flush);
@@ -200,10 +200,10 @@
/* circular buffer */
static struct circ_buf *ti_buf_alloc(void);
-static inline void ti_buf_free(struct circ_buf *cb);
-static inline void ti_buf_clear(struct circ_buf *cb);
-static inline int ti_buf_data_avail(struct circ_buf *cb);
-static inline int ti_buf_space_avail(struct circ_buf *cb);
+static void ti_buf_free(struct circ_buf *cb);
+static void ti_buf_clear(struct circ_buf *cb);
+static int ti_buf_data_avail(struct circ_buf *cb);
+static int ti_buf_space_avail(struct circ_buf *cb);
static int ti_buf_put(struct circ_buf *cb, const char *buf, int count);
static int ti_buf_get(struct circ_buf *cb, char *buf, int count);
@@ -841,7 +841,7 @@
case TIOCSSERIAL:
dbg("%s - (%d) TIOCSSERIAL", __FUNCTION__,
port->number);
- return ti_set_serial_info(tport, (struct serial_struct
*)arg);
+ return ti_set_serial_info(tport, (struct serial_struct
__user *)arg);
break;
case TIOCMIWAIT:
@@ -1428,7 +1428,7 @@
static int ti_set_serial_info(struct ti_port *tport,
- struct serial_struct *new_arg)
+ struct serial_struct __user *new_arg)
{
struct usb_serial_port *port = tport->tp_port;
struct serial_struct new_serial;
@@ -1734,7 +1734,7 @@
* Free the buffer and all associated memory.
*/
-static inline void ti_buf_free(struct circ_buf *cb)
+static void ti_buf_free(struct circ_buf *cb)
{
kfree(cb->buf);
kfree(cb);
@@ -1747,7 +1747,7 @@
* Clear out all data in the circular buffer.
*/
-static inline void ti_buf_clear(struct circ_buf *cb)
+static void ti_buf_clear(struct circ_buf *cb)
{
cb->head = cb->tail = 0;
}
@@ -1760,7 +1760,7 @@
* buffer.
*/
-static inline int ti_buf_data_avail(struct circ_buf *cb)
+static int ti_buf_data_avail(struct circ_buf *cb)
{
return CIRC_CNT(cb->head,cb->tail,TI_WRITE_BUF_SIZE);
}
@@ -1773,7 +1773,7 @@
* buffer.
*/
-static inline int ti_buf_space_avail(struct circ_buf *cb)
+static int ti_buf_space_avail(struct circ_buf *cb)
{
return CIRC_SPACE(cb->head,cb->tail,TI_WRITE_BUF_SIZE);
}
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel