2011-04-02 01:04:18

by Randy Dunlap

[permalink] [raw]
Subject: [PATCH] usb/serial: fix function args warnings, dropping *filp

From: Randy Dunlap <[email protected]>

Fix build warnings caused by removal of *filp arg in
struct usb_serial_driver.
These changes were missed somehow in commits
00a0d0d65b61241a718d0aee96f46b9a2d93bf26 and
60b33c133ca0b7c0b6072c87234b63fee6e80558.

drivers/usb/serial/mct_u232.c:159: warning: initialization from incompatible pointer type
drivers/usb/serial/opticon.c:627: warning: initialization from incompatible pointer type

Signed-off-by: Randy Dunlap <[email protected]>
Cc: Alan Cox <[email protected]>
---
drivers/usb/serial/mct_u232.c | 4 ++--
drivers/usb/serial/opticon.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)

--- linux-next-20110401.orig/drivers/usb/serial/mct_u232.c
+++ linux-next-20110401/drivers/usb/serial/mct_u232.c
@@ -106,7 +106,7 @@ static void mct_u232_break_ctl(struct tt
static int mct_u232_tiocmget(struct tty_struct *tty);
static int mct_u232_tiocmset(struct tty_struct *tty,
unsigned int set, unsigned int clear);
-static int mct_u232_ioctl(struct tty_struct *tty, struct file *file,
+static int mct_u232_ioctl(struct tty_struct *tty,
unsigned int cmd, unsigned long arg);
static int mct_u232_get_icount(struct tty_struct *tty,
struct serial_icounter_struct *icount);
@@ -874,7 +874,7 @@ static void mct_u232_unthrottle(struct t
}
}

-static int mct_u232_ioctl(struct tty_struct *tty, struct file *file,
+static int mct_u232_ioctl(struct tty_struct *tty,
unsigned int cmd, unsigned long arg)
{
DEFINE_WAIT(wait);
--- linux-next-20110401.orig/drivers/usb/serial/opticon.c
+++ linux-next-20110401/drivers/usb/serial/opticon.c
@@ -413,7 +413,7 @@ static int opticon_tiocmget(struct tty_s
return result;
}

-static int opticon_tiocmset(struct tty_struct *tty, struct file *file,
+static int opticon_tiocmset(struct tty_struct *tty,
unsigned int set, unsigned int clear)
{
struct usb_serial_port *port = tty->driver_data;


2011-04-02 12:53:11

by Sergei Shtylyov

[permalink] [raw]
Subject: Re: [PATCH] usb/serial: fix function args warnings, dropping *filp

Hello.

On 02-04-2011 5:04, Randy Dunlap wrote:

> From: Randy Dunlap<[email protected]>

> Fix build warnings caused by removal of *filp arg in
> struct usb_serial_driver.
> These changes were missed somehow in commits
> 00a0d0d65b61241a718d0aee96f46b9a2d93bf26 and
> 60b33c133ca0b7c0b6072c87234b63fee6e80558.

How about also specifying the commit summaries for the human readers?

> drivers/usb/serial/mct_u232.c:159: warning: initialization from incompatible pointer type
> drivers/usb/serial/opticon.c:627: warning: initialization from incompatible pointer type

> Signed-off-by: Randy Dunlap<[email protected]>
> Cc: Alan Cox<[email protected]>

WBR, Sergei

2011-04-03 18:42:15

by Randy Dunlap

[permalink] [raw]
Subject: [PATCH v2] usb/serial: fix function args warnings, dropping *filp

From: Randy Dunlap <[email protected]>

Fix build warnings caused by removal of *filp arg in
struct usb_serial_driver.

These changes were missed somehow in commits
00a0d0d65b61241a718d0aee96f46b9a2d93bf26:
tty: remove filp from the USB tty ioctls
and
60b33c133ca0b7c0b6072c87234b63fee6e80558:
tiocmget: kill off the passing of the struct file

drivers/usb/serial/mct_u232.c:159: warning: initialization from incompatible pointer type
drivers/usb/serial/opticon.c:627: warning: initialization from incompatible pointer type

Signed-off-by: Randy Dunlap <[email protected]>
Cc: Alan Cox <[email protected]>
---
drivers/usb/serial/mct_u232.c | 4 ++--
drivers/usb/serial/opticon.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)

--- linux-next-20110401.orig/drivers/usb/serial/mct_u232.c
+++ linux-next-20110401/drivers/usb/serial/mct_u232.c
@@ -106,7 +106,7 @@ static void mct_u232_break_ctl(struct tt
static int mct_u232_tiocmget(struct tty_struct *tty);
static int mct_u232_tiocmset(struct tty_struct *tty,
unsigned int set, unsigned int clear);
-static int mct_u232_ioctl(struct tty_struct *tty, struct file *file,
+static int mct_u232_ioctl(struct tty_struct *tty,
unsigned int cmd, unsigned long arg);
static int mct_u232_get_icount(struct tty_struct *tty,
struct serial_icounter_struct *icount);
@@ -874,7 +874,7 @@ static void mct_u232_unthrottle(struct t
}
}

-static int mct_u232_ioctl(struct tty_struct *tty, struct file *file,
+static int mct_u232_ioctl(struct tty_struct *tty,
unsigned int cmd, unsigned long arg)
{
DEFINE_WAIT(wait);
--- linux-next-20110401.orig/drivers/usb/serial/opticon.c
+++ linux-next-20110401/drivers/usb/serial/opticon.c
@@ -413,7 +413,7 @@ static int opticon_tiocmget(struct tty_s
return result;
}

-static int opticon_tiocmset(struct tty_struct *tty, struct file *file,
+static int opticon_tiocmset(struct tty_struct *tty,
unsigned int set, unsigned int clear)
{
struct usb_serial_port *port = tty->driver_data;
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***