linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: build warning after merge of the mm tree
@ 2022-07-21  9:55 Stephen Rothwell
  2022-07-21 11:11 ` Zach O'Keefe
  0 siblings, 1 reply; 65+ messages in thread
From: Stephen Rothwell @ 2022-07-21  9:55 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Zach O'Keefe, Linux Kernel Mailing List,
	Linux Next Mailing List, Michael Ellerman

[-- Attachment #1: Type: text/plain, Size: 2993 bytes --]

Hi all,

After merging the mm tree, today's linux-next build (powerpc
ppc64_defconfig) produced this warning:

In file included from arch/powerpc/include/asm/book3s/64/mmu-hash.h:20,
                 from arch/powerpc/include/asm/book3s/64/mmu.h:32,
                 from arch/powerpc/include/asm/mmu.h:393,
                 from arch/powerpc/include/asm/lppaca.h:46,
                 from arch/powerpc/include/asm/paca.h:18,
                 from arch/powerpc/include/asm/current.h:13,
                 from include/linux/thread_info.h:23,
                 from include/asm-generic/preempt.h:5,
                 from ./arch/powerpc/include/generated/asm/preempt.h:1,
                 from include/linux/preempt.h:78,
                 from include/linux/spinlock.h:55,
                 from include/linux/mmzone.h:8,
                 from include/linux/gfp.h:7,
                 from include/linux/mm.h:7,
                 from mm/khugepaged.c:4:
arch/powerpc/include/asm/book3s/64/pgtable.h:190:25: warning: "__pte_index_size" is not defined, evaluates to 0 [-Wundef]
  190 | #define PTE_INDEX_SIZE  __pte_index_size
      |                         ^~~~~~~~~~~~~~~~
arch/powerpc/include/asm/book3s/64/pgtable.h:241:39: note: in expansion of macro 'PTE_INDEX_SIZE'
  241 | #define PMD_SHIFT       (PAGE_SHIFT + PTE_INDEX_SIZE)
      |                                       ^~~~~~~~~~~~~~
include/linux/huge_mm.h:109:25: note: in expansion of macro 'PMD_SHIFT'
  109 | #define HPAGE_PMD_SHIFT PMD_SHIFT
      |                         ^~~~~~~~~
include/linux/huge_mm.h:105:26: note: in expansion of macro 'HPAGE_PMD_SHIFT'
  105 | #define HPAGE_PMD_ORDER (HPAGE_PMD_SHIFT-PAGE_SHIFT)
      |                          ^~~~~~~~~~~~~~~
mm/khugepaged.c:95:5: note: in expansion of macro 'HPAGE_PMD_ORDER'
   95 | #if HPAGE_PMD_ORDER < 16
      |     ^~~~~~~~~~~~~~~

Introduced by commit

  adcc4e193b6b ("mm/khugepaged: use minimal bits to store num page < HPAGE_PMD_NR")

So HPAGE_PMD_ORDER is not a constant on ppc64 ...

I applied this hack for today (which makes it build without warning and
puts things more or less back as they were for ppo64).

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Thu, 21 Jul 2022 19:49:40 +1000
Subject: [PATCH] fix up for "mm/khugepaged: use minimal bits to store num page < HPAGE_PMD_NR"

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 mm/khugepaged.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/mm/khugepaged.c b/mm/khugepaged.c
index 28cb8429dad4..d8e388106322 100644
--- a/mm/khugepaged.c
+++ b/mm/khugepaged.c
@@ -92,7 +92,9 @@ struct collapse_control {
 	bool is_khugepaged;
 
 	/* Num pages scanned per node */
-#if HPAGE_PMD_ORDER < 16
+#if defined(CONFIG_PPC64)
+	u32 node_load[MAX_NUMNODES];
+#elif HPAGE_PMD_ORDER < 16
 	u16 node_load[MAX_NUMNODES];
 #else
 	u32 node_load[MAX_NUMNODES];
-- 
2.35.1

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: linux-next: build warning after merge of the mm tree
  2022-07-21  9:55 linux-next: build warning after merge of the mm tree Stephen Rothwell
@ 2022-07-21 11:11 ` Zach O'Keefe
  0 siblings, 0 replies; 65+ messages in thread
From: Zach O'Keefe @ 2022-07-21 11:11 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Andrew Morton, Linux Kernel Mailing List,
	Linux Next Mailing List, Michael Ellerman, Yang Shi

On Jul 21 19:55, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the mm tree, today's linux-next build (powerpc
> ppc64_defconfig) produced this warning:
> 
> In file included from arch/powerpc/include/asm/book3s/64/mmu-hash.h:20,
>                  from arch/powerpc/include/asm/book3s/64/mmu.h:32,
>                  from arch/powerpc/include/asm/mmu.h:393,
>                  from arch/powerpc/include/asm/lppaca.h:46,
>                  from arch/powerpc/include/asm/paca.h:18,
>                  from arch/powerpc/include/asm/current.h:13,
>                  from include/linux/thread_info.h:23,
>                  from include/asm-generic/preempt.h:5,
>                  from ./arch/powerpc/include/generated/asm/preempt.h:1,
>                  from include/linux/preempt.h:78,
>                  from include/linux/spinlock.h:55,
>                  from include/linux/mmzone.h:8,
>                  from include/linux/gfp.h:7,
>                  from include/linux/mm.h:7,
>                  from mm/khugepaged.c:4:
> arch/powerpc/include/asm/book3s/64/pgtable.h:190:25: warning: "__pte_index_size" is not defined, evaluates to 0 [-Wundef]
>   190 | #define PTE_INDEX_SIZE  __pte_index_size
>       |                         ^~~~~~~~~~~~~~~~
> arch/powerpc/include/asm/book3s/64/pgtable.h:241:39: note: in expansion of macro 'PTE_INDEX_SIZE'
>   241 | #define PMD_SHIFT       (PAGE_SHIFT + PTE_INDEX_SIZE)
>       |                                       ^~~~~~~~~~~~~~
> include/linux/huge_mm.h:109:25: note: in expansion of macro 'PMD_SHIFT'
>   109 | #define HPAGE_PMD_SHIFT PMD_SHIFT
>       |                         ^~~~~~~~~
> include/linux/huge_mm.h:105:26: note: in expansion of macro 'HPAGE_PMD_SHIFT'
>   105 | #define HPAGE_PMD_ORDER (HPAGE_PMD_SHIFT-PAGE_SHIFT)
>       |                          ^~~~~~~~~~~~~~~
> mm/khugepaged.c:95:5: note: in expansion of macro 'HPAGE_PMD_ORDER'
>    95 | #if HPAGE_PMD_ORDER < 16
>       |     ^~~~~~~~~~~~~~~
> 
> Introduced by commit
> 
>   adcc4e193b6b ("mm/khugepaged: use minimal bits to store num page < HPAGE_PMD_NR")
> 
> So HPAGE_PMD_ORDER is not a constant on ppc64 ...
> 
> I applied this hack for today (which makes it build without warning and
> puts things more or less back as they were for ppo64).
> 
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Thu, 21 Jul 2022 19:49:40 +1000
> Subject: [PATCH] fix up for "mm/khugepaged: use minimal bits to store num page < HPAGE_PMD_NR"
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
>  mm/khugepaged.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/mm/khugepaged.c b/mm/khugepaged.c
> index 28cb8429dad4..d8e388106322 100644
> --- a/mm/khugepaged.c
> +++ b/mm/khugepaged.c
> @@ -92,7 +92,9 @@ struct collapse_control {
>  	bool is_khugepaged;
>  
>  	/* Num pages scanned per node */
> -#if HPAGE_PMD_ORDER < 16
> +#if defined(CONFIG_PPC64)
> +	u32 node_load[MAX_NUMNODES];
> +#elif HPAGE_PMD_ORDER < 16
>  	u16 node_load[MAX_NUMNODES];
>  #else
>  	u32 node_load[MAX_NUMNODES];
> -- 
> 2.35.1
> 
> -- 
> Cheers,
> Stephen Rothwell

Thanks Stephen, and apologies here. I thought I had taken a look at all archs
(just inspection, I didn't attempt to build them all) - but seems like I missed
this one..

I'm fine with the change, though I could see the argument that this is getting a
little complicated to save what is likely a few bits in the common case.
Appreciate the fix.

Reviewed-by: Zach O'Keefe <zokeefe@google.com>

Best,
Zach



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

* Re: linux-next: build warning after merge of the mm tree
  2024-04-17  5:18 Stephen Rothwell
@ 2024-04-17 15:57 ` Matthew Wilcox
  0 siblings, 0 replies; 65+ messages in thread
From: Matthew Wilcox @ 2024-04-17 15:57 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Andrew Morton, Linux Kernel Mailing List, Linux Next Mailing List

On Wed, Apr 17, 2024 at 03:18:11PM +1000, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the mm tree, today's linux-next build (htmldocs) produced
> this warning:
> 
> Documentation/filesystems/index.rst:50: WARNING: toctree contains reference to nonexisting document 'filesystems/buffer'
> 
> Introduced by commit
> 
>   4b61a0e73910 ("doc: split buffer.rst out of api-summary.rst")
> 
> from the mm-unstable branch of the mm tree.

Yeah, some halfwit forgot to run 'git add' before 'git commit -a'.
Randy reported it last night, and I sent a replacement patch, but
I guess it was after hours for Andrew.  Sorry about that.



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

* linux-next: build warning after merge of the mm tree
@ 2024-04-17  5:18 Stephen Rothwell
  2024-04-17 15:57 ` Matthew Wilcox
  0 siblings, 1 reply; 65+ messages in thread
From: Stephen Rothwell @ 2024-04-17  5:18 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Matthew Wilcox (Oracle),
	Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 393 bytes --]

Hi all,

After merging the mm tree, today's linux-next build (htmldocs) produced
this warning:

Documentation/filesystems/index.rst:50: WARNING: toctree contains reference to nonexisting document 'filesystems/buffer'

Introduced by commit

  4b61a0e73910 ("doc: split buffer.rst out of api-summary.rst")

from the mm-unstable branch of the mm tree.
-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: linux-next: build warning after merge of the mm tree
  2024-04-15  5:20 Stephen Rothwell
@ 2024-04-15  5:45 ` Barry Song
  0 siblings, 0 replies; 65+ messages in thread
From: Barry Song @ 2024-04-15  5:45 UTC (permalink / raw)
  To: sfr; +Cc: akpm, linux-kernel, linux-next, v-songbaohua

Thanks, I admit I know nothing about sphinx, after google the similar warning,
adding an extra line can fix this (I also noticed I should had named the file
as sysfs but not sys to align with other ABI docs):

From ae3350752540696753940166e8e9f2da4b872760 Mon Sep 17 00:00:00 2001
From: Barry Song <v-songbaohua@oppo.com>
Date: Mon, 15 Apr 2024 17:37:04 +1200
Subject: [PATCH] sysfs-kernel-mm-transparent-hugepage: fix the name and
 unexpected indentation

Signed-off-by: Barry Song <v-songbaohua@oppo.com>
---
 ...transparent-hugepage => sysfs-kernel-mm-transparent-hugepage} | 1 +
 1 file changed, 1 insertion(+)
 rename Documentation/ABI/testing/{sys-kernel-mm-transparent-hugepage => sysfs-kernel-mm-transparent-hugepage} (99%)

diff --git a/Documentation/ABI/testing/sys-kernel-mm-transparent-hugepage b/Documentation/ABI/testing/sysfs-kernel-mm-transparent-hugepage
similarity index 99%
rename from Documentation/ABI/testing/sys-kernel-mm-transparent-hugepage
rename to Documentation/ABI/testing/sysfs-kernel-mm-transparent-hugepage
index 33163eba5342..7bfbb9cc2c11 100644
--- a/Documentation/ABI/testing/sys-kernel-mm-transparent-hugepage
+++ b/Documentation/ABI/testing/sysfs-kernel-mm-transparent-hugepage
@@ -4,6 +4,7 @@ Contact:	Linux memory management mailing list <linux-mm@kvack.org>
 Description:
 		/sys/kernel/mm/transparent_hugepage/ contains a number of files and
 		subdirectories,
+
 			- defrag
 			- enabled
 			- hpage_pmd_size
-- 
2.34.1

> 
> Introduced by commit
> 
>   a70dabb40c3d ("mm: add docs for per-order mTHP counters and transhuge_page ABI")
> 
> from the mm-unstable branch of the mm tree.
> 
> -- 
> Cheers,
> Stephen Rothwell

Thanks
Barry


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

* linux-next: build warning after merge of the mm tree
@ 2024-04-15  5:20 Stephen Rothwell
  2024-04-15  5:45 ` Barry Song
  0 siblings, 1 reply; 65+ messages in thread
From: Stephen Rothwell @ 2024-04-15  5:20 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Barry Song, Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 388 bytes --]

Hi all,

After merging the mm tree, today's linux-next build (htmldocs) produced
this warning:

Documentation/ABI/testing/sys-kernel-mm-transparent-hugepage:2: ERROR: Unexpected indentation.

Introduced by commit

  a70dabb40c3d ("mm: add docs for per-order mTHP counters and transhuge_page ABI")

from the mm-unstable branch of the mm tree.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: linux-next: build warning after merge of the mm tree
  2024-03-28  1:59 ` Baoquan He
@ 2024-03-28  4:29   ` Stephen Rothwell
  0 siblings, 0 replies; 65+ messages in thread
From: Stephen Rothwell @ 2024-03-28  4:29 UTC (permalink / raw)
  To: Baoquan He
  Cc: Andrew Morton, Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 860 bytes --]

Hi all,

On Thu, 28 Mar 2024 09:59:52 +0800 Baoquan He <bhe@redhat.com> wrote:
>
> On 03/28/24 at 09:13am, Stephen Rothwell wrote:
> > 
> > After merging the mm tree, today's linux-next build (arm
> > multi_v7_defconfig) produced this warning:
> > 
> > mm/page_alloc.c: In function 'build_zonelists':
> > mm/page_alloc.c:5324:13: warning: unused variable 'node' [-Wunused-variable]
> >  5324 |         int node, local_node;
> >       |             ^~~~
> > 
> > Introduced by commit
> > 
> >   95d0185255a3 ("mm/page_alloc.c: remove unneeded codes in !NUMA version of build_zonelists()")
> > 
> > from the mm-unstable branch of the mm tree.  
> 
> Thanks. Below code change has been queued on mm-unstable branch to fix it.

In my i386 defconfig build, this became an error, so I applied your fix patch.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: linux-next: build warning after merge of the mm tree
  2024-03-27 22:13 Stephen Rothwell
@ 2024-03-28  1:59 ` Baoquan He
  2024-03-28  4:29   ` Stephen Rothwell
  0 siblings, 1 reply; 65+ messages in thread
From: Baoquan He @ 2024-03-28  1:59 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Andrew Morton, Linux Kernel Mailing List, Linux Next Mailing List

On 03/28/24 at 09:13am, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the mm tree, today's linux-next build (arm
> multi_v7_defconfig) produced this warning:
> 
> mm/page_alloc.c: In function 'build_zonelists':
> mm/page_alloc.c:5324:13: warning: unused variable 'node' [-Wunused-variable]
>  5324 |         int node, local_node;
>       |             ^~~~
> 
> Introduced by commit
> 
>   95d0185255a3 ("mm/page_alloc.c: remove unneeded codes in !NUMA version of build_zonelists()")
> 
> from the mm-unstable branch of the mm tree.

Thanks. Below code change has been queued on mm-unstable branch to fix it.

From 6bb5aa700a6221248df150cba3d9c54cd95bed97 Mon Sep 17 00:00:00 2001
From: Baoquan He <bhe@redhat.com>
Date: Wed, 27 Mar 2024 20:06:45 +0800
Subject: [PATCH] 
 mm-page_allocc-remove-unneeded-codes-in-numa-version-of-build_zonelists-v2
Content-type: text/plain

remove unused locals

Link: https://lkml.kernel.org/r/ZgQL1WOf9K88nLpQ@MiWiFi-R3L-srv
Signed-off-by: Baoquan He <bhe@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
 mm/page_alloc.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index a4f6b5f308ea..9c591413ca04 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -5285,12 +5285,9 @@ static void setup_min_slab_ratio(void);
 
 static void build_zonelists(pg_data_t *pgdat)
 {
-	int node, local_node;
 	struct zoneref *zonerefs;
 	int nr_zones;
 
-	local_node = pgdat->node_id;
-
 	zonerefs = pgdat->node_zonelists[ZONELIST_FALLBACK]._zonerefs;
 	nr_zones = build_zonerefs_node(pgdat, zonerefs);
 	zonerefs += nr_zones;
-- 
2.41.0


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

* linux-next: build warning after merge of the mm tree
@ 2024-03-27 22:13 Stephen Rothwell
  2024-03-28  1:59 ` Baoquan He
  0 siblings, 1 reply; 65+ messages in thread
From: Stephen Rothwell @ 2024-03-27 22:13 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Baoquan He, Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 509 bytes --]

Hi all,

After merging the mm tree, today's linux-next build (arm
multi_v7_defconfig) produced this warning:

mm/page_alloc.c: In function 'build_zonelists':
mm/page_alloc.c:5324:13: warning: unused variable 'node' [-Wunused-variable]
 5324 |         int node, local_node;
      |             ^~~~

Introduced by commit

  95d0185255a3 ("mm/page_alloc.c: remove unneeded codes in !NUMA version of build_zonelists()")

from the mm-unstable branch of the mm tree.
-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: linux-next: build warning after merge of the mm tree
  2024-03-25  1:25 Stephen Rothwell
@ 2024-03-26  2:21 ` Suren Baghdasaryan
  0 siblings, 0 replies; 65+ messages in thread
From: Suren Baghdasaryan @ 2024-03-26  2:21 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Andrew Morton, Kent Overstreet, Linux Kernel Mailing List,
	Linux Next Mailing List

On Sun, Mar 24, 2024 at 6:25 PM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Hi all,
>
> After merging the mm tree, today's linux-next build (htmldocs) produced
> this warning:
>
> Documentation/filesystems/proc.rst:958: WARNING: Title underline too short.
>
> allocinfo
> ~~~~~~~
>
> Introduced by commit
>
>   d08b311b6d49 ("lib: add allocation tagging support for memory allocation profiling")
>
> from the mm-unstable branch of the mm tree.

Thanks! I'll post a fix shortly.

>
> --
> Cheers,
> Stephen Rothwell

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

* Re: linux-next: build warning after merge of the mm tree
  2024-03-25  1:22 Stephen Rothwell
@ 2024-03-25  8:56 ` David Hildenbrand
  0 siblings, 0 replies; 65+ messages in thread
From: David Hildenbrand @ 2024-03-25  8:56 UTC (permalink / raw)
  To: Stephen Rothwell, Andrew Morton
  Cc: Linux Kernel Mailing List, Linux Next Mailing List

On 25.03.24 02:22, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the mm tree, today's linux-next build (htmldocs) produced
> this warning:
> 
> Documentation/core-api/mm-api:112: include/linux/mm.h:2187: ERROR: Unexpected indentation.
> Documentation/core-api/mm-api:112: include/linux/mm.h:2189: WARNING: Block quote ends without a blank line; unexpected unindent.
> Documentation/core-api/mm-api:112: include/linux/mm.h:2199: ERROR: Unexpected indentation.
> Documentation/core-api/mm-api:112: include/linux/mm.h:2200: WARNING: Block quote ends without a blank line; unexpected unindent.
> 
> Introduced by commit
> 
>    08ec651d776e ("mm: convert folio_estimated_sharers() to folio_likely_mapped_shared()")
> 
> from the mm-unstable branch of the mm tree.
> 

Seems like kerneldoc does not appreciate my lists+indentation. The following
should get the job done:

 From 3e472636d266e3acba3755ed5712992adbc2151d Mon Sep 17 00:00:00 2001
From: David Hildenbrand <david@redhat.com>
Date: Mon, 25 Mar 2024 09:23:03 +0100
Subject: [PATCH] folio_likely_mapped_shared() kerneldoc fixup

Fixup "mm: convert folio_estimated_sharers() to
folio_likely_mapped_shared()".

Signed-off-by: David Hildenbrand <david@redhat.com>
---
  include/linux/mm.h | 32 +++++++++++++++++---------------
  1 file changed, 17 insertions(+), 15 deletions(-)

diff --git a/include/linux/mm.h b/include/linux/mm.h
index afe27ff3fa94..fb3724723448 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -2183,23 +2183,25 @@ static inline size_t folio_size(struct folio *folio)
   * at most once into an MM, and they cannot be partially mapped.
   *
   * For other folios, the result can be fuzzy:
- * (a) For partially-mappable large folios (THP), the return value can wrongly
- *     indicate "mapped exclusively" (false negative) when the folio is
- *     only partially mapped into at least one MM.
- * (b) For pagecache folios (including hugetlb), the return value can wrongly
- *     indicate "mapped shared" (false positive) when two VMAs in the same MM
- *     cover the same file range.
- * (c) For (small) KSM folios, the return value can wrongly indicate "mapped
- *     shared" (false negative), when the folio is mapped multiple times into
- *     the same MM.
+ *    #. For partially-mappable large folios (THP), the return value can wrongly
+ *       indicate "mapped exclusively" (false negative) when the folio is
+ *       only partially mapped into at least one MM.
+ *    #. For pagecache folios (including hugetlb), the return value can wrongly
+ *       indicate "mapped shared" (false positive) when two VMAs in the same MM
+ *       cover the same file range.
+ *    #. For (small) KSM folios, the return value can wrongly indicate "mapped
+ *       shared" (false negative), when the folio is mapped multiple times into
+ *       the same MM.
   *
   * Further, this function only considers current page table mappings that
- * are tracked using the folio mapcount(s). It does not consider:
- * (1) If the folio might get mapped in the (near) future (e.g., swapcache,
- *     pagecache, temporary unmapping for migration).
- * (2) If the folio is mapped differently (VM_PFNMAP).
- * (3) If hugetlb page table sharing applies. Callers might want to check
- *     hugetlb_pmd_shared().
+ * are tracked using the folio mapcount(s).
+ *
+ * This function does not consider:
+ *    #. If the folio might get mapped in the (near) future (e.g., swapcache,
+ *       pagecache, temporary unmapping for migration).
+ *    #. If the folio is mapped differently (VM_PFNMAP).
+ *    #. If hugetlb page table sharing applies. Callers might want to check
+ *       hugetlb_pmd_shared().
   *
   * Return: Whether the folio is estimated to be mapped into more than one MM.
   */
-- 
2.43.2


-- 
Cheers,

David / dhildenb


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

* linux-next: build warning after merge of the mm tree
@ 2024-03-25  1:25 Stephen Rothwell
  2024-03-26  2:21 ` Suren Baghdasaryan
  0 siblings, 1 reply; 65+ messages in thread
From: Stephen Rothwell @ 2024-03-25  1:25 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Kent Overstreet, Suren Baghdasaryan, Linux Kernel Mailing List,
	Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 395 bytes --]

Hi all,

After merging the mm tree, today's linux-next build (htmldocs) produced
this warning:

Documentation/filesystems/proc.rst:958: WARNING: Title underline too short.

allocinfo
~~~~~~~

Introduced by commit

  d08b311b6d49 ("lib: add allocation tagging support for memory allocation profiling")

from the mm-unstable branch of the mm tree.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* linux-next: build warning after merge of the mm tree
@ 2024-03-25  1:22 Stephen Rothwell
  2024-03-25  8:56 ` David Hildenbrand
  0 siblings, 1 reply; 65+ messages in thread
From: Stephen Rothwell @ 2024-03-25  1:22 UTC (permalink / raw)
  To: Andrew Morton
  Cc: David Hildenbrand, Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 742 bytes --]

Hi all,

After merging the mm tree, today's linux-next build (htmldocs) produced
this warning:

Documentation/core-api/mm-api:112: include/linux/mm.h:2187: ERROR: Unexpected indentation.
Documentation/core-api/mm-api:112: include/linux/mm.h:2189: WARNING: Block quote ends without a blank line; unexpected unindent.
Documentation/core-api/mm-api:112: include/linux/mm.h:2199: ERROR: Unexpected indentation.
Documentation/core-api/mm-api:112: include/linux/mm.h:2200: WARNING: Block quote ends without a blank line; unexpected unindent.

Introduced by commit

  08ec651d776e ("mm: convert folio_estimated_sharers() to folio_likely_mapped_shared()")

from the mm-unstable branch of the mm tree.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: linux-next: build warning after merge of the mm tree
  2024-03-13 15:22   ` Masahiro Yamada
@ 2024-03-13 21:11     ` Uwe Kleine-König
  0 siblings, 0 replies; 65+ messages in thread
From: Uwe Kleine-König @ 2024-03-13 21:11 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: Stephen Rothwell, Andrew Morton, Nicolas Schier,
	Linux Kernel Mailing List, Linux Next Mailing List, linux-kbuild

[-- Attachment #1: Type: text/plain, Size: 2315 bytes --]

Hello Masahiro,

On Thu, Mar 14, 2024 at 12:22:46AM +0900, Masahiro Yamada wrote:
> On Wed, Mar 13, 2024 at 6:01 PM Uwe Kleine-König
> <u.kleine-koenig@pengutronix.de> wrote:
> >
> > On Wed, Mar 13, 2024 at 03:07:28PM +1100, Stephen Rothwell wrote:
> > > Hi all,
> > >
> > > After merging the mm tree, today's linux-next build (powerpc allyesconfig)
> > > produced this warning:
> > >
> > > Use of uninitialized value $ENV{"abs_srctree"} in concatenation (.) or string at /home/sfr/next/next/lib/build_OID_registry line 38.
> > >
> > > Introduced by commit
> > >
> > >   325f7b0aaea6 ("lib/build_OID_registry: Don't mention the full path of the script in output")
> > >
> > > from the mm-nonmm-unstable branch of the mm tree.
> >
> > Actually the warning doesn't happen on 325f7b0aaea6. The commit is only
> > problematic in combination with commit
> >
> >         e2bad142bb3d ("kbuild: unexport abs_srctree and abs_objtree")
> >
> > . This commit suggests to use $(abspath ) or $(realpath ) instead, but I
> > fail to apply this suggestion here.
> >
> > Obviously
> >
> > diff --git a/Makefile b/Makefile
> > index 5e09b53b4850..f73a73a125e0 100644
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -39,7 +39,7 @@ __all:
> >  # prepare rule.
> >
> >  this-makefile := $(lastword $(MAKEFILE_LIST))
> > -abs_srctree := $(realpath $(dir $(this-makefile)))
> > +export abs_srctree := $(realpath $(dir $(this-makefile)))
> >  abs_objtree := $(CURDIR)
> >
> >  ifneq ($(sub_make_done),1)
> >
> > would help.
> >
> > Any ideas how to properly handle that? Would the export be ok?
> 
> Oh well, you are making a lot of effort just for a C comment line.

I don't care much either. Given that now I know how to somewhat keep the
originally intended information, the effort between a fixed string and
a dynamically generated one isn't very relevant.
 
> use Cwd qw(abs_path);
> 
> my $abs_srctree = abs_path($ENV{'srctree'});

Ah, I missed that srctree is an exported variable. Thanks, will prepare
a v2. akpm already dropped my initial patch from his queue.

Thanks for your input.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: linux-next: build warning after merge of the mm tree
  2024-03-13  9:00 ` Uwe Kleine-König
@ 2024-03-13 15:22   ` Masahiro Yamada
  2024-03-13 21:11     ` Uwe Kleine-König
  0 siblings, 1 reply; 65+ messages in thread
From: Masahiro Yamada @ 2024-03-13 15:22 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Stephen Rothwell, Andrew Morton, Nicolas Schier,
	Linux Kernel Mailing List, Linux Next Mailing List, linux-kbuild

On Wed, Mar 13, 2024 at 6:01 PM Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:
>
> On Wed, Mar 13, 2024 at 03:07:28PM +1100, Stephen Rothwell wrote:
> > Hi all,
> >
> > After merging the mm tree, today's linux-next build (powerpc allyesconfig)
> > produced this warning:
> >
> > Use of uninitialized value $ENV{"abs_srctree"} in concatenation (.) or string at /home/sfr/next/next/lib/build_OID_registry line 38.
> >
> > Introduced by commit
> >
> >   325f7b0aaea6 ("lib/build_OID_registry: Don't mention the full path of the script in output")
> >
> > from the mm-nonmm-unstable branch of the mm tree.
>
> Actually the warning doesn't happen on 325f7b0aaea6. The commit is only
> problematic in combination with commit
>
>         e2bad142bb3d ("kbuild: unexport abs_srctree and abs_objtree")
>
> . This commit suggests to use $(abspath ) or $(realpath ) instead, but I
> fail to apply this suggestion here.
>
> Obviously
>
> diff --git a/Makefile b/Makefile
> index 5e09b53b4850..f73a73a125e0 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -39,7 +39,7 @@ __all:
>  # prepare rule.
>
>  this-makefile := $(lastword $(MAKEFILE_LIST))
> -abs_srctree := $(realpath $(dir $(this-makefile)))
> +export abs_srctree := $(realpath $(dir $(this-makefile)))
>  abs_objtree := $(CURDIR)
>
>  ifneq ($(sub_make_done),1)
>
> would help.
>
> Any ideas how to properly handle that? Would the export be ok?
>
> Best regards
> Uwe





Oh well, you are making a lot of effort just for a C comment line.




It is trivial to achieve the equivalent thing.


use Cwd qw(abs_path);

my $abs_srctree = abs_path($ENV{'srctree'});






I would just print a fixed string, as this is not important.


print C_FILE " * Automatically generated by build_OID_registry.  Do not edit\n";

    OR

print C_FILE " * Automatically generated.  Do not edit\n";






-- 
Best Regards
Masahiro Yamada

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

* Re: linux-next: build warning after merge of the mm tree
  2024-03-13  4:07 Stephen Rothwell
@ 2024-03-13  9:00 ` Uwe Kleine-König
  2024-03-13 15:22   ` Masahiro Yamada
  0 siblings, 1 reply; 65+ messages in thread
From: Uwe Kleine-König @ 2024-03-13  9:00 UTC (permalink / raw)
  To: Stephen Rothwell, Masahiro Yamada
  Cc: Andrew Morton, Nicolas Schier, Linux Kernel Mailing List,
	Linux Next Mailing List, linux-kbuild

[-- Attachment #1: Type: text/plain, Size: 1457 bytes --]

On Wed, Mar 13, 2024 at 03:07:28PM +1100, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the mm tree, today's linux-next build (powerpc allyesconfig)
> produced this warning:
> 
> Use of uninitialized value $ENV{"abs_srctree"} in concatenation (.) or string at /home/sfr/next/next/lib/build_OID_registry line 38.
> 
> Introduced by commit
> 
>   325f7b0aaea6 ("lib/build_OID_registry: Don't mention the full path of the script in output")
> 
> from the mm-nonmm-unstable branch of the mm tree.

Actually the warning doesn't happen on 325f7b0aaea6. The commit is only
problematic in combination with commit

	e2bad142bb3d ("kbuild: unexport abs_srctree and abs_objtree")

. This commit suggests to use $(abspath ) or $(realpath ) instead, but I
fail to apply this suggestion here.

Obviously

diff --git a/Makefile b/Makefile
index 5e09b53b4850..f73a73a125e0 100644
--- a/Makefile
+++ b/Makefile
@@ -39,7 +39,7 @@ __all:
 # prepare rule.
 
 this-makefile := $(lastword $(MAKEFILE_LIST))
-abs_srctree := $(realpath $(dir $(this-makefile)))
+export abs_srctree := $(realpath $(dir $(this-makefile)))
 abs_objtree := $(CURDIR)
 
 ifneq ($(sub_make_done),1)

would help.

Any ideas how to properly handle that? Would the export be ok?

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* linux-next: build warning after merge of the mm tree
@ 2024-03-13  4:07 Stephen Rothwell
  2024-03-13  9:00 ` Uwe Kleine-König
  0 siblings, 1 reply; 65+ messages in thread
From: Stephen Rothwell @ 2024-03-13  4:07 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Uwe Kleine-König, Linux Kernel Mailing List,
	Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 456 bytes --]

Hi all,

After merging the mm tree, today's linux-next build (powerpc allyesconfig)
produced this warning:

Use of uninitialized value $ENV{"abs_srctree"} in concatenation (.) or string at /home/sfr/next/next/lib/build_OID_registry line 38.

Introduced by commit

  325f7b0aaea6 ("lib/build_OID_registry: Don't mention the full path of the script in output")

from the mm-nonmm-unstable branch of the mm tree.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: linux-next: build warning after merge of the mm tree
  2024-01-02  5:40 Stephen Rothwell
@ 2024-01-02 12:54 ` Kirill A. Shutemov
  0 siblings, 0 replies; 65+ messages in thread
From: Kirill A. Shutemov @ 2024-01-02 12:54 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Andrew Morton, Linux Kernel Mailing List, Linux Next Mailing List

On Tue, Jan 02, 2024 at 04:40:40PM +1100, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the mm tree, today's linux-next build (htmldocs) produced
> this warning:
> 
> Documentation/admin-guide/kdump/vmcoreinfo.rst:193: WARNING: Title underline too short.
> 
> (zone.free_area, NR_PAGE_ORDERS)
> -------------------------------
> 
> Introduced by commit
> 
>   bfbd51786990 ("mm, treewide: introduce NR_PAGE_ORDERS")

The fixup:

https://lore.kernel.org/all/20240101111512.7empzyifq7kxtzk3@box/

-- 
  Kiryl Shutsemau / Kirill A. Shutemov

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

* linux-next: build warning after merge of the mm tree
@ 2024-01-02  5:40 Stephen Rothwell
  2024-01-02 12:54 ` Kirill A. Shutemov
  0 siblings, 1 reply; 65+ messages in thread
From: Stephen Rothwell @ 2024-01-02  5:40 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Kirill A. Shutemov, Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 378 bytes --]

Hi all,

After merging the mm tree, today's linux-next build (htmldocs) produced
this warning:

Documentation/admin-guide/kdump/vmcoreinfo.rst:193: WARNING: Title underline too short.

(zone.free_area, NR_PAGE_ORDERS)
-------------------------------

Introduced by commit

  bfbd51786990 ("mm, treewide: introduce NR_PAGE_ORDERS")

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: linux-next: build warning after merge of the mm tree
  2023-12-04  4:54 Stephen Rothwell
@ 2023-12-04 17:03 ` SeongJae Park
  0 siblings, 0 replies; 65+ messages in thread
From: SeongJae Park @ 2023-12-04 17:03 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Andrew Morton, SeongJae Park, Linux Kernel Mailing List,
	Linux Next Mailing List

Hello Stephen,

On 2023-12-04T15:54:42+11:00 Stephen Rothwell <sfr@canb.auug.org.au> wrote:

> Hi all,
> 
> After merging the mm tree, today's linux-next build (htmldocs) produced
> this warning:
> 
> include/linux/damon.h:201: warning: Function parameter or member 'get_score=
> _arg' not described in 'damos_quota'
> 
> Introduced by commit
> 
>   99b36eab9c05 ("mm/damon/core: implement goal-oriented feedback-driven quo=
> ta auto-tuning")

Thank you for letting me know this.  I just sent a patch for this:
https://lore.kernel.org/damon/20231204170106.60992-1-sj@kernel.org


Thanks,
SJ

[...]

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

* linux-next: build warning after merge of the mm tree
@ 2023-12-04  4:54 Stephen Rothwell
  2023-12-04 17:03 ` SeongJae Park
  0 siblings, 1 reply; 65+ messages in thread
From: Stephen Rothwell @ 2023-12-04  4:54 UTC (permalink / raw)
  To: Andrew Morton
  Cc: SeongJae Park, Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 367 bytes --]

Hi all,

After merging the mm tree, today's linux-next build (htmldocs) produced
this warning:

include/linux/damon.h:201: warning: Function parameter or member 'get_score_arg' not described in 'damos_quota'

Introduced by commit

  99b36eab9c05 ("mm/damon/core: implement goal-oriented feedback-driven quota auto-tuning")

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* linux-next: build warning after merge of the mm tree
@ 2023-11-28  2:33 Stephen Rothwell
  0 siblings, 0 replies; 65+ messages in thread
From: Stephen Rothwell @ 2023-11-28  2:33 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Arnd Bergmann, Michael Ellerman, PowerPC,
	Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 433 bytes --]

Hi all,

After merging the mm tree, today's linux-next build (powerpc allyesconfig)
produced this warning:

arch/powerpc/kernel/swsusp_64.c:14:6: warning: no previous prototype for 'do_after_copyback' [-Wmissing-prototypes]
   14 | void do_after_copyback(void)
      |      ^~~~~~~~~~~~~~~~~

Exposed by commit

  c6345dfa6e3e ("Makefile.extrawarn: turn on missing-prototypes globally")

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* linux-next: build warning after merge of the mm tree
@ 2023-10-04  4:46 Stephen Rothwell
  0 siblings, 0 replies; 65+ messages in thread
From: Stephen Rothwell @ 2023-10-04  4:46 UTC (permalink / raw)
  To: Andrew Morton
  Cc: David Hildenbrand, Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 446 bytes --]

Hi all,

After merging the mm tree, today's linux-next build (htmldocs) produced
this warning:

mm/rmap.c:1140: warning: Function parameter or member 'folio' not described in 'folio_move_anon_rmap'
mm/rmap.c:1140: warning: Excess function parameter 'page' description in 'folio_move_anon_rmap'

Introduced by commit

  35c5f94a6269 ("mm/rmap: convert page_move_anon_rmap() to folio_move_anon_rmap()")

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* linux-next: build warning after merge of the mm tree
@ 2023-09-25 23:27 Stephen Rothwell
  0 siblings, 0 replies; 65+ messages in thread
From: Stephen Rothwell @ 2023-09-25 23:27 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Michał Mirosław, Muhammad Usama Anjum,
	Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 509 bytes --]

Hi all,

After merging the mm tree, today's linux-next build (arm
multi_v7_defconfig) produced this warning:

fs/proc/task_mmu.c:2022:13: warning: 'pagemap_scan_backout_range' defined but not used [-Wunused-function]
 2022 | static void pagemap_scan_backout_range(struct pagemap_scan_private *p,
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~

Introduced by commit

  93538f467c0f ("fs/proc/task_mmu: implement IOCTL to get and optionally clear info about PTEs")

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* linux-next: build warning after merge of the mm tree
@ 2023-09-18  3:18 Stephen Rothwell
  0 siblings, 0 replies; 65+ messages in thread
From: Stephen Rothwell @ 2023-09-18  3:18 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Usama Arif, Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 339 bytes --]

Hi all,

After merging the mm tree, today's linux-next build (htmldocs) produced
this warning:

mm/memblock.c:906: warning: Function parameter or member 'type' not described in 'memblock_setclr_flag'

Introduced by commit

  70083e1c8ab4 ("memblock: pass memblock_type to memblock_setclr_flag")

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* linux-next: build warning after merge of the mm tree
@ 2023-09-12  5:20 Stephen Rothwell
  0 siblings, 0 replies; 65+ messages in thread
From: Stephen Rothwell @ 2023-09-12  5:20 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Andreas Gruenbacher, Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 312 bytes --]

Hi all,

After merging the mm tree, today's linux-next build (htmldocs) produced
this warning:

kernel/kthread.c:726: warning: Function parameter or member 'k' not described in 'kthread_stop_put'

Introduced by commit

  ae89b54018aa ("kthread: add kthread_stop_put")

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: linux-next: build warning after merge of the mm tree
  2023-06-05  3:10 Stephen Rothwell
@ 2023-06-05 14:57 ` Liam R. Howlett
  0 siblings, 0 replies; 65+ messages in thread
From: Liam R. Howlett @ 2023-06-05 14:57 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Andrew Morton, Linux Kernel Mailing List, Linux Next Mailing List

* Stephen Rothwell <sfr@canb.auug.org.au> [230604 23:10]:
> Hi all,
> 
> After merging the mm tree, today's linux-next build (htmldocs) produced
> this warning:
> 
> mm/memory.c:1705: warning: Excess function parameter 'mt' description in 'unmap_vmas'
> 
> Introduced by commit
> 
>   c57d0b88196f ("mm: change do_vmi_align_munmap() side tree index")

Thanks, I'll address this in v2.


Regards,
Liam

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

* linux-next: build warning after merge of the mm tree
@ 2023-06-05  3:10 Stephen Rothwell
  2023-06-05 14:57 ` Liam R. Howlett
  0 siblings, 1 reply; 65+ messages in thread
From: Stephen Rothwell @ 2023-06-05  3:10 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Liam R. Howlett, Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 317 bytes --]

Hi all,

After merging the mm tree, today's linux-next build (htmldocs) produced
this warning:

mm/memory.c:1705: warning: Excess function parameter 'mt' description in 'unmap_vmas'

Introduced by commit

  c57d0b88196f ("mm: change do_vmi_align_munmap() side tree index")

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* linux-next: build warning after merge of the mm tree
@ 2023-05-15 23:25 Stephen Rothwell
  0 siblings, 0 replies; 65+ messages in thread
From: Stephen Rothwell @ 2023-05-15 23:25 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Lorenzo Stoakes, Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 520 bytes --]

Hi all,

After merging the mm tree, today's linux-next build (arm
multi_v7_defconfig) produced this warning:

mm/memory.c: In function '__access_remote_vm':
mm/memory.c:5608:29: warning: unused variable 'ret' [-Wunused-variable]
 5608 |                         int ret = 0;
      |                             ^~~

Introduced by commit

  eca1a00155df ("mm/gup: remove vmas parameter from get_user_pages_remote()")

"ret" is only used if CONFIG_HAVE_IOREMAP_PROT is set.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: linux-next: build warning after merge of the mm tree
  2023-05-08  1:19 Stephen Rothwell
@ 2023-05-08 21:36 ` Nhat Pham
  0 siblings, 0 replies; 65+ messages in thread
From: Nhat Pham @ 2023-05-08 21:36 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Andrew Morton, Linux Kernel Mailing List, Linux Next Mailing List

On Sun, May 7, 2023 at 6:19 PM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Hi all,
>
> After merging the mm tree, today's linux-next build (powerpc
> ppc64_defconfig) produced this warning:
>
> <stdin>:1567:2: warning: #warning syscall cachestat not implemented [-Wcpp]
>
> Introduced by commit
>
>   c36ee88cc47d ("cachestat: implement cachestat syscall")
>
> --
> Cheers,
> Stephen Rothwell

Hi Stephen,

Thanks for the report!
We're having a discussion on this in the following thread:

https://lore.kernel.org/lkml/CAMuHMdWUtb_A-uhXrBg6kC9L2zbC_q3m8oCZoq80ZSJvk6mUAA@mail.gmail.com/

Best,
Nhat

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

* linux-next: build warning after merge of the mm tree
@ 2023-05-08  1:19 Stephen Rothwell
  2023-05-08 21:36 ` Nhat Pham
  0 siblings, 1 reply; 65+ messages in thread
From: Stephen Rothwell @ 2023-05-08  1:19 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Nhat Pham, Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 312 bytes --]

Hi all,

After merging the mm tree, today's linux-next build (powerpc
ppc64_defconfig) produced this warning:

<stdin>:1567:2: warning: #warning syscall cachestat not implemented [-Wcpp]

Introduced by commit

  c36ee88cc47d ("cachestat: implement cachestat syscall")

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: linux-next: build warning after merge of the mm tree
  2023-03-23  2:58 ` Stephen Rothwell
@ 2023-03-23 19:38   ` Andrew Morton
  0 siblings, 0 replies; 65+ messages in thread
From: Andrew Morton @ 2023-03-23 19:38 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: David Miller, Linux Kernel Mailing List, Linux Next Mailing List,
	Lorenzo Stoakes

On Thu, 23 Mar 2023 13:58:35 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:

> > arch/sparc/include/asm/current.h:18:30: warning: call-clobbered register used for global register variable
> >    18 | register struct task_struct *current asm("g4");
> >       |                              ^~~~~~~
> 
> This has come back today.  Did my fix up get dropped accidentally?

Yes, looks like Lorenzo didn't integrate that fixup when redoing.  And
I failed to check for that (I usually do...).

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

* Re: linux-next: build warning after merge of the mm tree
  2023-03-20  3:47 Stephen Rothwell
@ 2023-03-23  2:58 ` Stephen Rothwell
  2023-03-23 19:38   ` Andrew Morton
  0 siblings, 1 reply; 65+ messages in thread
From: Stephen Rothwell @ 2023-03-23  2:58 UTC (permalink / raw)
  To: Andrew Morton
  Cc: David Miller, Linux Kernel Mailing List, Linux Next Mailing List,
	Lorenzo Stoakes

[-- Attachment #1: Type: text/plain, Size: 1009 bytes --]

Hi all,

On Mon, 20 Mar 2023 14:47:21 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> After merging the mm tree, today's linux-next build (sparc64 defconfig)
> produced this warning:
> 
> In file included from include/linux/wait.h:11,
>                  from include/linux/swait.h:8,
>                  from include/linux/completion.h:12,
>                  from include/linux/mm_types.h:14,
>                  from include/linux/uio.h:10,
>                  from include/linux/vmalloc.h:12,
>                  from include/asm-generic/io.h:994,
>                  from arch/sparc/include/asm/io.h:22,
>                  from arch/sparc/vdso/vclock_gettime.c:18:
> arch/sparc/include/asm/current.h:18:30: warning: call-clobbered register used for global register variable
>    18 | register struct task_struct *current asm("g4");
>       |                              ^~~~~~~

This has come back today.  Did my fix up get dropped accidentally?

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* linux-next: build warning after merge of the mm tree
@ 2023-03-20  3:47 Stephen Rothwell
  2023-03-23  2:58 ` Stephen Rothwell
  0 siblings, 1 reply; 65+ messages in thread
From: Stephen Rothwell @ 2023-03-20  3:47 UTC (permalink / raw)
  To: Andrew Morton
  Cc: David Miller, Linux Kernel Mailing List, Linux Next Mailing List,
	Lorenzo Stoakes

[-- Attachment #1: Type: text/plain, Size: 3472 bytes --]

Hi all,

After merging the mm tree, today's linux-next build (sparc64 defconfig)
produced this warning:

In file included from include/linux/wait.h:11,
                 from include/linux/swait.h:8,
                 from include/linux/completion.h:12,
                 from include/linux/mm_types.h:14,
                 from include/linux/uio.h:10,
                 from include/linux/vmalloc.h:12,
                 from include/asm-generic/io.h:994,
                 from arch/sparc/include/asm/io.h:22,
                 from arch/sparc/vdso/vclock_gettime.c:18:
arch/sparc/include/asm/current.h:18:30: warning: call-clobbered register used for global register variable
   18 | register struct task_struct *current asm("g4");
      |                              ^~~~~~~

I guess the immediate cause is commit

  4e29dd9708cb ("mm: vmalloc: convert vread() to vread_iter()")

from the mm that included linux/uio.h into include/linux/vmalloc.h.
Though there may be a deeper old cause that may need addressing in the
longer term.

Indeed, this patch (obviously) makes the warning go away (and
presumably speeds up the build ever so slightly :-)).

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 20 Mar 2023 14:02:18 +1100
Subject: [PATCH] mm: vmalloc: fix sparc64 warning

This fixes this warning from a sparc64 defconfig build:

In file included from /home/sfr/next/next/include/linux/wait.h:11,
                 from /home/sfr/next/next/include/linux/swait.h:8,
                 from /home/sfr/next/next/include/linux/completion.h:12,
                 from /home/sfr/next/next/include/linux/mm_types.h:14,
                 from /home/sfr/next/next/include/linux/uio.h:10,
                 from /home/sfr/next/next/include/linux/vmalloc.h:12,
                 from /home/sfr/next/next/include/asm-generic/io.h:994,
                 from /home/sfr/next/next/arch/sparc/include/asm/io.h:22,
                 from /home/sfr/next/next/arch/sparc/vdso/vclock_gettime.c:18:
/home/sfr/next/next/arch/sparc/include/asm/current.h:18:30: warning: call-clobbered register used for global register variable
   18 | register struct task_struct *current asm("g4");
      |                              ^~~~~~~

Fixes: 4e29dd9708cb ("mm: vmalloc: convert vread() to vread_iter()")
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 include/linux/vmalloc.h | 2 +-
 mm/vmalloc.c            | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h
index 6beb2ace6a7a..c187c4d9bc33 100644
--- a/include/linux/vmalloc.h
+++ b/include/linux/vmalloc.h
@@ -9,12 +9,12 @@
 #include <asm/page.h>		/* pgprot_t */
 #include <linux/rbtree.h>
 #include <linux/overflow.h>
-#include <linux/uio.h>
 
 #include <asm/vmalloc.h>
 
 struct vm_area_struct;		/* vma defining user mapping in mm_types.h */
 struct notifier_block;		/* in notifier.h */
+struct iov_iter;		/* in uio.h */
 
 /* bits in flags of vmalloc's vm_struct below */
 #define VM_IOREMAP		0x00000001	/* ioremap() and friends */
diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index f19509a6eef4..6e5647937dab 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -40,6 +40,7 @@
 #include <linux/hugetlb.h>
 #include <linux/sched/mm.h>
 #include <linux/rwsem.h>
+#include <linux/uio.h>
 #include <asm/tlbflush.h>
 #include <asm/shmparam.h>
 
-- 
2.39.2

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* linux-next: build warning after merge of the mm tree
@ 2023-03-16  1:12 Stephen Rothwell
  0 siblings, 0 replies; 65+ messages in thread
From: Stephen Rothwell @ 2023-03-16  1:12 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Alexey Dobriyan, Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 301 bytes --]

Hi all,

After merging the mm tree, today's linux-next build (htmldocs) produced
this warning:

Documentation/ELF/ELF.rst: WARNING: document isn't included in any toctree

Introduced by commit

  6d73cfdeee15 ("ELF: document some de-facto PT_* ABI quirks")

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: linux-next: build warning after merge of the mm tree
  2023-03-01  2:29   ` Suren Baghdasaryan
@ 2023-03-01  5:45     ` Stephen Rothwell
  0 siblings, 0 replies; 65+ messages in thread
From: Stephen Rothwell @ 2023-03-01  5:45 UTC (permalink / raw)
  To: Suren Baghdasaryan
  Cc: Andrew Morton, Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 839 bytes --]

Hi Suren,

On Tue, 28 Feb 2023 18:29:36 -0800 Suren Baghdasaryan <surenb@google.com> wrote:
>
> On Tue, Feb 28, 2023 at 4:47 PM Suren Baghdasaryan <surenb@google.com> wrote:
> >
> > On Tue, Feb 28, 2023 at 4:37 PM Stephen Rothwell <sfr@canb.auug.org.au> wrote:  
> > >
> > > After merging the mm tree, today's linux-next build (htmldocs) produced
> > > this warning:
> > >
> > > include/linux/mm_types.h:1105: warning: Enum value 'FAULT_FLAG_VMA_LOCK' not described in enum 'fault_flag'
> > >
> > > Introduced by commit
> > >
> > >   5827f16cffd6 ("mm: add FAULT_FLAG_VMA_LOCK flag")  
> >
> > Thanks for the notification, Stephen! I'll post a fix for this later today.  
> 
> Fix is posted at:
> https://lore.kernel.org/all/20230301022720.1380780-2-surenb@google.com/

Thanks.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: linux-next: build warning after merge of the mm tree
  2023-03-01  0:47 ` Suren Baghdasaryan
@ 2023-03-01  2:29   ` Suren Baghdasaryan
  2023-03-01  5:45     ` Stephen Rothwell
  0 siblings, 1 reply; 65+ messages in thread
From: Suren Baghdasaryan @ 2023-03-01  2:29 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Andrew Morton, Linux Kernel Mailing List, Linux Next Mailing List

On Tue, Feb 28, 2023 at 4:47 PM Suren Baghdasaryan <surenb@google.com> wrote:
>
> On Tue, Feb 28, 2023 at 4:37 PM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >
> > Hi all,
> >
> > After merging the mm tree, today's linux-next build (htmldocs) produced
> > this warning:
> >
> > include/linux/mm_types.h:1105: warning: Enum value 'FAULT_FLAG_VMA_LOCK' not described in enum 'fault_flag'
> >
> > Introduced by commit
> >
> >   5827f16cffd6 ("mm: add FAULT_FLAG_VMA_LOCK flag")
>
> Thanks for the notification, Stephen! I'll post a fix for this later today.

Fix is posted at:
https://lore.kernel.org/all/20230301022720.1380780-2-surenb@google.com/

>
> >
> > --
> > Cheers,
> > Stephen Rothwell

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

* Re: linux-next: build warning after merge of the mm tree
  2023-03-01  0:36 Stephen Rothwell
@ 2023-03-01  0:47 ` Suren Baghdasaryan
  2023-03-01  2:29   ` Suren Baghdasaryan
  0 siblings, 1 reply; 65+ messages in thread
From: Suren Baghdasaryan @ 2023-03-01  0:47 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Andrew Morton, Linux Kernel Mailing List, Linux Next Mailing List

On Tue, Feb 28, 2023 at 4:37 PM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Hi all,
>
> After merging the mm tree, today's linux-next build (htmldocs) produced
> this warning:
>
> include/linux/mm_types.h:1105: warning: Enum value 'FAULT_FLAG_VMA_LOCK' not described in enum 'fault_flag'
>
> Introduced by commit
>
>   5827f16cffd6 ("mm: add FAULT_FLAG_VMA_LOCK flag")

Thanks for the notification, Stephen! I'll post a fix for this later today.

>
> --
> Cheers,
> Stephen Rothwell

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

* linux-next: build warning after merge of the mm tree
@ 2023-03-01  0:36 Stephen Rothwell
  2023-03-01  0:47 ` Suren Baghdasaryan
  0 siblings, 1 reply; 65+ messages in thread
From: Stephen Rothwell @ 2023-03-01  0:36 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Suren Baghdasaryan, Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 323 bytes --]

Hi all,

After merging the mm tree, today's linux-next build (htmldocs) produced
this warning:

include/linux/mm_types.h:1105: warning: Enum value 'FAULT_FLAG_VMA_LOCK' not described in enum 'fault_flag'

Introduced by commit

  5827f16cffd6 ("mm: add FAULT_FLAG_VMA_LOCK flag")

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* linux-next: build warning after merge of the mm tree
@ 2023-01-17  3:51 Stephen Rothwell
  0 siblings, 0 replies; 65+ messages in thread
From: Stephen Rothwell @ 2023-01-17  3:51 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Matthew Wilcox (Oracle),
	Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 371 bytes --]

Hi all,

After merging the mm tree, today's linux-next build (htmldocs) produced
this warning:

Documentation/mm/unevictable-lru.rst:186: WARNING: Title underline too short.

Vmscan's Handling of Unevictable Folios
--------------------------------------

Introduced by commit

  efe2b9e7bb9d ("mm: remove page_evictable()")

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* linux-next: build warning after merge of the mm tree
@ 2022-12-17 19:22 Stephen Rothwell
  0 siblings, 0 replies; 65+ messages in thread
From: Stephen Rothwell @ 2022-12-17 19:22 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Johannes Weiner, Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 396 bytes --]

Hi all,

After merging the mm tree, today's linux-next build (htmldocs)
produced this warning:

Documentation/admin-guide/cgroup-v1/memory.rst:723: WARNING: Title underline too short.

8. Move charges at task migration (DEPRECATED!)
=================================

Introduced by commit

  67c497111586 ("mm: memcontrol: deprecate charge moving")

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: linux-next: build warning after merge of the mm tree
  2022-11-10 20:20   ` Randy Dunlap
@ 2022-11-10 20:43     ` Jonathan Corbet
  0 siblings, 0 replies; 65+ messages in thread
From: Jonathan Corbet @ 2022-11-10 20:43 UTC (permalink / raw)
  To: Randy Dunlap, Linus Torvalds, Stephen Rothwell
  Cc: Andrew Morton, Linux Kernel Mailing List,
	Linux Next Mailing List, Linux Doc Mailing List

Randy Dunlap <rdunlap@infradead.org> writes:

> Looks like scripts/kernel-doc is deficient in parsing
>
> struct encoded_page;
>
> without having any { ... }
>
> and it doesn't handle "typedef union" or "typedef struct". :(

It's never needed to do that before...it's not often we document
structure types that don't actually exist :)  kernel-doc wants to be
able to check that all of the fields and such are documented, so it
tries to parse the whole thing.

In this case, the right solution might be to just write kerneldoc
comments for the accessor functions instead, since that's what will
actually be used.

jon

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

* Re: linux-next: build warning after merge of the mm tree
  2022-11-10 16:27 ` Linus Torvalds
@ 2022-11-10 20:20   ` Randy Dunlap
  2022-11-10 20:43     ` Jonathan Corbet
  0 siblings, 1 reply; 65+ messages in thread
From: Randy Dunlap @ 2022-11-10 20:20 UTC (permalink / raw)
  To: Linus Torvalds, Stephen Rothwell
  Cc: Andrew Morton, Linux Kernel Mailing List,
	Linux Next Mailing List, Linux Doc Mailing List, Jonathan Corbet

[adding linux-doc]

On 11/10/22 08:27, Linus Torvalds wrote:
> On Wed, Nov 9, 2022 at 11:33 PM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>>
>> After merging the mm tree, today's linux-next build (htmldocs) produced
>> this warning:
>>
>> include/linux/mm_types.h:268: error: Cannot parse struct or union!
> 
> Good on you. You check the docs warnings, I've given up on them
> because there's so many and it takes so long.
> 
> I tried to document the 'struct encoded_page' the same way 'struct
> folio' was documented, but clearly the docs parsing hates it. Let's
> remove the '/**' marker and just make it a regular comment.

Yep, that works. Or adding this works:
-struct encoded_page;
+struct encoded_page {
+};

although it shouldn't be needed.

> The same goes for the 'release_pages()' thing,

Looks like scripts/kernel-doc is deficient in parsing

struct encoded_page;

without having any { ... }

and it doesn't handle "typedef union" or "typedef struct". :(

-- 
~Randy

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

* Re: linux-next: build warning after merge of the mm tree
  2022-11-10  7:33 Stephen Rothwell
@ 2022-11-10 16:27 ` Linus Torvalds
  2022-11-10 20:20   ` Randy Dunlap
  0 siblings, 1 reply; 65+ messages in thread
From: Linus Torvalds @ 2022-11-10 16:27 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Andrew Morton, Linux Kernel Mailing List, Linux Next Mailing List

On Wed, Nov 9, 2022 at 11:33 PM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> After merging the mm tree, today's linux-next build (htmldocs) produced
> this warning:
>
> include/linux/mm_types.h:268: error: Cannot parse struct or union!

Good on you. You check the docs warnings, I've given up on them
because there's so many and it takes so long.

I tried to document the 'struct encoded_page' the same way 'struct
folio' was documented, but clearly the docs parsing hates it. Let's
remove the '/**' marker and just make it a regular comment.

The same goes for the 'release_pages()' thing,

                   Linus

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

* linux-next: build warning after merge of the mm tree
@ 2022-11-10  7:36 Stephen Rothwell
  0 siblings, 0 replies; 65+ messages in thread
From: Stephen Rothwell @ 2022-11-10  7:36 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Linus Torvalds, Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 343 bytes --]

Hi all,

After merging the mm tree, today's linux-next build (htmldocs) produced
this warning:

include/linux/mm.h:1214: warning: cannot understand function prototype: 'typedef union '

Introduced by commit

  4a3df046c983 ("mm: teach release_pages() to take an array of encoded page pointers too")

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* linux-next: build warning after merge of the mm tree
@ 2022-11-10  7:33 Stephen Rothwell
  2022-11-10 16:27 ` Linus Torvalds
  0 siblings, 1 reply; 65+ messages in thread
From: Stephen Rothwell @ 2022-11-10  7:33 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Linus Torvalds, Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 312 bytes --]

Hi all,

After merging the mm tree, today's linux-next build (htmldocs) produced
this warning:

include/linux/mm_types.h:268: error: Cannot parse struct or union!

Introduced by commit

  ff02b16f96f5 ("mm: introduce 'encoded' page pointers with embedded extra bits")

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: linux-next: build warning after merge of the mm tree
  2022-10-26  0:57 Stephen Rothwell
@ 2022-10-26  1:13 ` Sergey Senozhatsky
  0 siblings, 0 replies; 65+ messages in thread
From: Sergey Senozhatsky @ 2022-10-26  1:13 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Andrew Morton, Sergey Senozhatsky, Linux Kernel Mailing List,
	Linux Next Mailing List

On (22/10/26 11:57), Stephen Rothwell wrote:
> Hi all,
> 
> After merging the mm tree, today's linux-next build (htmldocs) produced
> this warning:
> 
> Documentation/admin-guide/blockdev/zram.rst:304: WARNING: Title underline too short.
> 
> 10) Deactivate
> =============
> 
> Introduced by commit
> 
>   410119cc7a63 ("Documentation: document zram pool_page_order attribute")

Will fix. Thanks!

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

* linux-next: build warning after merge of the mm tree
@ 2022-10-26  0:57 Stephen Rothwell
  2022-10-26  1:13 ` Sergey Senozhatsky
  0 siblings, 1 reply; 65+ messages in thread
From: Stephen Rothwell @ 2022-10-26  0:57 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Sergey Senozhatsky, Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 355 bytes --]

Hi all,

After merging the mm tree, today's linux-next build (htmldocs) produced
this warning:

Documentation/admin-guide/blockdev/zram.rst:304: WARNING: Title underline too short.

10) Deactivate
=============

Introduced by commit

  410119cc7a63 ("Documentation: document zram pool_page_order attribute")

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: linux-next: build warning after merge of the mm tree
  2022-09-19  9:09 Stephen Rothwell
@ 2022-09-19  9:30 ` Miaohe Lin
  0 siblings, 0 replies; 65+ messages in thread
From: Miaohe Lin @ 2022-09-19  9:30 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Linux Kernel Mailing List, Linux Next Mailing List, Andrew Morton

On 2022/9/19 17:09, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the mm tree, today's linux-next build (htmldocs) produced
> this warning:
> 
> include/linux/gfp.h:1: warning: no structured comments found
> 
> Introduced by commit
> 
>   4f57293dcaaa ("mm/page_alloc: remove obsolete gfpflags_normal_context()")

Many thanks for report. It seems there's no structured comments for htmldocs left
after above commit. So I think htmldocs for this file should be deleted. Does below
code change fixes the warning?

diff --git a/Documentation/core-api/mm-api.rst b/Documentation/core-api/mm-api.rst
index 1ebcc6c3fafe..f5dde5bceaea 100644
--- a/Documentation/core-api/mm-api.rst
+++ b/Documentation/core-api/mm-api.rst
@@ -19,9 +19,6 @@ User Space Memory Access
 Memory Allocation Controls
 ==========================

-.. kernel-doc:: include/linux/gfp.h
-   :internal:
-
 .. kernel-doc:: include/linux/gfp_types.h
    :doc: Page mobility and placement hints

It will be really appreciated if you can help verify this. Thanks a lot. :)

Thanks,
Miaohe Lin




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

* linux-next: build warning after merge of the mm tree
@ 2022-09-19  9:09 Stephen Rothwell
  2022-09-19  9:30 ` Miaohe Lin
  0 siblings, 1 reply; 65+ messages in thread
From: Stephen Rothwell @ 2022-09-19  9:09 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Miaohe Lin, Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 300 bytes --]

Hi all,

After merging the mm tree, today's linux-next build (htmldocs) produced
this warning:

include/linux/gfp.h:1: warning: no structured comments found

Introduced by commit

  4f57293dcaaa ("mm/page_alloc: remove obsolete gfpflags_normal_context()")

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: linux-next: build warning after merge of the mm tree
  2022-07-18 10:28 Stephen Rothwell
@ 2022-07-18 22:54 ` Andrew Morton
  0 siblings, 0 replies; 65+ messages in thread
From: Andrew Morton @ 2022-07-18 22:54 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Theodore Ts'o, Linux Kernel Mailing List, Linux Next Mailing List

On Mon, 18 Jul 2022 20:28:15 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:

> After merging the mm tree, today's linux-next build (powerpc
> ppc44x_defconfig) produced this warning:
> 
> mm/shmem.c:2848:12: warning: 'shmem_fileattr_set' defined but not used [-Wunused-function]
>  2848 | static int shmem_fileattr_set(struct user_namespace *mnt_userns,
>       |            ^~~~~~~~~~~~~~~~~~
> mm/shmem.c:2839:12: warning: 'shmem_fileattr_get' defined but not used [-Wunused-function]
>  2839 | static int shmem_fileattr_get(struct dentry *dentry, struct fileattr *fa)
>       |            ^~~~~~~~~~~~~~~~~~
> 
> Introduced by commit
> 
>   8673852551f0 ("mm/shmem: support FS_IOC_[SG]ETFLAGS in tmpfs")

Thanks, I moved the definitions inside the appropriate ifdef.

--- a/mm/shmem.c~mm-shmem-support-fs_ioc_etflags-in-tmpfs-fix
+++ a/mm/shmem.c
@@ -2837,39 +2837,6 @@ out:
 	return error;
 }
 
-static int shmem_fileattr_get(struct dentry *dentry, struct fileattr *fa)
-{
-	struct shmem_inode_info *info = SHMEM_I(d_inode(dentry));
-
-	fileattr_fill_flags(fa, info->fsflags & SHMEM_FL_USER_VISIBLE);
-
-	return 0;
-}
-
-static int shmem_fileattr_set(struct user_namespace *mnt_userns,
-			      struct dentry *dentry, struct fileattr *fa)
-{
-	struct inode *inode = d_inode(dentry);
-	struct shmem_inode_info *info = SHMEM_I(inode);
-
-	if (fileattr_has_fsx(fa))
-		return -EOPNOTSUPP;
-
-	info->fsflags = (info->fsflags & ~SHMEM_FL_USER_MODIFIABLE) |
-		(fa->flags & SHMEM_FL_USER_MODIFIABLE);
-
-	inode->i_flags &= ~(S_APPEND | S_IMMUTABLE | S_NOATIME);
-	if (info->fsflags & FS_APPEND_FL)
-		inode->i_flags |= S_APPEND;
-	if (info->fsflags & FS_IMMUTABLE_FL)
-		inode->i_flags |= S_IMMUTABLE;
-	if (info->fsflags & FS_NOATIME_FL)
-		inode->i_flags |= S_NOATIME;
-
-	inode->i_ctime = current_time(inode);
-	return 0;
-}
-
 static int shmem_statfs(struct dentry *dentry, struct kstatfs *buf)
 {
 	struct shmem_sb_info *sbinfo = SHMEM_SB(dentry->d_sb);
@@ -3195,6 +3162,40 @@ static const char *shmem_get_link(struct
 }
 
 #ifdef CONFIG_TMPFS_XATTR
+
+static int shmem_fileattr_get(struct dentry *dentry, struct fileattr *fa)
+{
+	struct shmem_inode_info *info = SHMEM_I(d_inode(dentry));
+
+	fileattr_fill_flags(fa, info->fsflags & SHMEM_FL_USER_VISIBLE);
+
+	return 0;
+}
+
+static int shmem_fileattr_set(struct user_namespace *mnt_userns,
+			      struct dentry *dentry, struct fileattr *fa)
+{
+	struct inode *inode = d_inode(dentry);
+	struct shmem_inode_info *info = SHMEM_I(inode);
+
+	if (fileattr_has_fsx(fa))
+		return -EOPNOTSUPP;
+
+	info->fsflags = (info->fsflags & ~SHMEM_FL_USER_MODIFIABLE) |
+		(fa->flags & SHMEM_FL_USER_MODIFIABLE);
+
+	inode->i_flags &= ~(S_APPEND | S_IMMUTABLE | S_NOATIME);
+	if (info->fsflags & FS_APPEND_FL)
+		inode->i_flags |= S_APPEND;
+	if (info->fsflags & FS_IMMUTABLE_FL)
+		inode->i_flags |= S_IMMUTABLE;
+	if (info->fsflags & FS_NOATIME_FL)
+		inode->i_flags |= S_NOATIME;
+
+	inode->i_ctime = current_time(inode);
+	return 0;
+}
+
 /*
  * Superblocks without xattr inode operations may get some security.* xattr
  * support from the LSM "for free". As soon as we have any other xattrs
_


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

* linux-next: build warning after merge of the mm tree
@ 2022-07-18 10:28 Stephen Rothwell
  2022-07-18 22:54 ` Andrew Morton
  0 siblings, 1 reply; 65+ messages in thread
From: Stephen Rothwell @ 2022-07-18 10:28 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Theodore Ts'o, Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 662 bytes --]

Hi all,

After merging the mm tree, today's linux-next build (powerpc
ppc44x_defconfig) produced this warning:

mm/shmem.c:2848:12: warning: 'shmem_fileattr_set' defined but not used [-Wunused-function]
 2848 | static int shmem_fileattr_set(struct user_namespace *mnt_userns,
      |            ^~~~~~~~~~~~~~~~~~
mm/shmem.c:2839:12: warning: 'shmem_fileattr_get' defined but not used [-Wunused-function]
 2839 | static int shmem_fileattr_get(struct dentry *dentry, struct fileattr *fa)
      |            ^~~~~~~~~~~~~~~~~~

Introduced by commit

  8673852551f0 ("mm/shmem: support FS_IOC_[SG]ETFLAGS in tmpfs")

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: linux-next: build warning after merge of the mm tree
  2022-06-22 16:39   ` Mike Kravetz
@ 2022-06-22 18:49     ` Andrew Morton
  0 siblings, 0 replies; 65+ messages in thread
From: Andrew Morton @ 2022-06-22 18:49 UTC (permalink / raw)
  To: Mike Kravetz
  Cc: Stephen Rothwell, Linux Kernel Mailing List, Linux Next Mailing List

On Wed, 22 Jun 2022 09:39:46 -0700 Mike Kravetz <mike.kravetz@oracle.com> wrote:

> > --- a/mm/hugetlb.c
> > +++ b/mm/hugetlb.c
> > @@ -6905,10 +6905,8 @@ unsigned long hugetlb_mask_last_page(struct hstate *h)
> >  /* See description above.  Architectures can provide their own version. */
> >  __weak unsigned long hugetlb_mask_last_page(struct hstate *h)
> >  {
> > -	unsigned long hp_size = huge_page_size(h);
> > -
> >  #ifdef CONFIG_ARCH_WANT_HUGE_PMD_SHARE
> > -	if (hp_size == PMD_SIZE)
> > +	if (huge_page_size(h) == PMD_SIZE)
> >  		return PUD_SIZE - PMD_SIZE;
> >  #endif
> >  	return 0UL;
> > -- 
> 
> Thanks Stephen,  my bad for not building !CONFIG_ARCH_WANT_HUGE_PMD_SHARE and,
> the error is pretty obvious. :(
> 
> Andrew, do you want me to send an updated version of the patch?  Or,
> would you prefer to include Stephen's fix?

I added Stephen's fix, thanks.

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

* Re: linux-next: build warning after merge of the mm tree
  2022-06-22  7:11 ` Stephen Rothwell
@ 2022-06-22 16:39   ` Mike Kravetz
  2022-06-22 18:49     ` Andrew Morton
  0 siblings, 1 reply; 65+ messages in thread
From: Mike Kravetz @ 2022-06-22 16:39 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Andrew Morton, Linux Kernel Mailing List, Linux Next Mailing List

On 06/22/22 17:11, Stephen Rothwell wrote:
> Hi all,
> 
> On Wed, 22 Jun 2022 15:54:08 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > 
> > After merging the mm tree, today's linux-next build (powerpc
> > ppc64_defconfig) produced this warning:
> > 
> > mm/hugetlb.c: In function 'hugetlb_mask_last_page':
> > mm/hugetlb.c:6908:23: warning: unused variable 'hp_size' [-Wunused-variable]
> >  6908 |         unsigned long hp_size = huge_page_size(h);
> >       |                       ^~~~~~~
> > 
> > Introduced by commit
> > 
> >   76005bedbc32 ("hugetlb: do not update address in huge_pmd_unshare")
> 
> This became a build failure in my powerpc allyesconfig build, so I
> applied this patch:
> 
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Wed, 22 Jun 2022 17:04:46 +1000
> Subject: [PATCH] hugetlb: fix an unused variable warning/error
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
>  mm/hugetlb.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/mm/hugetlb.c b/mm/hugetlb.c
> index 2e4a92cebd9c..f338640fbe4a 100644
> --- a/mm/hugetlb.c
> +++ b/mm/hugetlb.c
> @@ -6905,10 +6905,8 @@ unsigned long hugetlb_mask_last_page(struct hstate *h)
>  /* See description above.  Architectures can provide their own version. */
>  __weak unsigned long hugetlb_mask_last_page(struct hstate *h)
>  {
> -	unsigned long hp_size = huge_page_size(h);
> -
>  #ifdef CONFIG_ARCH_WANT_HUGE_PMD_SHARE
> -	if (hp_size == PMD_SIZE)
> +	if (huge_page_size(h) == PMD_SIZE)
>  		return PUD_SIZE - PMD_SIZE;
>  #endif
>  	return 0UL;
> -- 

Thanks Stephen,  my bad for not building !CONFIG_ARCH_WANT_HUGE_PMD_SHARE and,
the error is pretty obvious. :(

Andrew, do you want me to send an updated version of the patch?  Or,
would you prefer to include Stephen's fix?
-- 
Mike Kravetz

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

* Re: linux-next: build warning after merge of the mm tree
  2022-06-22  5:54 Stephen Rothwell
@ 2022-06-22  7:11 ` Stephen Rothwell
  2022-06-22 16:39   ` Mike Kravetz
  0 siblings, 1 reply; 65+ messages in thread
From: Stephen Rothwell @ 2022-06-22  7:11 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Mike Kravetz, Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 1539 bytes --]

Hi all,

On Wed, 22 Jun 2022 15:54:08 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> 
> After merging the mm tree, today's linux-next build (powerpc
> ppc64_defconfig) produced this warning:
> 
> mm/hugetlb.c: In function 'hugetlb_mask_last_page':
> mm/hugetlb.c:6908:23: warning: unused variable 'hp_size' [-Wunused-variable]
>  6908 |         unsigned long hp_size = huge_page_size(h);
>       |                       ^~~~~~~
> 
> Introduced by commit
> 
>   76005bedbc32 ("hugetlb: do not update address in huge_pmd_unshare")

This became a build failure in my powerpc allyesconfig build, so I
applied this patch:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Wed, 22 Jun 2022 17:04:46 +1000
Subject: [PATCH] hugetlb: fix an unused variable warning/error

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 mm/hugetlb.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index 2e4a92cebd9c..f338640fbe4a 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -6905,10 +6905,8 @@ unsigned long hugetlb_mask_last_page(struct hstate *h)
 /* See description above.  Architectures can provide their own version. */
 __weak unsigned long hugetlb_mask_last_page(struct hstate *h)
 {
-	unsigned long hp_size = huge_page_size(h);
-
 #ifdef CONFIG_ARCH_WANT_HUGE_PMD_SHARE
-	if (hp_size == PMD_SIZE)
+	if (huge_page_size(h) == PMD_SIZE)
 		return PUD_SIZE - PMD_SIZE;
 #endif
 	return 0UL;
-- 
2.35.1

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* linux-next: build warning after merge of the mm tree
@ 2022-06-22  5:54 Stephen Rothwell
  2022-06-22  7:11 ` Stephen Rothwell
  0 siblings, 1 reply; 65+ messages in thread
From: Stephen Rothwell @ 2022-06-22  5:54 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Mike Kravetz, Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 477 bytes --]

Hi all,

After merging the mm tree, today's linux-next build (powerpc
ppc64_defconfig) produced this warning:

mm/hugetlb.c: In function 'hugetlb_mask_last_page':
mm/hugetlb.c:6908:23: warning: unused variable 'hp_size' [-Wunused-variable]
 6908 |         unsigned long hp_size = huge_page_size(h);
      |                       ^~~~~~~

Introduced by commit

  76005bedbc32 ("hugetlb: do not update address in huge_pmd_unshare")

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: linux-next: build warning after merge of the mm tree
  2022-05-25 10:57 ` Zi Yan
@ 2022-05-25 17:36   ` Andrew Morton
  0 siblings, 0 replies; 65+ messages in thread
From: Andrew Morton @ 2022-05-25 17:36 UTC (permalink / raw)
  To: Zi Yan
  Cc: Stephen Rothwell, Linux Kernel Mailing List, Linux Next Mailing List

On Wed, 25 May 2022 06:57:53 -0400 Zi Yan <ziy@nvidia.com> wrote:

> On 25 May 2022, at 1:54, Stephen Rothwell wrote:
> 
> > Hi all,
> >
> > After merging the mm tree, today's linux-next build (sparc64 defconfig)
> > produced this warning:
> >
> > In file included from include/linux/kernel.h:26,
> >                  from include/linux/cpumask.h:10,
> >                  from include/linux/smp.h:13,
> >                  from include/linux/lockdep.h:14,
> >                  from include/linux/spinlock.h:62,
> >                  from include/linux/mmzone.h:8,
> >                  from include/linux/gfp.h:6,
> >                  from include/linux/mm.h:7,
> >                  from mm/page_alloc.c:19:
> > mm/page_alloc.c: In function 'split_free_page':
> > include/linux/minmax.h:20:35: warning: comparison of distinct pointer types lacks a cast
> >    20 |         (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
> >       |                                   ^~
> > include/linux/minmax.h:26:18: note: in expansion of macro '__typecheck'
> >    26 |                 (__typecheck(x, y) && __no_side_effects(x, y))
> >       |                  ^~~~~~~~~~~
> > include/linux/minmax.h:36:31: note: in expansion of macro '__safe_cmp'
> >    36 |         __builtin_choose_expr(__safe_cmp(x, y), \
> >       |                               ^~~~~~~~~~
> > include/linux/minmax.h:45:25: note: in expansion of macro '__careful_cmp'
> >    45 | #define min(x, y)       __careful_cmp(x, y, <)
> >       |                         ^~~~~~~~~~~~~
> > mm/page_alloc.c:1138:35: note: in expansion of macro 'min'
> >  1138 |                 free_page_order = min(pfn ? __ffs(pfn) : order, __fls(split_pfn_offset));
> >       |                                   ^~~
> >
> > Introduced by commit
> >
> >   29a8af92b874 ("mm: fix a potential infinite loop in start_isolate_page_range()")
> 

The min() warning says "we screwed up the types", and reexamination is
in order.

> The patch below should fix it:
> 
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index 6eec0211e0be..dbbfe4a079d3 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -1123,7 +1123,9 @@ void split_free_page(struct page *free_page,
>              pfn < free_page_pfn + (1UL << order);) {
>                 int mt = get_pfnblock_migratetype(pfn_to_page(pfn), pfn);
> 
> -               free_page_order = min(pfn ? __ffs(pfn) : order, __fls(split_pfn_offset));
> +               free_page_order = min_t(unsigned long,
> +                                       pfn ? __ffs(pfn) : order,
> +                                       __fls(split_pfn_offset));
>                 __free_one_page(pfn_to_page(pfn), pfn, zone, free_page_order,
>                                 mt, FPI_NONE);
>                 pfn += 1UL << free_page_order;

`order' has type `int'.  Inappropriately signed.  It should have been
`unsigned int'.  Too late (or too large) to make that change.

__ffs() and __fls() return `unsigned long'.  Inappropriately wide. 
Should have returned `unsigned int'.  Too late (or too large) to
change.  

So we get to live with the mess we made.  Your proposed change adds
more inappropriateness - why cast to ulong when assigning to an int?

--- a/mm/page_alloc.c~mm-fix-a-potential-infinite-loop-in-start_isolate_page_range-fix
+++ a/mm/page_alloc.c
@@ -1123,7 +1123,9 @@ void split_free_page(struct page *free_p
 	     pfn < free_page_pfn + (1UL << order);) {
 		int mt = get_pfnblock_migratetype(pfn_to_page(pfn), pfn);
 
-		free_page_order = min(pfn ? __ffs(pfn) : order, __fls(split_pfn_offset));
+		free_page_order = min_t(int,
+					pfn ? __ffs(pfn) : order,
+					__fls(split_pfn_offset));
 		__free_one_page(pfn_to_page(pfn), pfn, zone, free_page_order,
 				mt, FPI_NONE);
 		pfn += 1UL << free_page_order;
_


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

* Re: linux-next: build warning after merge of the mm tree
  2022-05-25  5:54 Stephen Rothwell
@ 2022-05-25 10:57 ` Zi Yan
  2022-05-25 17:36   ` Andrew Morton
  0 siblings, 1 reply; 65+ messages in thread
From: Zi Yan @ 2022-05-25 10:57 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Andrew Morton, Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 2639 bytes --]

On 25 May 2022, at 1:54, Stephen Rothwell wrote:

> Hi all,
>
> After merging the mm tree, today's linux-next build (sparc64 defconfig)
> produced this warning:
>
> In file included from include/linux/kernel.h:26,
>                  from include/linux/cpumask.h:10,
>                  from include/linux/smp.h:13,
>                  from include/linux/lockdep.h:14,
>                  from include/linux/spinlock.h:62,
>                  from include/linux/mmzone.h:8,
>                  from include/linux/gfp.h:6,
>                  from include/linux/mm.h:7,
>                  from mm/page_alloc.c:19:
> mm/page_alloc.c: In function 'split_free_page':
> include/linux/minmax.h:20:35: warning: comparison of distinct pointer types lacks a cast
>    20 |         (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
>       |                                   ^~
> include/linux/minmax.h:26:18: note: in expansion of macro '__typecheck'
>    26 |                 (__typecheck(x, y) && __no_side_effects(x, y))
>       |                  ^~~~~~~~~~~
> include/linux/minmax.h:36:31: note: in expansion of macro '__safe_cmp'
>    36 |         __builtin_choose_expr(__safe_cmp(x, y), \
>       |                               ^~~~~~~~~~
> include/linux/minmax.h:45:25: note: in expansion of macro '__careful_cmp'
>    45 | #define min(x, y)       __careful_cmp(x, y, <)
>       |                         ^~~~~~~~~~~~~
> mm/page_alloc.c:1138:35: note: in expansion of macro 'min'
>  1138 |                 free_page_order = min(pfn ? __ffs(pfn) : order, __fls(split_pfn_offset));
>       |                                   ^~~
>
> Introduced by commit
>
>   29a8af92b874 ("mm: fix a potential infinite loop in start_isolate_page_range()")

Hi Stephen,

The patch below should fix it:

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 6eec0211e0be..dbbfe4a079d3 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -1123,7 +1123,9 @@ void split_free_page(struct page *free_page,
             pfn < free_page_pfn + (1UL << order);) {
                int mt = get_pfnblock_migratetype(pfn_to_page(pfn), pfn);

-               free_page_order = min(pfn ? __ffs(pfn) : order, __fls(split_pfn_offset));
+               free_page_order = min_t(unsigned long,
+                                       pfn ? __ffs(pfn) : order,
+                                       __fls(split_pfn_offset));
                __free_one_page(pfn_to_page(pfn), pfn, zone, free_page_order,
                                mt, FPI_NONE);
                pfn += 1UL << free_page_order;

--
Best Regards,
Yan, Zi

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 854 bytes --]

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

* linux-next: build warning after merge of the mm tree
@ 2022-05-25  5:54 Stephen Rothwell
  2022-05-25 10:57 ` Zi Yan
  0 siblings, 1 reply; 65+ messages in thread
From: Stephen Rothwell @ 2022-05-25  5:54 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Zi Yan, Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 1685 bytes --]

Hi all,

After merging the mm tree, today's linux-next build (sparc64 defconfig)
produced this warning:

In file included from include/linux/kernel.h:26,
                 from include/linux/cpumask.h:10,
                 from include/linux/smp.h:13,
                 from include/linux/lockdep.h:14,
                 from include/linux/spinlock.h:62,
                 from include/linux/mmzone.h:8,
                 from include/linux/gfp.h:6,
                 from include/linux/mm.h:7,
                 from mm/page_alloc.c:19:
mm/page_alloc.c: In function 'split_free_page':
include/linux/minmax.h:20:35: warning: comparison of distinct pointer types lacks a cast
   20 |         (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
      |                                   ^~
include/linux/minmax.h:26:18: note: in expansion of macro '__typecheck'
   26 |                 (__typecheck(x, y) && __no_side_effects(x, y))
      |                  ^~~~~~~~~~~
include/linux/minmax.h:36:31: note: in expansion of macro '__safe_cmp'
   36 |         __builtin_choose_expr(__safe_cmp(x, y), \
      |                               ^~~~~~~~~~
include/linux/minmax.h:45:25: note: in expansion of macro '__careful_cmp'
   45 | #define min(x, y)       __careful_cmp(x, y, <)
      |                         ^~~~~~~~~~~~~
mm/page_alloc.c:1138:35: note: in expansion of macro 'min'
 1138 |                 free_page_order = min(pfn ? __ffs(pfn) : order, __fls(split_pfn_offset));
      |                                   ^~~

Introduced by commit

  29a8af92b874 ("mm: fix a potential infinite loop in start_isolate_page_range()")

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: linux-next: build warning after merge of the mm tree
  2022-05-12  9:46 Stephen Rothwell
@ 2022-05-12 12:23 ` Johannes Weiner
  0 siblings, 0 replies; 65+ messages in thread
From: Johannes Weiner @ 2022-05-12 12:23 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Andrew Morton, Linux Kernel Mailing List, Linux Next Mailing List

On Thu, May 12, 2022 at 07:46:07PM +1000, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the mm tree, today's linux-next build (powerpc allnoconfig,
> powerpc ppc44x_defconfig and arm64 defconfig) produced this warning:
> 
> WARNING: unmet direct dependencies detected for ARCH_ENABLE_MEMORY_HOTREMOVE
>   Depends on [n]: MEMORY_HOTPLUG [=n]
>   Selected by [y]:
>   - PPC [=y]
> Building: powerpc64 allnoconfig
> 
> WARNING: unmet direct dependencies detected for ARCH_ENABLE_MEMORY_HOTREMOVE
>   Depends on [n]: MEMORY_HOTPLUG [=n]
>   Selected by [y]:
>   - PPC [=y]
> 
> WARNING: unmet direct dependencies detected for ARCH_ENABLE_MEMORY_HOTREMOVE
>   Depends on [n]: MEMORY_HOTPLUG [=n]
>   Selected by [y]:
>   - ARM64 [=y]
> 
> WARNING: unmet direct dependencies detected for ARCH_ENABLE_MEMORY_HOTREMOVE
>   Depends on [n]: MEMORY_HOTPLUG [=n]
>   Selected by [y]:
>   - ARM64 [=y]
> 
> Probably introduced by commit
> 
>   52bc69c65c03 ("mm: Kconfig: group swap, slab, hotplug and thp options into submenus")

Sorry about the noise, I must be blind. And x86 does
  arch/x86/Kconfig:       select ARCH_ENABLE_MEMORY_HOTREMOVE if MEMORY_HOTPLUG
that's why it didn't trigger for me.

This should be the last one, I triple checked the commit.

---

From 588d2c5ba815df3b8028e198b7543a5450c24b33 Mon Sep 17 00:00:00 2001
From: Johannes Weiner <hannes@cmpxchg.org>
Date: Thu, 12 May 2022 08:11:17 -0400
Subject: [PATCH] mm: Kconfig: group swap, slab, hotplug and thp options into
 submenus fix fix

WARNING: unmet direct dependencies detected for ARCH_ENABLE_MEMORY_HOTREMOVE
  Depends on [n]: MEMORY_HOTPLUG [=n]
  Selected by [y]:
  - PPC [=y]

This is a symbol for the architecture to declare a feature. It mustn't
be conditional on user selection. Move it out of 'if MEMORY_HOTPLUG'.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
---
 mm/Kconfig | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/mm/Kconfig b/mm/Kconfig
index c2f4a547ab00..f63d8dc36511 100644
--- a/mm/Kconfig
+++ b/mm/Kconfig
@@ -436,6 +436,9 @@ config HAVE_BOOTMEM_INFO_NODE
 config ARCH_ENABLE_MEMORY_HOTPLUG
 	bool
 
+config ARCH_ENABLE_MEMORY_HOTREMOVE
+	bool
+
 # eventually, we can have this option just 'select SPARSEMEM'
 menuconfig MEMORY_HOTPLUG
 	bool "Memory hotplug"
@@ -462,9 +465,6 @@ config MEMORY_HOTPLUG_DEFAULT_ONLINE
 	  Say N here if you want the default policy to keep all hot-plugged
 	  memory blocks in 'offline' state.
 
-config ARCH_ENABLE_MEMORY_HOTREMOVE
-	bool
-
 config MEMORY_HOTREMOVE
 	bool "Allow for memory hot remove"
 	select HAVE_BOOTMEM_INFO_NODE if (X86_64 || PPC64)
-- 
2.35.3


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

* linux-next: build warning after merge of the mm tree
@ 2022-05-12  9:46 Stephen Rothwell
  2022-05-12 12:23 ` Johannes Weiner
  0 siblings, 1 reply; 65+ messages in thread
From: Stephen Rothwell @ 2022-05-12  9:46 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Johannes Weiner, Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 963 bytes --]

Hi all,

After merging the mm tree, today's linux-next build (powerpc allnoconfig,
powerpc ppc44x_defconfig and arm64 defconfig) produced this warning:

WARNING: unmet direct dependencies detected for ARCH_ENABLE_MEMORY_HOTREMOVE
  Depends on [n]: MEMORY_HOTPLUG [=n]
  Selected by [y]:
  - PPC [=y]
Building: powerpc64 allnoconfig

WARNING: unmet direct dependencies detected for ARCH_ENABLE_MEMORY_HOTREMOVE
  Depends on [n]: MEMORY_HOTPLUG [=n]
  Selected by [y]:
  - PPC [=y]

WARNING: unmet direct dependencies detected for ARCH_ENABLE_MEMORY_HOTREMOVE
  Depends on [n]: MEMORY_HOTPLUG [=n]
  Selected by [y]:
  - ARM64 [=y]

WARNING: unmet direct dependencies detected for ARCH_ENABLE_MEMORY_HOTREMOVE
  Depends on [n]: MEMORY_HOTPLUG [=n]
  Selected by [y]:
  - ARM64 [=y]

Probably introduced by commit

  52bc69c65c03 ("mm: Kconfig: group swap, slab, hotplug and thp options into submenus")

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: linux-next: build warning after merge of the mm tree
  2022-05-05 21:35 Stephen Rothwell
  2022-05-05 21:38 ` Stephen Rothwell
@ 2022-05-05 22:18 ` Matthew Wilcox
  1 sibling, 0 replies; 65+ messages in thread
From: Matthew Wilcox @ 2022-05-05 22:18 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Andrew Morton, Linux Kernel Mailing List, Linux Next Mailing List

On Fri, May 06, 2022 at 07:35:37AM +1000, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the mm tree, today's linux-next build (i386 allmodconfig
> clang14) produced this warning:
> 
> mm/shmem.c:1704:7: error: variable 'folio' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized]
> 
> Introduced by commit
> 
>   2b58b3f33ba2 ("mm/shmem: convert shmem_swapin_page() to shmem_swapin_folio()")
> 
> 'folio' is used in the error path.

I sent a repacement series here:

https://lore.kernel.org/linux-mm/20220504182857.4013401-1-willy@infradead.org/T/#t

I presume Andrew has not had a chance to integrate it yet.  LSF/MM was
exhausting!

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

* Re: linux-next: build warning after merge of the mm tree
  2022-05-05 21:35 Stephen Rothwell
@ 2022-05-05 21:38 ` Stephen Rothwell
  2022-05-05 22:18 ` Matthew Wilcox
  1 sibling, 0 replies; 65+ messages in thread
From: Stephen Rothwell @ 2022-05-05 21:38 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Matthew Wilcox (Oracle),
	Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 574 bytes --]

Hi all,

On Fri, 6 May 2022 07:35:37 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> After merging the mm tree, today's linux-next build (i386 allmodconfig
> clang14) produced this warning:
> 
> mm/shmem.c:1704:7: error: variable 'folio' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized]
> 
> Introduced by commit
> 
>   2b58b3f33ba2 ("mm/shmem: convert shmem_swapin_page() to shmem_swapin_folio()")
> 
> 'folio' is used in the error path.

This is actually a build failure.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* linux-next: build warning after merge of the mm tree
@ 2022-05-05 21:35 Stephen Rothwell
  2022-05-05 21:38 ` Stephen Rothwell
  2022-05-05 22:18 ` Matthew Wilcox
  0 siblings, 2 replies; 65+ messages in thread
From: Stephen Rothwell @ 2022-05-05 21:35 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Matthew Wilcox (Oracle),
	Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 430 bytes --]

Hi all,

After merging the mm tree, today's linux-next build (i386 allmodconfig
clang14) produced this warning:

mm/shmem.c:1704:7: error: variable 'folio' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized]

Introduced by commit

  2b58b3f33ba2 ("mm/shmem: convert shmem_swapin_page() to shmem_swapin_folio()")

'folio' is used in the error path.
-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* linux-next: build warning after merge of the mm tree
@ 2022-04-28  7:44 Stephen Rothwell
  0 siblings, 0 replies; 65+ messages in thread
From: Stephen Rothwell @ 2022-04-28  7:44 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Jiajian Ye, Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 403 bytes --]

Hi all,

After merging the mm tree, today's linux-next build (htmldocs) produced
this warning:

Documentation/vm/page_owner.rst:176: WARNING: Literal block expected; none found.

Introduced by commit

  0613ea580918 ("tools/vm/page_owner_sort.c: support sorting blocks by multiple keys")

or commit

  0996cc55c8e3 ("Merge branch 'linus' into mm-stable")

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

end of thread, other threads:[~2024-04-17 15:57 UTC | newest]

Thread overview: 65+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-21  9:55 linux-next: build warning after merge of the mm tree Stephen Rothwell
2022-07-21 11:11 ` Zach O'Keefe
  -- strict thread matches above, loose matches on Subject: below --
2024-04-17  5:18 Stephen Rothwell
2024-04-17 15:57 ` Matthew Wilcox
2024-04-15  5:20 Stephen Rothwell
2024-04-15  5:45 ` Barry Song
2024-03-27 22:13 Stephen Rothwell
2024-03-28  1:59 ` Baoquan He
2024-03-28  4:29   ` Stephen Rothwell
2024-03-25  1:25 Stephen Rothwell
2024-03-26  2:21 ` Suren Baghdasaryan
2024-03-25  1:22 Stephen Rothwell
2024-03-25  8:56 ` David Hildenbrand
2024-03-13  4:07 Stephen Rothwell
2024-03-13  9:00 ` Uwe Kleine-König
2024-03-13 15:22   ` Masahiro Yamada
2024-03-13 21:11     ` Uwe Kleine-König
2024-01-02  5:40 Stephen Rothwell
2024-01-02 12:54 ` Kirill A. Shutemov
2023-12-04  4:54 Stephen Rothwell
2023-12-04 17:03 ` SeongJae Park
2023-11-28  2:33 Stephen Rothwell
2023-10-04  4:46 Stephen Rothwell
2023-09-25 23:27 Stephen Rothwell
2023-09-18  3:18 Stephen Rothwell
2023-09-12  5:20 Stephen Rothwell
2023-06-05  3:10 Stephen Rothwell
2023-06-05 14:57 ` Liam R. Howlett
2023-05-15 23:25 Stephen Rothwell
2023-05-08  1:19 Stephen Rothwell
2023-05-08 21:36 ` Nhat Pham
2023-03-20  3:47 Stephen Rothwell
2023-03-23  2:58 ` Stephen Rothwell
2023-03-23 19:38   ` Andrew Morton
2023-03-16  1:12 Stephen Rothwell
2023-03-01  0:36 Stephen Rothwell
2023-03-01  0:47 ` Suren Baghdasaryan
2023-03-01  2:29   ` Suren Baghdasaryan
2023-03-01  5:45     ` Stephen Rothwell
2023-01-17  3:51 Stephen Rothwell
2022-12-17 19:22 Stephen Rothwell
2022-11-10  7:36 Stephen Rothwell
2022-11-10  7:33 Stephen Rothwell
2022-11-10 16:27 ` Linus Torvalds
2022-11-10 20:20   ` Randy Dunlap
2022-11-10 20:43     ` Jonathan Corbet
2022-10-26  0:57 Stephen Rothwell
2022-10-26  1:13 ` Sergey Senozhatsky
2022-09-19  9:09 Stephen Rothwell
2022-09-19  9:30 ` Miaohe Lin
2022-07-18 10:28 Stephen Rothwell
2022-07-18 22:54 ` Andrew Morton
2022-06-22  5:54 Stephen Rothwell
2022-06-22  7:11 ` Stephen Rothwell
2022-06-22 16:39   ` Mike Kravetz
2022-06-22 18:49     ` Andrew Morton
2022-05-25  5:54 Stephen Rothwell
2022-05-25 10:57 ` Zi Yan
2022-05-25 17:36   ` Andrew Morton
2022-05-12  9:46 Stephen Rothwell
2022-05-12 12:23 ` Johannes Weiner
2022-05-05 21:35 Stephen Rothwell
2022-05-05 21:38 ` Stephen Rothwell
2022-05-05 22:18 ` Matthew Wilcox
2022-04-28  7:44 Stephen Rothwell

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).