From: Yang Fan <nullptr.cpp@gmail.com>
To: rppt@linux.ibm.com, william.kucharski@oracle.com,
akpm@linux-foundation.org, will.deacon@arm.com
Cc: Yang Fan <nullptr.cpp@gmail.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: [PATCH v2] mm/mmap.c: Remove some redundancy in arch_get_unmapped_area_topdown()
Date: Sun, 27 Jan 2019 05:11:12 +0100 [thread overview]
Message-ID: <20190127041112.25599-1-nullptr.cpp@gmail.com> (raw)
In-Reply-To: <cover.1547966629.git.nullptr.cpp@gmail.com>
The variable 'addr' is redundant in arch_get_unmapped_area_topdown(),
just use parameter 'addr0' directly. Then remove the const qualifier
of the parameter, and change its name to 'addr'.
And in according with other functions, remove the const qualifier of all
other no-pointer parameters in function arch_get_unmapped_area_topdown().
Reviewed-by: Mike Rapoport <rppt@linux.ibm.com>
Signed-off-by: Yang Fan <nullptr.cpp@gmail.com>
---
Changes in v2:
- Merge the two patches into one.
mm/mmap.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/mm/mmap.c b/mm/mmap.c
index f901065c4c64..84cdde125d4d 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -2126,13 +2126,12 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr,
*/
#ifndef HAVE_ARCH_UNMAPPED_AREA_TOPDOWN
unsigned long
-arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
- const unsigned long len, const unsigned long pgoff,
- const unsigned long flags)
+arch_get_unmapped_area_topdown(struct file *filp, unsigned long addr,
+ unsigned long len, unsigned long pgoff,
+ unsigned long flags)
{
struct vm_area_struct *vma, *prev;
struct mm_struct *mm = current->mm;
- unsigned long addr = addr0;
struct vm_unmapped_area_info info;
const unsigned long mmap_end = arch_get_mmap_end(addr);
--
2.17.1
prev parent reply other threads:[~2019-01-27 4:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-20 8:12 [PATCH 0/2] " Yang Fan
2019-01-20 8:13 ` [PATCH 1/2] mm/mmap.c: Remove redundant variable 'addr' " Yang Fan
2019-01-23 14:09 ` William Kucharski
2019-01-20 8:13 ` [PATCH 2/2] mm/mmap.c: Remove redundant const qualifier of the no-pointer parameters Yang Fan
2019-01-20 17:09 ` [PATCH 0/2] mm/mmap.c: Remove some redundancy in arch_get_unmapped_area_topdown() Mike Rapoport
2019-01-27 4:11 ` Yang Fan [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=20190127041112.25599-1-nullptr.cpp@gmail.com \
--to=nullptr.cpp@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=rppt@linux.ibm.com \
--cc=will.deacon@arm.com \
--cc=william.kucharski@oracle.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