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: <21d44d0b-05c0-1912-15de-a5c74d3ff4c6@microchip.com>
Date:   Mon, 13 Mar 2023 10:09:37 +0100
From:   Nicolas Ferre <nicolas.ferre@...rochip.com>
To:     Rob Herring <robh@...nel.org>,
        Wolfgang Grandegger <wg@...ndegger.com>,
        Marc Kleine-Budde <mkl@...gutronix.de>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>,
        Claudiu Beznea <claudiu.beznea@...rochip.com>,
        Wei Fang <wei.fang@....com>,
        Shenwei Wang <shenwei.wang@....com>,
        Clark Wang <xiaoning.wang@....com>,
        NXP Linux Team <linux-imx@....com>,
        Claudiu Manoil <claudiu.manoil@....com>,
        "Giuseppe Cavallaro" <peppe.cavallaro@...com>,
        Alexandre Torgue <alexandre.torgue@...s.st.com>,
        Jose Abreu <joabreu@...opsys.com>,
        Shawn Guo <shawnguo@...nel.org>,
        Sascha Hauer <s.hauer@...gutronix.de>,
        "Pengutronix Kernel Team" <kernel@...gutronix.de>,
        Fabio Estevam <festevam@...il.com>,
        Maxime Coquelin <mcoquelin.stm32@...il.com>,
        Grygorii Strashko <grygorii.strashko@...com>,
        Francois Romieu <romieu@...zoreil.com>,
        "Michal Simek" <michal.simek@...inx.com>,
        Zhao Qiang <qiang.zhao@....com>, Kalle Valo <kvalo@...nel.org>,
        Samuel Mendoza-Jonas <sam@...dozajonas.com>
CC:     <devicetree@...r.kernel.org>, <linux-can@...r.kernel.org>,
        <netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <linux-stm32@...md-mailman.stormreply.com>,
        <linux-arm-kernel@...ts.infradead.org>,
        <linux-omap@...r.kernel.org>, <linuxppc-dev@...ts.ozlabs.org>,
        <linux-wireless@...r.kernel.org>
Subject: Re: [PATCH] net: Use of_property_read_bool() for boolean properties

On 10/03/2023 at 15:47, Rob Herring wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> It is preferred to use typed property access functions (i.e.
> of_property_read_<type> functions) rather than low-level
> of_get_property/of_find_property functions for reading properties.
> Convert reading boolean properties to to of_property_read_bool().
> 
> Signed-off-by: Rob Herring <robh@...nel.org>
> ---
>   drivers/net/can/cc770/cc770_platform.c          | 12 ++++++------
>   drivers/net/ethernet/cadence/macb_main.c        |  2 +-

Acked-by: Nicolas Ferre <nicolas.ferre@...rochip.com>

>   drivers/net/ethernet/davicom/dm9000.c           |  4 ++--

[..]

> --- a/drivers/net/ethernet/cadence/macb_main.c
> +++ b/drivers/net/ethernet/cadence/macb_main.c
> @@ -4990,7 +4990,7 @@ static int macb_probe(struct platform_device *pdev)
>                  bp->jumbo_max_len = macb_config->jumbo_max_len;
> 
>          bp->wol = 0;
> -       if (of_get_property(np, "magic-packet", NULL))
> +       if (of_property_read_bool(np, "magic-packet"))
>                  bp->wol |= MACB_WOL_HAS_MAGIC_PACKET;
>          device_set_wakeup_capable(&pdev->dev, bp->wol & MACB_WOL_HAS_MAGIC_PACKET);

[..]

-- 
Nicolas Ferre

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ