* + mm-mmap-remove-unnecessary-local-variable.patch added to -mm tree
@ 2020-12-23 0:34 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2020-12-23 0:34 UTC (permalink / raw)
To: mm-commits, jrdr.linux, ahuang12
The patch titled
Subject: mm/mmap.c: remove unnecessary local variable
has been added to the -mm tree. Its filename is
mm-mmap-remove-unnecessary-local-variable.patch
This patch should soon appear at
https://ozlabs.org/~akpm/mmots/broken-out/mm-mmap-remove-unnecessary-local-variable.patch
and later at
https://ozlabs.org/~akpm/mmotm/broken-out/mm-mmap-remove-unnecessary-local-variable.patch
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next and is updated
there every 3-4 working days
------------------------------------------------------
From: Adrian Huang <ahuang12@lenovo.com>
Subject: mm/mmap.c: remove unnecessary local variable
The local variable 'retval' is assigned just for once in __do_sys_brk(),
and the function returns the value of the local variable right after the
assignment. Remove unnecessary assignment and local variable declaration.
Link: https://lkml.kernel.org/r/20201222103249.30683-1-adrianhuang0701@gmail.com
Signed-off-by: Adrian Huang <ahuang12@lenovo.com>
Acked-by: Souptick Joarder <jrdr.linux@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/mmap.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
--- a/mm/mmap.c~mm-mmap-remove-unnecessary-local-variable
+++ a/mm/mmap.c
@@ -189,7 +189,6 @@ static int do_brk_flags(unsigned long ad
struct list_head *uf);
SYSCALL_DEFINE1(brk, unsigned long, brk)
{
- unsigned long retval;
unsigned long newbrk, oldbrk, origbrk;
struct mm_struct *mm = current->mm;
struct vm_area_struct *next;
@@ -281,9 +280,8 @@ success:
return brk;
out:
- retval = origbrk;
mmap_write_unlock(mm);
- return retval;
+ return origbrk;
}
static inline unsigned long vma_compute_gap(struct vm_area_struct *vma)
_
Patches currently in -mm which might be from ahuang12@lenovo.com are
mm-mmap-remove-unnecessary-local-variable.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-12-23 0:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-23 0:34 + mm-mmap-remove-unnecessary-local-variable.patch added to -mm tree akpm
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).