[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAL_JsqLAJ076Mb+XNkU5okLC6paO_Bi4PdJx+-z=BzEVBXYLGw@mail.gmail.com>
Date: Tue, 28 Jan 2025 14:24:35 -0600
From: Rob Herring <robh@...nel.org>
To: Geert Uytterhoeven <geert+renesas@...der.be>
Cc: Liam Girdwood <lgirdwood@...il.com>, Mark Brown <broonie@...nel.org>,
Jaroslav Kysela <perex@...ex.cz>, Takashi Iwai <tiwai@...e.com>,
Kuninori Morimoto <kuninori.morimoto.gx@...esas.com>, linux-sound@...r.kernel.org,
linux-renesas-soc@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ASoC: soc-core: Stop using of_property_read_bool() for
non-boolean properties
On Wed, Jan 22, 2025 at 2:21 AM Geert Uytterhoeven
<geert+renesas@...der.be> wrote:
>
> On R-Car:
>
> OF: /sound: Read of boolean property 'simple-audio-card,bitclock-master' with a value.
> OF: /sound: Read of boolean property 'simple-audio-card,frame-master' with a value.
>
> or:
>
> OF: /soc/sound@...00000/ports/port@...ndpoint: Read of boolean property 'bitclock-master' with a value.
> OF: /soc/sound@...00000/ports/port@...ndpoint: Read of boolean property 'frame-master' with a value.
>
> The use of of_property_read_bool() for non-boolean properties is
> deprecated in favor of of_property_present() when testing for property
> presence.
>
> Replace testing for presence before calling of_property_read_u32() by
> testing for an -EINVAL return value from the latter, to simplify the
> code.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@...der.be>
> ---
> Seen since commit c141ecc3cecd7647 ("of: Warn when
> of_property_read_bool() is used on non-boolean properties") in
> dt-rh/for-next.
>
> I could not exercise all code paths, so review/testing would be
> appreciated. Thanks!
> ---
> sound/soc/soc-core.c | 32 +++++++++++++-------------------
> 1 file changed, 13 insertions(+), 19 deletions(-)
Acked-by: Rob Herring (Arm) <robh@...nel.org>
Powered by blists - more mailing lists