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: <YEC9R+nSkFNqVyNG@smile.fi.intel.com>
Date:   Thu, 4 Mar 2021 12:58:15 +0200
From:   Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To:     Geert Uytterhoeven <geert@...ux-m68k.org>
Cc:     "open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Linus Walleij <linus.walleij@...aro.org>,
        Bartosz Golaszewski <bgolaszewski@...libre.com>
Subject: Re: [PATCH v1 2/2] gpio: aggregator: Replace custom get_arg() with a
 generic next_arg()

On Thu, Mar 04, 2021 at 10:01:46AM +0100, Geert Uytterhoeven wrote:
> Hi Andy,
> 
> On Mon, Mar 1, 2021 at 5:59 PM Andy Shevchenko
> <andriy.shevchenko@...ux.intel.com> wrote:
> > cmdline library provides next_arg() helper to traverse over parameters
> > and their values given in command line. Replace custom approach in the driver
> > by it.
> >
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
> 
> Thanks for your patch!
> 
> > --- a/drivers/gpio/gpio-aggregator.c
> > +++ b/drivers/gpio/gpio-aggregator.c
> > @@ -93,13 +68,9 @@ static int aggr_parse(struct gpio_aggregator *aggr)
> >         if (!bitmap)
> >                 return -ENOMEM;
> >
> > -       for (name = get_arg(&args), offsets = get_arg(&args); name;
> > -            offsets = get_arg(&args)) {
> > -               if (IS_ERR(name)) {
> > -                       pr_err("Cannot get GPIO specifier: %pe\n", name);
> > -                       error = PTR_ERR(name);
> > -                       goto free_bitmap;
> > -               }
> > +       args = next_arg(args, &name, &p);
> > +       while (*args) {
> > +               args = next_arg(args, &offsets, &p);
> 
> As name and offsets should not contain equal signs (can they?),
> I guess using next_arg() is fine.

Even though we can use double quotes (AFAICU the next_arg() code).

> Reviewed-by: Geert Uytterhoeven <geert+renesas@...der.be>

Thanks!

-- 
With Best Regards,
Andy Shevchenko


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ