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]
Date:   Mon, 5 Jun 2017 10:18:17 -0700 (PDT)
From:   Stefano Stabellini <sstabellini@...nel.org>
To:     SF Markus Elfring <elfring@...rs.sourceforge.net>
cc:     linux-arm-kernel@...ts.infradead.org,
        xen-devel@...ts.xenproject.org,
        Russell King <linux@...linux.org.uk>,
        Stefano Stabellini <sstabellini@...nel.org>,
        LKML <linux-kernel@...r.kernel.org>,
        kernel-janitors@...r.kernel.org
Subject: Re: [PATCH 3/3] arm/xen: Adjust one function call together with a
 variable assignment

On Sun, 4 Jun 2017, SF Markus Elfring wrote:
> From: Markus Elfring <elfring@...rs.sourceforge.net>
> Date: Sun, 4 Jun 2017 21:21:20 +0200
> 
> The script "checkpatch.pl" pointed information out like the following.
> 
> ERROR: do not use assignment in if condition
> 
> Thus fix the affected source code place.
> 
> Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>

Reviewed-by: Stefano Stabellini <sstabellini@...nel.org>

> ---
>  arch/arm/xen/p2m.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm/xen/p2m.c b/arch/arm/xen/p2m.c
> index f5f74ac637b9..e71eefa2e427 100644
> --- a/arch/arm/xen/p2m.c
> +++ b/arch/arm/xen/p2m.c
> @@ -153,7 +153,8 @@ bool __set_phys_to_machine_multi(unsigned long pfn,
>  	p2m_entry->mfn = mfn;
>  
>  	write_lock_irqsave(&p2m_lock, irqflags);
> -	if ((rc = xen_add_phys_to_mach_entry(p2m_entry)) < 0) {
> +	rc = xen_add_phys_to_mach_entry(p2m_entry);
> +	if (rc < 0) {
>  		write_unlock_irqrestore(&p2m_lock, irqflags);
>  		return false;
>  	}
> -- 
> 2.13.0
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ