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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPybu_2rpXkJEDkJ+jBtja-U+KK2LfDubpXz22xL1UAtKNdACA@mail.gmail.com>
Date:   Wed, 6 Jun 2018 09:28:43 +0200
From:   Ricardo Ribalda Delgado <ricardo.ribalda@...il.com>
To:     Andy Shevchenko <andy.shevchenko@...il.com>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        "open list:SERIAL DRIVERS" <linux-serial@...r.kernel.org>,
        Rob Herring <robh@...nel.org>, Johan Hovold <johan@...nel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Jiri Slaby <jslaby@...e.com>
Subject: Re: [PATCH 19/19] serdev: Instantiate a ttydev serdev if acpi and of fails

Hi Andy,

On Tue, Jun 5, 2018 at 3:44 PM Andy Shevchenko
<andy.shevchenko@...il.com> wrote:
>
> On Tue, May 29, 2018 at 4:10 PM, Ricardo Ribalda Delgado
> <ricardo.ribalda@...il.com> wrote:
> > If a serdev ttyport controller does not have an acpi nor an of child,
> > create a ttydev as a child of that controller.
> >
> > Doing this allows the removal, addition and replacement of ttydev devices
> > at runtime.
>
> > @@ -619,6 +619,27 @@ static inline int acpi_serdev_register_devices(struct serdev_controller *ctrl)
> >  }
> >  #endif /* CONFIG_ACPI */
> >
> > +
>
> Redundant blank line.

ACK
>
> > +#if IS_ENABLED(CONFIG_SERIAL_DEV_CTRL_TTYDEV)
>
> > -       if (ret_of && ret_acpi) {
> > -               dev_dbg(&ctrl->dev, "no devices registered: of:%d acpi:%d\n",
> > -                       ret_of, ret_acpi);
> > +
> > +#if IS_ENABLED(CONFIG_SERIAL_DEV_CTRL_TTYDEV)
> > +       if (ret_of && ret_acpi && ctrl->is_ttyport)
> > +               ret_tty = serdev_controller_add_ttydev(ctrl);
> > +#endif
> > +
> > +       if (ret_of && ret_acpi && ret_tty) {
> > +               dev_dbg(&ctrl->dev,
> > +                       "no devices registered: of:%d acpi:%d tty:%d\n",
> > +                       ret_of, ret_acpi, ret_tty);
> >                 ret = -ENODEV;
> >                 goto out_dev_del;
> >         }
>
> Wouldn't be better to leave above if-condition and introduce your
> stuff inside it?

I have redesign the logic in the function on the next version

Thanks


-- 
Ricardo Ribalda

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ