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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ce35708b-34ee-cc0a-3cf7-ff955f14db2d@gmail.com>
Date:   Sat, 16 Jan 2021 12:55:07 +0300
From:   Sergei Shtylyov <sergei.shtylyov@...il.com>
To:     Adam Ford <aford173@...il.com>, linux-renesas-soc@...r.kernel.org
Cc:     aford@...conembedded.com, "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Rob Herring <robh+dt@...nel.org>,
        Geert Uytterhoeven <geert+renesas@...der.be>,
        Magnus Damm <magnus.damm@...il.com>, netdev@...r.kernel.org,
        devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH V2 4/4] net: ethernet: ravb: Enable optional refclk

Hello!

On 15.01.2021 23:19, Adam Ford wrote:

> For devices that use a programmable clock for the avb reference clock,

    AVB.

> the driver may need to enable them.  Add code to find the optional clock
> and enable it when available.
> 
> Signed-off-by: Adam Ford <aford173@...il.com>
[...]
> diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c
> index bd30505fbc57..739e30f45daa 100644
> --- a/drivers/net/ethernet/renesas/ravb_main.c
> +++ b/drivers/net/ethernet/renesas/ravb_main.c
> @@ -2148,6 +2148,14 @@ static int ravb_probe(struct platform_device *pdev)
>   		goto out_release;
>   	}
>   
> +	priv->refclk = devm_clk_get_optional(&pdev->dev, "refclk");
> +	if (IS_ERR(priv->refclk)) {
> +		error = PTR_ERR(priv->refclk);
> +		goto out_release;
> +	} else {

    No need for *else* after *goto*.

> +		(void)clk_prepare_enable(priv->refclk);

    You can really omit (void)...
    Also, I'm not seeing where do you call clk_disable_unprepare()...

[...]

MBR, Sergei

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ