linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Vlastimil Babka <vbabka@suse.cz>
To: Vasyl Gomonovych <gomonovych@gmail.com>,
	akpm@linux-foundation.org, mhocko@suse.com,
	gregkh@linuxfoundation.org, tglx@linutronix.de,
	vinmenon@codeaurora.org, guptap@codeaurora.org,
	linux-mm@kvack.org
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm/page_owner: Use PTR_ERR_OR_ZERO()
Date: Tue, 28 Nov 2017 09:22:37 +0100	[thread overview]
Message-ID: <aa9ccf6a-ea0b-18f6-a28d-20b69f501295@suse.cz> (raw)
In-Reply-To: <1511824101-9597-1-git-send-email-gomonovych@gmail.com>

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@gmail.com>

Acked-by: Vlastimil Babka <vbabka@suse.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)
> 

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

      parent reply	other threads:[~2017-11-28  8:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-27 23:08 Vasyl Gomonovych
2017-11-28  8:14 ` Michal Hocko
2017-11-28  8:22 ` Vlastimil Babka [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aa9ccf6a-ea0b-18f6-a28d-20b69f501295@suse.cz \
    --to=vbabka@suse.cz \
    --cc=akpm@linux-foundation.org \
    --cc=gomonovych@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=guptap@codeaurora.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --cc=tglx@linutronix.de \
    --cc=vinmenon@codeaurora.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox