Skip to contentSkip to conversation

+ nommu-remove-__gfp_highmem-in-vmalloc-vzalloc-checkpatch-fixes.patch added to -mm tree

PATCH New [email protected] 2 participants 2 messages May 9, 2021 – May 10, 2021

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer tree notice
#0 lore raw

The patch titled
Subject: nommu-remove-__gfp_highmem-in-vmalloc-vzalloc-checkpatch-fixes
has been added to the -mm tree. Its filename is
nommu-remove-__gfp_highmem-in-vmalloc-vzalloc-checkpatch-fixes.patch

This patch should soon appear at
https://ozlabs.org/~akpm/mmots/broken-out/nommu-remove-__gfp_highmem-in-vmalloc-vzalloc-checkpatch-fixes.patch
and later at
https://ozlabs.org/~akpm/mmotm/broken-out/nommu-remove-__gfp_highmem-in-vmalloc-vzalloc-checkpatch-fixes.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: Andrew Morton <[email protected]>
Subject: nommu-remove-__gfp_highmem-in-vmalloc-vzalloc-checkpatch-fixes

Cc Chen Li <[email protected]>

WARNING: please, no spaces at the start of a line
#37: FILE: mm/nommu.c:226:
+ return __vmalloc(size, GFP_KERNEL);$

total: 0 errors, 1 warnings, 16 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
mechanically convert to the typical style using --fix or --fix-inplace.

./patches/nommu-remove-__gfp_highmem-in-vmalloc-vzalloc.patch has style problems, please review.

NOTE: If any of the errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

---

 mm/nommu.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mm/nommu.c renamed from mm/nommu.c~nommu-remove-__gfp_highmem-in-vmalloc-vzalloc-checkpatch-fixes +1 -1
@@ -223,7 +223,7 @@ long vread(char *buf, char *addr, unsign
  */
 void *vmalloc(unsigned long size)
 {
-       return __vmalloc(size, GFP_KERNEL);
+	return __vmalloc(size, GFP_KERNEL);
 }
 EXPORT_SYMBOL(vmalloc);
 

_

Patches currently in -mm which might be from [email protected] are

mm.patch mm-gup-pack-has_pinned-in-mmf_has_pinned-checkpatch-fixes.patch mm-memcg-optimize-user-context-object-stock-access-checkpatch-fixes.patch nommu-remove-__gfp_highmem-in-vmalloc-vzalloc-checkpatch-fixes.patch linux-next-git-rejects.patch kernel-forkc-export-kernel_thread-to-modules.patch

#1 lore raw

PATCH v2 1/1 nommu: remove __GFP_HIGHMEM in vmalloc/vzalloc

Quoted 65 lines · On Sun, 09 May 2021 12:13:23 +0800, [email protected] wrote:

The patch titled
Subject: nommu-remove-__gfp_highmem-in-vmalloc-vzalloc-checkpatch-fixes
has been added to the -mm tree. Its filename is
nommu-remove-__gfp_highmem-in-vmalloc-vzalloc-checkpatch-fixes.patch

This patch should soon appear at
https://ozlabs.org/~akpm/mmots/broken-out/nommu-remove-__gfp_highmem-in-vmalloc-vzalloc-checkpatch-fixes.patch
and later at
https://ozlabs.org/~akpm/mmotm/broken-out/nommu-remove-__gfp_highmem-in-vmalloc-vzalloc-checkpatch-fixes.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: Andrew Morton <[email protected]>
Subject: nommu-remove-__gfp_highmem-in-vmalloc-vzalloc-checkpatch-fixes

Cc Chen Li <[email protected]>

WARNING: please, no spaces at the start of a line
#37: FILE: mm/nommu.c:226:
+ return __vmalloc(size, GFP_KERNEL);$

total: 0 errors, 1 warnings, 16 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
mechanically convert to the typical style using --fix or --fix-inplace.

./patches/nommu-remove-__gfp_highmem-in-vmalloc-vzalloc.patch has style problems, please review.

NOTE: If any of the errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

---

 mm/nommu.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mm/nommu.c renamed from mm/nommu.c~nommu-remove-__gfp_highmem-in-vmalloc-vzalloc-checkpatch-fixes +1 -1
@@ -223,7 +223,7 @@ long vread(char *buf, char *addr, unsign
  */
 void *vmalloc(unsigned long size)
 {
-       return __vmalloc(size, GFP_KERNEL);
+	return __vmalloc(size, GFP_KERNEL);
 }
 EXPORT_SYMBOL(vmalloc);
 

_

Quoted 11 lines

Patches currently in -mm which might be from [email protected] are

mm.patch mm-gup-pack-has_pinned-in-mmf_has_pinned-checkpatch-fixes.patch mm-memcg-optimize-user-context-object-stock-access-checkpatch-fixes.patch nommu-remove-__gfp_highmem-in-vmalloc-vzalloc-checkpatch-fixes.patch linux-next-git-rejects.patch kernel-forkc-export-kernel_thread-to-modules.patch

From mm/nommu.c:
void *__vmalloc(unsigned long size, gfp_t gfp_mask)

{
	/*
	 *  You can't specify __GFP_HIGHMEM with kmalloc() since kmalloc()
	 * returns only a logical address.
	 */
	return kmalloc(size, (gfp_mask | __GFP_COMP) & ~__GFP_HIGHMEM);
}

__vmalloc just elimitate __GFP_HIGHMEM, so it makes no sense to add __GFP_HIGHMEM for nommu's vmalloc/vzalloc.

changelog:
*v2: Also fix a space style warning reported from checkpatch, which is

      introduced via commit 1da177e4c3f4 ("Linux-2.6.12-rc2")
---
 mm/nommu.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
mm/nommu.c +2 -2
index 5c9ab799c0e6..f1794e818348 100644
@@ -233,7 +233,7 @@ long vwrite(char *buf, char *addr, unsigned long count)
  */
 void *vmalloc(unsigned long size)
 {
-       return __vmalloc(size, GFP_KERNEL | __GFP_HIGHMEM);
+	return __vmalloc(size, GFP_KERNEL);
 }
 EXPORT_SYMBOL(vmalloc);
 
@@ -251,7 +251,7 @@ EXPORT_SYMBOL(vmalloc);
  */
 void *vzalloc(unsigned long size)
 {
-	return __vmalloc(size, GFP_KERNEL | __GFP_HIGHMEM | __GFP_ZERO);
+	return __vmalloc(size, GFP_KERNEL | __GFP_ZERO);
 }
 EXPORT_SYMBOL(vzalloc);
 
Signature · 1 line
2.31.1