All of lore.kernel.org
 help / color / mirror / Atom feed
* + nommu-remove-__gfp_highmem-in-vmalloc-vzalloc-checkpatch-fixes.patch added to -mm tree
@ 2021-05-09  4:13 akpm
  2021-05-10  1:49 ` [PATCH v2] nommu: remove __GFP_HIGHMEM in vmalloc/vzalloc Chen Li
  0 siblings, 1 reply; 2+ messages in thread
From: akpm @ 2021-05-09  4:13 UTC (permalink / raw)
  To: akpm, chenli, mm-commits


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 <akpm@linux-foundation.org>
Subject: nommu-remove-__gfp_highmem-in-vmalloc-vzalloc-checkpatch-fixes

Cc: Chen Li <chenli@uniontech.com>

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

Cc: Chen Li <chenli@uniontech.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/nommu.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/mm/nommu.c~nommu-remove-__gfp_highmem-in-vmalloc-vzalloc-checkpatch-fixes
+++ a/mm/nommu.c
@@ -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 akpm@linux-foundation.org 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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH v2] nommu: remove __GFP_HIGHMEM in vmalloc/vzalloc
  2021-05-09  4:13 + nommu-remove-__gfp_highmem-in-vmalloc-vzalloc-checkpatch-fixes.patch added to -mm tree akpm
@ 2021-05-10  1:49 ` Chen Li
  0 siblings, 0 replies; 2+ messages in thread
From: Chen Li @ 2021-05-10  1:49 UTC (permalink / raw)
  To: akpm
  Cc: mm-commits, David Hildenbrand, Matthew Wilcox, linux-mm, linux-kernel

On Sun, 09 May 2021 12:13:23 +0800,
akpm@linux-foundation.org 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 <akpm@linux-foundation.org>
> Subject: nommu-remove-__gfp_highmem-in-vmalloc-vzalloc-checkpatch-fixes
> 
> Cc: Chen Li <chenli@uniontech.com>
> 
> 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
> 
> Cc: Chen Li <chenli@uniontech.com>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> ---
> 
>  mm/nommu.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> --- a/mm/nommu.c~nommu-remove-__gfp_highmem-in-vmalloc-vzalloc-checkpatch-fixes
> +++ a/mm/nommu.c
> @@ -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 akpm@linux-foundation.org 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")

Signed-off-by: Chen Li <chenli@uniontech.com>
Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: David Hildenbrand <david@redhat.com>
---
 mm/nommu.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mm/nommu.c b/mm/nommu.c
index 5c9ab799c0e6..f1794e818348 100644
--- a/mm/nommu.c
+++ b/mm/nommu.c
@@ -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);
 
-- 
2.31.1




^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-05-10  1:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-09  4:13 + nommu-remove-__gfp_highmem-in-vmalloc-vzalloc-checkpatch-fixes.patch added to -mm tree akpm
2021-05-10  1:49 ` [PATCH v2] nommu: remove __GFP_HIGHMEM in vmalloc/vzalloc Chen Li

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.