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: <c2191745-714c-7cdc-ba2d-a254245bbdac@linaro.org>
Date:   Mon, 13 Mar 2023 09:25:06 +0100
From:   Philippe Mathieu-Daudé <philmd@...aro.org>
To:     Rob Herring <robh@...nel.org>,
        Thomas Bogendoerfer <tsbogend@...ha.franken.de>
Cc:     devicetree@...r.kernel.org, linux-mips@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mips: Use of_property_read_bool() for boolean properties

Hi Rob,

On 10/3/23 15:46, Rob Herring wrote:
> 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>
> ---
>   arch/mips/pci/pci-lantiq.c | 2 +-
>   arch/mips/pci/pci-rt3883.c | 2 +-
>   2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/mips/pci/pci-lantiq.c b/arch/mips/pci/pci-lantiq.c
> index d967e4c0cf24..79e29bf42a24 100644
> --- a/arch/mips/pci/pci-lantiq.c
> +++ b/arch/mips/pci/pci-lantiq.c
> @@ -118,7 +118,7 @@ static int ltq_pci_startup(struct platform_device *pdev)
>   
>   	/* and enable the clocks */
>   	clk_enable(clk_pci);
> -	if (of_find_property(node, "lantiq,external-clock", NULL))
> +	if (of_property_read_bool(node, "lantiq,external-clock"))

Just curious, is this property correct? I can't find it and wonder if
this is dead code (always disabling the clock)... I'm probably missing
something obvious :/

>   		clk_enable(clk_external);
>   	else
>   		clk_disable(clk_external);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ