lkml.org 
[lkml]   [2018]   [Sep]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [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@zeniv.linux.org.uk>
    >
    > Signed-off-by: Al Viro <viro@zeniv.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

    \
     
     \ /
      Last update: 2018-09-13 13:56    [W:4.016 / U:0.100 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site