From: Vasyl Gomonovych <gomonovych@gmail.com>
To: vbabka@suse.cz, akpm@linux-foundation.org, mhocko@suse.com,
gregkh@linuxfoundation.org, tglx@linutronix.de,
vinmenon@codeaurora.org, guptap@codeaurora.org,
linux-mm@kvack.org
Cc: gomonovych@gmail.com, linux-kernel@vger.kernel.org
Subject: [PATCH] mm/page_owner: Use PTR_ERR_OR_ZERO()
Date: Tue, 28 Nov 2017 00:08:21 +0100 [thread overview]
Message-ID: <1511824101-9597-1-git-send-email-gomonovych@gmail.com> (raw)
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>
---
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)
--
1.9.1
--
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>
next reply other threads:[~2017-11-27 23:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-27 23:08 Vasyl Gomonovych [this message]
2017-11-28 8:14 ` Michal Hocko
2017-11-28 8:22 ` Vlastimil Babka
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=1511824101-9597-1-git-send-email-gomonovych@gmail.com \
--to=gomonovych@gmail.com \
--cc=akpm@linux-foundation.org \
--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=vbabka@suse.cz \
--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