From: Dragan Simic <dsimic@manjaro.org>
To: "Rob Herring (Arm)" <robh@kernel.org>
Cc: Ulf Hansson <ulf.hansson@linaro.org>,
Adrian Hunter <adrian.hunter@intel.com>,
Haibo Chen <haibo.chen@nxp.com>, Shawn Guo <shawnguo@kernel.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Fabio Estevam <festevam@gmail.com>,
linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org,
imx@lists.linux.dev, s32@nxp.com,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] mmc: Use of_property_present() for non-boolean properties
Date: Tue, 05 Nov 2024 07:29:50 +0100 [thread overview]
Message-ID: <e737fdb7766495ec95fdf42d23c68736@manjaro.org> (raw)
In-Reply-To: <20241104190707.275758-1-robh@kernel.org>
Hello Rob,
On 2024-11-04 20:07, Rob Herring (Arm) wrote:
> The use of of_property_read_bool() for non-boolean properties is
> deprecated in favor of of_property_present() when testing for property
> presence.
>
> Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Looking good to me, thanks for the patch! See also a small nitpick
below.
Reviewed-by: Dragan Simic <dsimic@manjaro.org>
> ---
> drivers/mmc/host/mxcmmc.c | 6 +++---
> drivers/mmc/host/sdhci-esdhc-imx.c | 2 +-
> 2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/mmc/host/mxcmmc.c b/drivers/mmc/host/mxcmmc.c
> index 1edf65291354..dcb1a7336029 100644
> --- a/drivers/mmc/host/mxcmmc.c
> +++ b/drivers/mmc/host/mxcmmc.c
> @@ -1048,9 +1048,9 @@ static int mxcmci_probe(struct platform_device
> *pdev)
>
> if (pdata)
> dat3_card_detect = pdata->dat3_card_detect;
> - else if (mmc_card_is_removable(mmc)
> - && !of_property_read_bool(pdev->dev.of_node, "cd-gpios"))
> - dat3_card_detect = true;
> + else
> + dat3_card_detect = mmc_card_is_removable(mmc) &&
> + !of_property_present(pdev->dev.of_node, "cd-gpios");
There's enough space in the allowed 100 columns to align "mmc_card_..."
and "!of_property_..." by indenting the latter further a bit.
>
> ret = mmc_regulator_get_supply(mmc);
> if (ret)
> diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c
> b/drivers/mmc/host/sdhci-esdhc-imx.c
> index 8f0bc6dca2b0..cda1872769e0 100644
> --- a/drivers/mmc/host/sdhci-esdhc-imx.c
> +++ b/drivers/mmc/host/sdhci-esdhc-imx.c
> @@ -1629,7 +1629,7 @@ sdhci_esdhc_imx_probe_dt(struct platform_device
> *pdev,
> * Retrieveing and requesting the actual WP GPIO will happen
> * in the call to mmc_of_parse().
> */
> - if (of_property_read_bool(np, "wp-gpios"))
> + if (of_property_present(np, "wp-gpios"))
> boarddata->wp_type = ESDHC_WP_GPIO;
>
> of_property_read_u32(np, "fsl,tuning-step", &boarddata->tuning_step);
next prev parent reply other threads:[~2024-11-05 6:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-04 19:07 [PATCH] mmc: Use of_property_present() for non-boolean properties Rob Herring (Arm)
2024-11-05 1:57 ` Bough Chen
2024-11-05 6:29 ` Dragan Simic [this message]
2024-11-08 8:46 ` Adrian Hunter
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=e737fdb7766495ec95fdf42d23c68736@manjaro.org \
--to=dsimic@manjaro.org \
--cc=adrian.hunter@intel.com \
--cc=festevam@gmail.com \
--cc=haibo.chen@nxp.com \
--cc=imx@lists.linux.dev \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=robh@kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=s32@nxp.com \
--cc=shawnguo@kernel.org \
--cc=ulf.hansson@linaro.org \
/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