From: Duan Jiong <duanj.fnst@cn.fujitsu.com>
To: akpm@linux-foundation.org, oleg@redhat.com, riel@redhat.com,
walken@google.com, hughd@google.com
Cc: linux-mm@kvack.org, Duan Jiong <duanj.fnst@cn.fujitsu.com>
Subject: [PATCH] mm: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO
Date: Fri, 11 Apr 2014 16:37:03 +0800 [thread overview]
Message-ID: <1397205423-24214-1-git-send-email-duanj.fnst@cn.fujitsu.com> (raw)
This patch fixes coccinelle error regarding usage of IS_ERR and
PTR_ERR instead of PTR_ERR_OR_ZERO.
Signed-off-by: Duan Jiong <duanj.fnst@cn.fujitsu.com>
---
mm/mmap.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/mm/mmap.c b/mm/mmap.c
index b1202cf..6cdec3a 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -2965,9 +2965,7 @@ int install_special_mapping(struct mm_struct *mm,
struct vm_area_struct *vma = _install_special_mapping(mm,
addr, len, vm_flags, pages);
- if (IS_ERR(vma))
- return PTR_ERR(vma);
- return 0;
+ return PTR_ERR_OR_ZERO(vma);
}
static DEFINE_MUTEX(mm_all_locks_mutex);
--
1.8.3.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:[~2014-04-11 8:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-11 8:37 Duan Jiong [this message]
2014-04-11 17:03 ` [PATCH] mm: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO Rik van Riel
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=1397205423-24214-1-git-send-email-duanj.fnst@cn.fujitsu.com \
--to=duanj.fnst@cn.fujitsu.com \
--cc=akpm@linux-foundation.org \
--cc=hughd@google.com \
--cc=linux-mm@kvack.org \
--cc=oleg@redhat.com \
--cc=riel@redhat.com \
--cc=walken@google.com \
/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;
as well as URLs for NNTP newsgroup(s).