[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180913103331.GA1460@kroah.com>
Date: Thu, 13 Sep 2018 12:33:31 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: Al Viro <viro@...IV.linux.org.uk>
Cc: Arnd Bergmann <arnd@...db.de>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 09/50] amiserial: switch to ->[sg]et_serial()
On Thu, Sep 13, 2018 at 03:40:08AM +0100, Al Viro wrote:
> From: Al Viro <viro@...iv.linux.org.uk>
>
> Signed-off-by: Al Viro <viro@...iv.linux.org.uk>
> ---
> drivers/tty/amiserial.c | 83 ++++++++++++++++++++++---------------------------
> 1 file changed, 38 insertions(+), 45 deletions(-)
>
> diff --git a/drivers/tty/amiserial.c b/drivers/tty/amiserial.c
> index 34dead614149..17fc8bb6c6b8 100644
> --- a/drivers/tty/amiserial.c
> +++ b/drivers/tty/amiserial.c
> @@ -996,63 +996,60 @@ static void rs_unthrottle(struct tty_struct * tty)
> * ------------------------------------------------------------
> */
>
> -static int get_serial_info(struct tty_struct *tty, struct serial_state *state,
> - struct serial_struct __user * retinfo)
> +static int get_serial_info(struct tty_struct *tty, struct serial_struct *ss)
> {
> - struct serial_struct tmp;
> -
> - memset(&tmp, 0, sizeof(tmp));
> + struct serial_state *state = tty->driver_data;
> +
> + if (serial_paranoia_check(state, tty->name, "rs_ioctl"))
> + return -ENODEV;
These crazy paranoia check functions just need to be deleted, no need to
add new ones here. Or we can just delete them later on...
thanks,
greg k-h
Powered by blists - more mailing lists