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: <aa9ccf6a-ea0b-18f6-a28d-20b69f501295@suse.cz>
Date:   Tue, 28 Nov 2017 09:22:37 +0100
From:   Vlastimil Babka <vbabka@...e.cz>
To:     Vasyl Gomonovych <gomonovych@...il.com>, akpm@...ux-foundation.org,
        mhocko@...e.com, gregkh@...uxfoundation.org, tglx@...utronix.de,
        vinmenon@...eaurora.org, guptap@...eaurora.org, linux-mm@...ck.org
Cc:     linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm/page_owner: Use PTR_ERR_OR_ZERO()

On 11/28/2017 12:08 AM, Vasyl Gomonovych wrote:
> Fix ptr_ret.cocci warnings:
> mm/page_owner.c:639:1-3: WARNING: PTR_ERR_OR_ZERO can be used
> 
> Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR
> 
> Generated by: scripts/coccinelle/api/ptr_ret.cocci
> 
> Signed-off-by: Vasyl Gomonovych <gomonovych@...il.com>

Acked-by: Vlastimil Babka <vbabka@...e.cz>

> ---
>  mm/page_owner.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/mm/page_owner.c b/mm/page_owner.c
> index 4f44b95b9d1e..79ae586d1bce 100644
> --- a/mm/page_owner.c
> +++ b/mm/page_owner.c
> @@ -636,9 +636,7 @@ static int __init pageowner_init(void)
>  
>  	dentry = debugfs_create_file("page_owner", S_IRUSR, NULL,
>  			NULL, &proc_page_owner_operations);
> -	if (IS_ERR(dentry))
> -		return PTR_ERR(dentry);
>  
> -	return 0;
> +	return PTR_ERR_OR_ZERO(dentry);
>  }
>  late_initcall(pageowner_init)
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ