Linux on ARM based TI OMAP SoCs
 help / color / mirror / Atom feed
From: Nicolas Ferre <nicolas.ferre@microchip.com>
To: Rob Herring <robh@kernel.org>,
	Wolfgang Grandegger <wg@grandegger.com>,
	Marc Kleine-Budde <mkl@pengutronix.de>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Claudiu Beznea <claudiu.beznea@microchip.com>,
	Wei Fang <wei.fang@nxp.com>, Shenwei Wang <shenwei.wang@nxp.com>,
	Clark Wang <xiaoning.wang@nxp.com>,
	NXP Linux Team <linux-imx@nxp.com>,
	Claudiu Manoil <claudiu.manoil@nxp.com>,
	"Giuseppe Cavallaro" <peppe.cavallaro@st.com>,
	Alexandre Torgue <alexandre.torgue@foss.st.com>,
	Jose Abreu <joabreu@synopsys.com>,
	Shawn Guo <shawnguo@kernel.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	"Pengutronix Kernel Team" <kernel@pengutronix.de>,
	Fabio Estevam <festevam@gmail.com>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	Grygorii Strashko <grygorii.strashko@ti.com>,
	Francois Romieu <romieu@fr.zoreil.com>,
	"Michal Simek" <michal.simek@xilinx.com>,
	Zhao Qiang <qiang.zhao@nxp.com>, Kalle Valo <kvalo@kernel.org>,
	Samuel Mendoza-Jonas <sam@mendozajonas.com>
Cc: <devicetree@vger.kernel.org>, <linux-can@vger.kernel.org>,
	<netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<linux-stm32@st-md-mailman.stormreply.com>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-omap@vger.kernel.org>, <linuxppc-dev@lists.ozlabs.org>,
	<linux-wireless@vger.kernel.org>
Subject: Re: [PATCH] net: Use of_property_read_bool() for boolean properties
Date: Mon, 13 Mar 2023 10:09:37 +0100	[thread overview]
Message-ID: <21d44d0b-05c0-1912-15de-a5c74d3ff4c6@microchip.com> (raw)
In-Reply-To: <20230310144718.1544169-1-robh@kernel.org>

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@kernel.org>
> ---
>   drivers/net/can/cc770/cc770_platform.c          | 12 ++++++------
>   drivers/net/ethernet/cadence/macb_main.c        |  2 +-

Acked-by: Nicolas Ferre <nicolas.ferre@microchip.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


  parent reply	other threads:[~2023-03-13  9:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-10 14:47 [PATCH] net: Use of_property_read_bool() for boolean properties Rob Herring
2023-03-11 11:50 ` Simon Horman
2023-03-14 19:14   ` Rob Herring
2023-03-15  8:35     ` Simon Horman
2023-03-12 10:16 ` Marc Kleine-Budde
2023-03-13  6:57 ` Kalle Valo
2023-03-13  9:09 ` Nicolas Ferre [this message]
2023-03-14  2:12 ` Wei Fang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=21d44d0b-05c0-1912-15de-a5c74d3ff4c6@microchip.com \
    --to=nicolas.ferre@microchip.com \
    --cc=alexandre.torgue@foss.st.com \
    --cc=claudiu.beznea@microchip.com \
    --cc=claudiu.manoil@nxp.com \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=festevam@gmail.com \
    --cc=grygorii.strashko@ti.com \
    --cc=joabreu@synopsys.com \
    --cc=kernel@pengutronix.de \
    --cc=kuba@kernel.org \
    --cc=kvalo@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-can@vger.kernel.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=michal.simek@xilinx.com \
    --cc=mkl@pengutronix.de \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=peppe.cavallaro@st.com \
    --cc=qiang.zhao@nxp.com \
    --cc=robh@kernel.org \
    --cc=romieu@fr.zoreil.com \
    --cc=s.hauer@pengutronix.de \
    --cc=sam@mendozajonas.com \
    --cc=shawnguo@kernel.org \
    --cc=shenwei.wang@nxp.com \
    --cc=wei.fang@nxp.com \
    --cc=wg@grandegger.com \
    --cc=xiaoning.wang@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox