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]
Date:   Thu, 10 Aug 2023 16:44:20 +0300
From:   Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To:     Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
Cc:     Jonathan Cameron <jic23@...nel.org>,
        Marcus Folkesson <marcus.folkesson@...il.com>,
        Kent Gustavsson <kent@...oris.se>,
        Lars-Peter Clausen <lars@...afoo.de>,
        Rob Herring <robh+dt@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Conor Dooley <conor+dt@...nel.org>,
        Cosmin Tanislav <demonsingur@...il.com>,
        Arnd Bergmann <arnd@...db.de>,
        ChiYuan Huang <cy_huang@...htek.com>,
        Haibo Chen <haibo.chen@....com>,
        Ramona Bolboaca <ramona.bolboaca@...log.com>,
        Ibrahim Tilki <Ibrahim.Tilki@...log.com>,
        ChiaEn Wu <chiaen_wu@...htek.com>,
        William Breathitt Gray <william.gray@...aro.org>,
        linux-iio@...r.kernel.org, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 4/4] iio: adc: mcp3911: add support for the whole
 MCP39xx family

On Wed, Aug 09, 2023 at 08:14:54PM +0200, Krzysztof Kozlowski wrote:
> On 09/08/2023 20:02, Jonathan Cameron wrote:
> > On Wed, 9 Aug 2023 08:41:05 +0200
> > Marcus Folkesson <marcus.folkesson@...il.com> wrote:

...

> >>> Inconsistent macro implementation, i.e. you need to use (x).
> >>
> >> Sorry, I do not get you

In other macros you avoid ambiguity of the parameter, so they can be evaluated
properly, and not here.


...

> >>>> +	if (device_property_read_bool(&adc->spi->dev, "microchip,data-ready-hiz"))

(1)

> >>> This also becomes shorter.
> >>>
> >>> One trick to make it even shorter:
> >>>
> >>> 	if (device_property_present(dev, "microchip,data-ready-hiz"))
> >>
> >> Thank you, I wasn't aware of device_property_present().
> > 
> > I know the read_bool function is direct equivalent of this but where a property
> > is a flag, it feels more natural to me to check it with that one.
> > read_present() feels more appropriate for where you want to know a more
> > complex property is present.
> > 
> > Doesn't matter that much either way however so up to you.
> 
> For the OF, of_property_read_bool() is indeed preferred. Is there
> device-xxx() equivalent?

See (1) above ?

-- 
With Best Regards,
Andy Shevchenko


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ