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: <d9360eb7-b7b3-b76c-921e-9c24f133985d@wanadoo.fr>
Date:   Wed, 3 Aug 2022 08:19:15 +0200
From:   Christophe JAILLET <christophe.jaillet@...adoo.fr>
To:     cgel.zte@...il.com, linux-kernel@...r.kernel.org
Cc:     zbr@...emap.net, ye xingchen <ye.xingchen@....com.cn>,
        Zeal Robot <zealci@....com.cn>
Subject: Re: [PATCH linux-next] w1: omap-hdq:using the
 pm_runtime_resume_and_get to simplify the code

Le 03/08/2022 à 08:11, cgel.zte@...il.com a écrit :
> From: ye xingchen <ye.xingchen@....com.cn>
> 
> Using pm_runtime_resume_and_get() to instade of
>   pm_runtime_get_sync and pm_runtime_put_noidle.
> 
> Reported-by: Zeal Robot <zealci@....com.cn>
> Signed-off-by: ye xingchen <ye.xingchen@....com.cn>
> ---
>   drivers/w1/masters/omap_hdq.c | 18 ++++++------------
>   1 file changed, 6 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/w1/masters/omap_hdq.c b/drivers/w1/masters/omap_hdq.c
> index bf2ec59c1f9d..ec4292bc0458 100644
> --- a/drivers/w1/masters/omap_hdq.c
> +++ b/drivers/w1/masters/omap_hdq.c
> @@ -372,9 +372,8 @@ static u8 omap_w1_triplet(void *_hdq, u8 bdir)
>   		  OMAP_HDQ_CTRL_STATUS_INTERRUPTMASK;
>   	u8 mask = ctrl | OMAP_HDQ_CTRL_STATUS_DIR;
>   
> -	err = pm_runtime_get_sync(hdq_data->dev);
> +	err = pm_runtime_resume_and_get(hdq_data->dev);
>   	if (err < 0) {
> -		pm_runtime_put_noidle(hdq_data->dev);
>   
>   		return err;
>   	}

I don't have a strong opinion on the patch itself, but the resulting 
would look like:
	err = pm_runtime_resume_and_get(hdq_data->dev);
    	if (err < 0) {

    		return err;
    	}

which is odd. { } and extra blank line should be removed, IMHO.

CJ

[...]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ