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: <CAA+D8APq+6E49pSuKs0yZ9F5+SaxQaSq5shsxSFztLROhyLCpw@mail.gmail.com>
Date: Thu, 18 Dec 2025 14:56:07 +0800
From: Shengjiu Wang <shengjiu.wang@...il.com>
To: Chancel Liu <chancel.liu@....com>
Cc: Xiubo.Lee@...il.com, festevam@...il.com, nicoleotsuka@...il.com, 
	lgirdwood@...il.com, broonie@...nel.org, perex@...ex.cz, tiwai@...e.com, 
	linux-kernel@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org, 
	linux-sound@...r.kernel.org, imx@...ts.linux.dev
Subject: Re: [PATCH] ASoC: fsl-asoc-card: Use of_property_present() for
 non-boolean properties

On Tue, Dec 16, 2025 at 3:18 PM Chancel Liu <chancel.liu@....com> 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.
> Otherwise there'll be kernel warning:
> [   29.018081] OF: /sound-wm8962: Read of boolean property 'hp-det-gpios' with a value.
>
> Signed-off-by: Chancel Liu <chancel.liu@....com>

Reviewed-by: Shengjiu Wang <shengjiu.wang@...il.com>

Best regards
Shengjiu Wang
> ---
>  sound/soc/fsl/fsl-asoc-card.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/sound/soc/fsl/fsl-asoc-card.c b/sound/soc/fsl/fsl-asoc-card.c
> index 2c7eb0baa0f3..70a6159430ed 100644
> --- a/sound/soc/fsl/fsl-asoc-card.c
> +++ b/sound/soc/fsl/fsl-asoc-card.c
> @@ -1045,8 +1045,8 @@ static int fsl_asoc_card_probe(struct platform_device *pdev)
>          * The notifier is initialized in snd_soc_card_jack_new(), then
>          * snd_soc_jack_notifier_register can be called.
>          */
> -       if (of_property_read_bool(np, "hp-det-gpios") ||
> -           of_property_read_bool(np, "hp-det-gpio") /* deprecated */) {
> +       if (of_property_present(np, "hp-det-gpios") ||
> +           of_property_present(np, "hp-det-gpio") /* deprecated */) {
>                 ret = simple_util_init_jack(&priv->card, &priv->hp_jack,
>                                             1, NULL, "Headphone Jack");
>                 if (ret)
> @@ -1055,8 +1055,8 @@ static int fsl_asoc_card_probe(struct platform_device *pdev)
>                 snd_soc_jack_notifier_register(&priv->hp_jack.jack, &hp_jack_nb);
>         }
>
> -       if (of_property_read_bool(np, "mic-det-gpios") ||
> -           of_property_read_bool(np, "mic-det-gpio") /* deprecated */) {
> +       if (of_property_present(np, "mic-det-gpios") ||
> +           of_property_present(np, "mic-det-gpio") /* deprecated */) {
>                 ret = simple_util_init_jack(&priv->card, &priv->mic_jack,
>                                             0, NULL, "Mic Jack");
>                 if (ret)
> --
> 2.50.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ