From: Christos Skarlos <christosskarlos.kernel@gmail.com>
To: akpm@linux-foundation.org, david@kernel.org,
muchun.song@linux.dev, osalvador@suse.de, ljs@kernel.org,
hannes@cmpxchg.org
Cc: ziy@nvidia.com, baolin.wang@linux.alibaba.com,
liam@infradead.org, nico.pache@linux.dev, ryan.roberts@arm.com,
dev.jain@arm.com, baohua@kernel.org, lance.yang@linux.dev,
usama.arif@linux.dev, kas@kernel.org, vbabka@kernel.org,
jannh@google.com, pfalcato@suse.de, kasong@tencent.com,
qi.zheng@linux.dev, shakeel.butt@linux.dev,
axelrasmussen@google.com, yuanchu@google.com, weixugc@google.com,
mhocko@kernel.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org,
Christos Skarlos <christosskarlos.kernel@gmail.com>
Subject: [PATCH 1/3] mm/mmap: fix various coding style warnings
Date: Sat, 5 Sep 2026 17:01:38 +0300 [thread overview]
Message-ID: <20260905140140.60792-3-christosskarlos.kernel@gmail.com> (raw)
In-Reply-To: <20260905140140.60792-1-christosskarlos.kernel@gmail.com>
Resolve coding style warnings and errors flagged by checkpatch.pl script. Specifically:
- Remove the obsolete filename reference in the top comment.
- Replace <asm/cacheflush.h> and <asm/mmu_context.h> with <linux/...>.
- Add missing blank lines after variable declarations and replace spaces with tabs where needed.
No functional changes are introduced.
Signed-off-by: Christos Skarlos <christosskarlos.kernel@gmail.com>
---
mm/mmap.c | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)
diff --git a/mm/mmap.c b/mm/mmap.c
index 4bf26b0f1e6e..626d3d2493ae 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -1,6 +1,5 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
- * mm/mmap.c
*
* Written by obz.
*
@@ -50,9 +49,9 @@
#include <linux/memfd.h>
#include <linux/uaccess.h>
-#include <asm/cacheflush.h>
+#include <linux/cacheflush.h>
#include <asm/tlb.h>
-#include <asm/mmu_context.h>
+#include <linux/mmu_context.h>
#define CREATE_TRACE_POINTS
#include <trace/events/mmap.h>
@@ -526,9 +525,9 @@ unsigned long do_mmap(struct file *file, unsigned long addr,
* And don't attempt to combine with hugetlb for now.
*/
if (flags & (MAP_LOCKED | MAP_HUGETLB))
- return -EINVAL;
+ return -EINVAL;
if (vma_flags_can_grow(&vma_flags))
- return -EINVAL;
+ return -EINVAL;
/*
* If the pages can be dropped, then it doesn't make
@@ -832,6 +831,7 @@ __get_unmapped_area(struct file *file, unsigned long addr, unsigned long len,
= NULL;
unsigned long error = arch_mmap_check(addr, len, flags);
+
if (error)
return error;
@@ -942,6 +942,7 @@ find_vma_prev(struct mm_struct *mm, unsigned long addr,
struct vm_area_struct **pprev)
{
struct vm_area_struct *vma;
+
VMA_ITERATOR(vmi, mm, addr);
vma = vma_iter_load(&vmi);
@@ -1017,12 +1018,12 @@ struct vm_area_struct *find_extend_vma_locked(struct mm_struct *mm, unsigned lon
#if defined(CONFIG_STACK_GROWSUP)
-#define vma_expand_up(vma,addr) expand_upwards(vma, addr)
+#define vma_expand_up(vma, addr) expand_upwards(vma, addr)
#define vma_expand_down(vma, addr) (-EFAULT)
#else
-#define vma_expand_up(vma,addr) (-EFAULT)
+#define vma_expand_up(vma, addr) (-EFAULT)
#define vma_expand_down(vma, addr) expand_downwards(vma, addr)
#endif
@@ -1227,6 +1228,7 @@ int vm_brk_flags(unsigned long addr, unsigned long request, bool is_exec)
int ret;
bool populate;
LIST_HEAD(uf);
+
VMA_ITERATOR(vmi, mm, addr);
len = PAGE_ALIGN(request);
@@ -1290,6 +1292,7 @@ void exit_mmap(struct mm_struct *mm)
struct mmu_gather tlb;
struct vm_area_struct *vma;
unsigned long nr_accounted = 0;
+
VMA_ITERATOR(vmi, mm, 0);
struct unmap_desc unmap;
@@ -1454,6 +1457,7 @@ static vm_fault_t special_mapping_fault(struct vm_fault *vmf)
if (*pages) {
struct page *page = *pages;
+
get_page(page);
vmf->page = page;
return 0;
@@ -1711,6 +1715,7 @@ __latent_entropy int dup_mmap(struct mm_struct *mm, struct mm_struct *oldmm)
int retval;
unsigned long charge = 0;
LIST_HEAD(uf);
+
VMA_ITERATOR(vmi, mm, 0);
if (mmap_write_lock_killable(oldmm))
--
2.55.0
next prev parent reply other threads:[~2026-09-05 14:02 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-05 14:01 [PATCH 0/3] mm: minor janitorial style cleanups Christos Skarlos
2026-09-05 14:01 ` [PATCH] mm/huge_memory: fix various coding style warnings Christos Skarlos
2026-09-05 16:07 ` Zi Yan
2026-09-05 14:01 ` Christos Skarlos [this message]
2026-09-05 16:19 ` [PATCH 1/3] mm/mmap: " Zi Yan
2026-09-05 14:01 ` [PATCH 2/3] mm/vamscan: fix various coding style warnings and errors Christos Skarlos
2026-09-05 16:22 ` Zi Yan
2026-09-05 14:01 ` [PATCH 3/3] mm/hugetlb: fix various coding style warnings Christos Skarlos
2026-09-05 16:24 ` Zi Yan
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=20260905140140.60792-3-christosskarlos.kernel@gmail.com \
--to=christosskarlos.kernel@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=axelrasmussen@google.com \
--cc=baohua@kernel.org \
--cc=baolin.wang@linux.alibaba.com \
--cc=david@kernel.org \
--cc=dev.jain@arm.com \
--cc=hannes@cmpxchg.org \
--cc=jannh@google.com \
--cc=kas@kernel.org \
--cc=kasong@tencent.com \
--cc=lance.yang@linux.dev \
--cc=liam@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ljs@kernel.org \
--cc=mhocko@kernel.org \
--cc=muchun.song@linux.dev \
--cc=nico.pache@linux.dev \
--cc=osalvador@suse.de \
--cc=pfalcato@suse.de \
--cc=qi.zheng@linux.dev \
--cc=ryan.roberts@arm.com \
--cc=shakeel.butt@linux.dev \
--cc=usama.arif@linux.dev \
--cc=vbabka@kernel.org \
--cc=weixugc@google.com \
--cc=yuanchu@google.com \
--cc=ziy@nvidia.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.