From: "Zi Yan" <ziy@nvidia.com>
To: "Christos Skarlos" <christosskarlos.kernel@gmail.com>,
<akpm@linux-foundation.org>, <david@kernel.org>,
<muchun.song@linux.dev>, <osalvador@suse.de>, <ljs@kernel.org>,
<hannes@cmpxchg.org>
Cc: <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>
Subject: Re: [PATCH 1/3] mm/mmap: fix various coding style warnings
Date: Sat, 05 Sep 2026 12:19:24 -0400 [thread overview]
Message-ID: <DL7IPCXK95Q3.G8TUACB5UNZQ@nvidia.com> (raw)
In-Reply-To: <20260905140140.60792-3-christosskarlos.kernel@gmail.com>
On Sat Sep 5, 2026 at 10:01 AM EDT, Christos Skarlos wrote:
> 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
Why?
> *
> * 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>
mmap.c does not use any functions in linux versions, why replace asm
versions with them? checkpatch.pl has no check for these.
<snip>
> @@ -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);
Have you checked the definition of VMA_ITERATOR? It declares struct
vma_iterator.
>
> 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);
Ditto.
>
> 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;
Ditto.
>
> @@ -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);
Ditto.
>
> if (mmap_write_lock_killable(oldmm))
--
Best Regards,
Yan, Zi
next prev parent reply other threads:[~2026-09-05 16:19 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 ` [PATCH 1/3] mm/mmap: " Christos Skarlos
2026-09-05 16:19 ` Zi Yan [this message]
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=DL7IPCXK95Q3.G8TUACB5UNZQ@nvidia.com \
--to=ziy@nvidia.com \
--cc=akpm@linux-foundation.org \
--cc=axelrasmussen@google.com \
--cc=baohua@kernel.org \
--cc=baolin.wang@linux.alibaba.com \
--cc=christosskarlos.kernel@gmail.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 \
/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