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] [day] [month] [year] [list]
Message-ID: <11314269.jSQc6MYxeX@kreacher>
Date:   Fri, 31 May 2019 11:28:54 +0200
From:   "Rafael J. Wysocki" <rjw@...ysocki.net>
To:     Kefeng Wang <wangkefeng.wang@...wei.com>
Cc:     Len Brown <len.brown@...el.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
        Geert Uytterhoeven <geert+renesas@...der.be>
Subject: Re: [PATCH v2] drivers: base: power: Use of_clk_get_parent_count()

On Monday, May 27, 2019 2:05:35 PM CEST Kefeng Wang wrote:
> Use of_clk_get_parent_count() instead of open coding.
> 
> Reviewed-by: Geert Uytterhoeven <geert+renesas@...der.be>
> Signed-off-by: Kefeng Wang <wangkefeng.wang@...wei.com>
> ---
>  drivers/base/power/clock_ops.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/base/power/clock_ops.c b/drivers/base/power/clock_ops.c
> index 59d19dd64928..3e84e3085d43 100644
> --- a/drivers/base/power/clock_ops.c
> +++ b/drivers/base/power/clock_ops.c
> @@ -12,6 +12,7 @@
>  #include <linux/pm_clock.h>
>  #include <linux/clk.h>
>  #include <linux/clkdev.h>
> +#include <linux/of_clk.h>
>  #include <linux/slab.h>
>  #include <linux/err.h>
>  #include <linux/pm_domain.h>
> @@ -195,8 +196,7 @@ int of_pm_clk_add_clks(struct device *dev)
>  	if (!dev || !dev->of_node)
>  		return -EINVAL;
>  
> -	count = of_count_phandle_with_args(dev->of_node, "clocks",
> -					   "#clock-cells");
> +	count = of_clk_get_parent_count(dev->of_node);
>  	if (count <= 0)
>  		return -ENODEV;
>  
> 

Applied, thanks!




Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ