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: <CAHp75Vfd4bmFCEpE8B0cNgKcmYVrJ=KjijY6Qq2HVtPPzOxoLA@mail.gmail.com>
Date:   Fri, 2 Jun 2017 13:32:53 +0300
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Jan Kiszka <jan.kiszka@...mens.com>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Linus Walleij <linus.walleij@...aro.org>,
        Alexandre Courbot <gnurou@...il.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        "linux-serial@...r.kernel.org" <linux-serial@...r.kernel.org>,
        "linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>,
        Sudip Mukherjee <sudip.mukherjee@...ethink.co.uk>,
        Sascha Weisenberger <sascha.weisenberger@...mens.com>
Subject: Re: [PATCH v5 10/11] gpio-exar/8250-exar: Make set of exported GPIOs configurable

On Fri, Jun 2, 2017 at 10:28 AM, Jan Kiszka <jan.kiszka@...mens.com> wrote:
> On the SIMATIC, IOT2040 only a single pin is exportable as GPIO, the
> rest is required to operate the UART. To allow modeling this case,
> expand the platform device data structure to specify a (consecutive) pin
> subset for exporting by the gpio-exar driver.

> +       if (device_property_read_u32(&pdev->dev, "gpio-exar,first-pin",
> +                                    &first_pin) < 0 ||
> +           device_property_read_u32(&pdev->dev, "ngpios", &ngpios) < 0)
> +               return -EINVAL;

You shadow an error.

Please use
ret = device_property_...;
if (ret)
 return ret;

ret = ...
...

Moreover, I missed how you named first property, I would go rather
with "linux," prefix to show that is _internal_ / Linux only property.

Perhaps something like "linux,first-pin" ?

-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ