linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: build warning after merge of the mm-unstable tree
@ 2025-05-09  9:43 Stephen Rothwell
  2025-05-09 20:31 ` Andrew Morton
  0 siblings, 1 reply; 24+ messages in thread
From: Stephen Rothwell @ 2025-05-09  9:43 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Juan Yescas, Linux Kernel Mailing List, Linux Next Mailing List

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

Hi all,

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

In file included from include/vdso/const.h:5,
                 from include/linux/const.h:4,
                 from include/linux/bits.h:5,
                 from include/linux/ratelimit_types.h:5,
                 from include/linux/printk.h:9,
                 from include/asm-generic/bug.h:22,
                 from arch/powerpc/include/asm/bug.h:116,
                 from include/linux/bug.h:5,
                 from include/linux/mmdebug.h:5,
                 from include/linux/mm.h:6,
                 from mm/sparse.c:5:
mm/sparse.c: In function 'usemap_size':
include/linux/mmzone.h:1815:15: warning: left shift count is negative [-Wshift-count-negative]
 1815 |         ((1UL << (PFN_SECTION_SHIFT - pageblock_order)) * NR_PAGEBLOCK_BITS)
      |               ^~
include/uapi/linux/const.h:51:40: note: in definition of macro '__KERNEL_DIV_ROUND_UP'
   51 | #define __KERNEL_DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d))
      |                                        ^
mm/sparse.c:301:16: note: in expansion of macro 'BITS_TO_LONGS'
  301 |         return BITS_TO_LONGS(SECTION_BLOCKFLAGS_BITS) * sizeof(unsigned long);
      |                ^~~~~~~~~~~~~
mm/sparse.c:301:30: note: in expansion of macro 'SECTION_BLOCKFLAGS_BITS'
  301 |         return BITS_TO_LONGS(SECTION_BLOCKFLAGS_BITS) * sizeof(unsigned long);
      |                              ^~~~~~~~~~~~~~~~~~~~~~~

Probably introduced by commit

 ("mm: add CONFIG_PAGE_BLOCK_ORDER to select page block order")

-- 
Cheers,
Stephen Rothwell

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

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

* Re: linux-next: build warning after merge of the mm-unstable tree
  2025-05-09  9:43 Stephen Rothwell
@ 2025-05-09 20:31 ` Andrew Morton
  0 siblings, 0 replies; 24+ messages in thread
From: Andrew Morton @ 2025-05-09 20:31 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Juan Yescas, Linux Kernel Mailing List, Linux Next Mailing List

On Fri, 9 May 2025 19:43:36 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:

> Hi all,
> 
> After merging the mm-unstable tree, today's linux-next build (powerpc64
> allnoconfig) produced this warning:
> 
> In file included from include/vdso/const.h:5,
>                  from include/linux/const.h:4,
>                  from include/linux/bits.h:5,
>                  from include/linux/ratelimit_types.h:5,
>                  from include/linux/printk.h:9,
>                  from include/asm-generic/bug.h:22,
>                  from arch/powerpc/include/asm/bug.h:116,
>                  from include/linux/bug.h:5,
>                  from include/linux/mmdebug.h:5,
>                  from include/linux/mm.h:6,
>                  from mm/sparse.c:5:
> mm/sparse.c: In function 'usemap_size':
> include/linux/mmzone.h:1815:15: warning: left shift count is negative [-Wshift-count-negative]
>  1815 |         ((1UL << (PFN_SECTION_SHIFT - pageblock_order)) * NR_PAGEBLOCK_BITS)
>       |               ^~
> include/uapi/linux/const.h:51:40: note: in definition of macro '__KERNEL_DIV_ROUND_UP'
>    51 | #define __KERNEL_DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d))
>       |                                        ^
> mm/sparse.c:301:16: note: in expansion of macro 'BITS_TO_LONGS'
>   301 |         return BITS_TO_LONGS(SECTION_BLOCKFLAGS_BITS) * sizeof(unsigned long);
>       |                ^~~~~~~~~~~~~
> mm/sparse.c:301:30: note: in expansion of macro 'SECTION_BLOCKFLAGS_BITS'
>   301 |         return BITS_TO_LONGS(SECTION_BLOCKFLAGS_BITS) * sizeof(unsigned long);
>       |                              ^~~~~~~~~~~~~~~~~~~~~~~
> 
> Probably introduced by commit
> 
>  ("mm: add CONFIG_PAGE_BLOCK_ORDER to select page block order")
> 

Yes, thanks, I'll drop this version of the patch.

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

* linux-next: build warning after merge of the mm-unstable tree
@ 2025-06-10  4:33 Stephen Rothwell
  2025-06-10  4:35 ` Christoph Hellwig
  0 siblings, 1 reply; 24+ messages in thread
From: Stephen Rothwell @ 2025-06-10  4:33 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Christoph Hellwig, Linux Kernel Mailing List,
	Linux Next Mailing List

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

Hi all,

After merging the mm-unstable tree, today's linux-next build (hmldocs)
failed like this:

mm/shmem.c:1551: warning: Excess function parameter 'wbc' description in 'shmem_writeout'

Caused by commit

  7140d202bf58 ("mm: stop passing a writeback_control structure to shmem_writeout")

-- 
Cheers,
Stephen Rothwell

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

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

* Re: linux-next: build warning after merge of the mm-unstable tree
  2025-06-10  4:33 Stephen Rothwell
@ 2025-06-10  4:35 ` Christoph Hellwig
  0 siblings, 0 replies; 24+ messages in thread
From: Christoph Hellwig @ 2025-06-10  4:35 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Andrew Morton, Christoph Hellwig, Linux Kernel Mailing List,
	Linux Next Mailing List

On Tue, Jun 10, 2025 at 02:33:46PM +1000, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the mm-unstable tree, today's linux-next build (hmldocs)
> failed like this:
> 
> mm/shmem.c:1551: warning: Excess function parameter 'wbc' description in 'shmem_writeout'

Yeah, that's just gone.  Let me fix this and resend the series now that
we have a stable base.


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

* linux-next: build warning after merge of the mm-unstable tree
@ 2025-07-10  7:50 Stephen Rothwell
  2025-07-11  9:57 ` David Hildenbrand
  0 siblings, 1 reply; 24+ messages in thread
From: Stephen Rothwell @ 2025-07-10  7:50 UTC (permalink / raw)
  To: Andrew Morton
  Cc: David Hildenbrand, Linux Kernel Mailing List,
	Linux Next Mailing List

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

Hi all,

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

include/linux/page-flags.h:1161: warning: Function parameter or struct member 'page' not described in 'page_has_movable_ops'

Introduced by commit

  7a93faa2375d ("mm: convert "movable" flag in page->mapping to a page flag")

-- 
Cheers,
Stephen Rothwell

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

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

* linux-next: build warning after merge of the mm-unstable tree
@ 2025-07-10  7:54 Stephen Rothwell
  2025-07-10 22:30 ` Andrew Morton
  0 siblings, 1 reply; 24+ messages in thread
From: Stephen Rothwell @ 2025-07-10  7:54 UTC (permalink / raw)
  To: Andrew Morton
  Cc: David Hildenbrand, Linux Kernel Mailing List,
	Linux Next Mailing List

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

Hi all,

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

mm/migrate.c:215: warning: Function parameter or struct member 'dst' not described in 'migrate_movable_ops_page'
mm/migrate.c:215: warning: Function parameter or struct member 'src' not described in 'migrate_movable_ops_page'
mm/migrate.c:215: warning: Function parameter or struct member 'mode' not described in 'migrate_movable_ops_page'
mm/migrate.c:215: warning: Excess function parameter 'page' description in 'migrate_movable_ops_page'

Introduced by commit

  d5967fb0bf8e ("mm/migrate: factor out movable_ops page handling into migrate_movable_ops_page()")

-- 
Cheers,
Stephen Rothwell

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

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

* Re: linux-next: build warning after merge of the mm-unstable tree
  2025-07-10  7:54 Stephen Rothwell
@ 2025-07-10 22:30 ` Andrew Morton
  2025-07-10 22:49   ` Stephen Rothwell
                     ` (2 more replies)
  0 siblings, 3 replies; 24+ messages in thread
From: Andrew Morton @ 2025-07-10 22:30 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: David Hildenbrand, Linux Kernel Mailing List,
	Linux Next Mailing List

On Thu, 10 Jul 2025 17:54:46 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:

> Hi all,
> 
> After merging the mm-unstable tree, today's linux-next build (htmldocs)
> produced this warning:
> 
> mm/migrate.c:215: warning: Function parameter or struct member 'dst' not described in 'migrate_movable_ops_page'
> mm/migrate.c:215: warning: Function parameter or struct member 'src' not described in 'migrate_movable_ops_page'
> mm/migrate.c:215: warning: Function parameter or struct member 'mode' not described in 'migrate_movable_ops_page'
> mm/migrate.c:215: warning: Excess function parameter 'page' description in 'migrate_movable_ops_page'
> 
> Introduced by commit
> 
>   d5967fb0bf8e ("mm/migrate: factor out movable_ops page handling into migrate_movable_ops_page()")

How about this?

--- a/mm/migrate.c~mm-migrate-factor-out-movable_ops-page-handling-into-migrate_movable_ops_page-fix
+++ a/mm/migrate.c
@@ -161,7 +161,9 @@ static void putback_movable_ops_page(str
 
 /**
  * migrate_movable_ops_page - migrate an isolated movable_ops page
- * @page: The isolated page.
+ * @dst: The destination page.
+ * @src: The source page.
+ * @mode: The migration mode.
  *
  * Migrate an isolated movable_ops page.
  *
_


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

* Re: linux-next: build warning after merge of the mm-unstable tree
  2025-07-10 22:30 ` Andrew Morton
@ 2025-07-10 22:49   ` Stephen Rothwell
  2025-07-11  0:36   ` Randy Dunlap
  2025-07-11  6:28   ` David Hildenbrand
  2 siblings, 0 replies; 24+ messages in thread
From: Stephen Rothwell @ 2025-07-10 22:49 UTC (permalink / raw)
  To: Andrew Morton
  Cc: David Hildenbrand, Linux Kernel Mailing List,
	Linux Next Mailing List

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

Hi Andrew,

On Thu, 10 Jul 2025 15:30:17 -0700 Andrew Morton <akpm@linux-foundation.org> wrote:
>
> How about this?
> 
> --- a/mm/migrate.c~mm-migrate-factor-out-movable_ops-page-handling-into-migrate_movable_ops_page-fix
> +++ a/mm/migrate.c
> @@ -161,7 +161,9 @@ static void putback_movable_ops_page(str
>  
>  /**
>   * migrate_movable_ops_page - migrate an isolated movable_ops page
> - * @page: The isolated page.
> + * @dst: The destination page.
> + * @src: The source page.
> + * @mode: The migration mode.
>   *
>   * Migrate an isolated movable_ops page.
>   *
> _
> 

Looks good to me (but I haven't actually tested it).

-- 
Cheers,
Stephen Rothwell

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

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

* Re: linux-next: build warning after merge of the mm-unstable tree
  2025-07-10 22:30 ` Andrew Morton
  2025-07-10 22:49   ` Stephen Rothwell
@ 2025-07-11  0:36   ` Randy Dunlap
  2025-07-11  6:28   ` David Hildenbrand
  2 siblings, 0 replies; 24+ messages in thread
From: Randy Dunlap @ 2025-07-11  0:36 UTC (permalink / raw)
  To: Andrew Morton, Stephen Rothwell
  Cc: David Hildenbrand, Linux Kernel Mailing List,
	Linux Next Mailing List



On 7/10/25 3:30 PM, Andrew Morton wrote:
> On Thu, 10 Jul 2025 17:54:46 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> 
>> Hi all,
>>
>> After merging the mm-unstable tree, today's linux-next build (htmldocs)
>> produced this warning:
>>
>> mm/migrate.c:215: warning: Function parameter or struct member 'dst' not described in 'migrate_movable_ops_page'
>> mm/migrate.c:215: warning: Function parameter or struct member 'src' not described in 'migrate_movable_ops_page'
>> mm/migrate.c:215: warning: Function parameter or struct member 'mode' not described in 'migrate_movable_ops_page'
>> mm/migrate.c:215: warning: Excess function parameter 'page' description in 'migrate_movable_ops_page'
>>
>> Introduced by commit
>>
>>   d5967fb0bf8e ("mm/migrate: factor out movable_ops page handling into migrate_movable_ops_page()")
> 
> How about this?
> 
> --- a/mm/migrate.c~mm-migrate-factor-out-movable_ops-page-handling-into-migrate_movable_ops_page-fix
> +++ a/mm/migrate.c
> @@ -161,7 +161,9 @@ static void putback_movable_ops_page(str
>  
>  /**
>   * migrate_movable_ops_page - migrate an isolated movable_ops page
> - * @page: The isolated page.
> + * @dst: The destination page.
> + * @src: The source page.
> + * @mode: The migration mode.
>   *
>   * Migrate an isolated movable_ops page.
>   *
> _

Acked-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>

-- 
~Randy

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

* Re: linux-next: build warning after merge of the mm-unstable tree
  2025-07-10 22:30 ` Andrew Morton
  2025-07-10 22:49   ` Stephen Rothwell
  2025-07-11  0:36   ` Randy Dunlap
@ 2025-07-11  6:28   ` David Hildenbrand
  2 siblings, 0 replies; 24+ messages in thread
From: David Hildenbrand @ 2025-07-11  6:28 UTC (permalink / raw)
  To: Andrew Morton, Stephen Rothwell
  Cc: Linux Kernel Mailing List, Linux Next Mailing List

On 11.07.25 00:30, Andrew Morton wrote:
> On Thu, 10 Jul 2025 17:54:46 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> 
>> Hi all,
>>
>> After merging the mm-unstable tree, today's linux-next build (htmldocs)
>> produced this warning:
>>

Hi,

>> mm/migrate.c:215: warning: Function parameter or struct member 'dst' not described in 'migrate_movable_ops_page'
>> mm/migrate.c:215: warning: Function parameter or struct member 'src' not described in 'migrate_movable_ops_page'
>> mm/migrate.c:215: warning: Function parameter or struct member 'mode' not described in 'migrate_movable_ops_page'
>> mm/migrate.c:215: warning: Excess function parameter 'page' description in 'migrate_movable_ops_page'
>>
>> Introduced by commit
>>
>>    d5967fb0bf8e ("mm/migrate: factor out movable_ops page handling into migrate_movable_ops_page()")
> 

Thanks Andrew for taking care of this, was out the last two days.

> How about this?
> 
> --- a/mm/migrate.c~mm-migrate-factor-out-movable_ops-page-handling-into-migrate_movable_ops_page-fix
> +++ a/mm/migrate.c
> @@ -161,7 +161,9 @@ static void putback_movable_ops_page(str
>   
>   /**
>    * migrate_movable_ops_page - migrate an isolated movable_ops page
> - * @page: The isolated page.
> + * @dst: The destination page.
> + * @src: The source page.
> + * @mode: The migration mode.


LGTM, thanks!


-- 
Cheers,

David / dhildenb


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

* Re: linux-next: build warning after merge of the mm-unstable tree
  2025-07-10  7:50 Stephen Rothwell
@ 2025-07-11  9:57 ` David Hildenbrand
  0 siblings, 0 replies; 24+ messages in thread
From: David Hildenbrand @ 2025-07-11  9:57 UTC (permalink / raw)
  To: Stephen Rothwell, Andrew Morton
  Cc: Linux Kernel Mailing List, Linux Next Mailing List

On 10.07.25 09:50, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the mm-unstable tree, today's linux-next build (htmldocs)
> produced this warning:
> 
> include/linux/page-flags.h:1161: warning: Function parameter or struct member 'page' not described in 'page_has_movable_ops'
> 
> Introduced by commit
> 
>    7a93faa2375d ("mm: convert "movable" flag in page->mapping to a page flag")
> 

Ah, there is a ":" missing.

diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h
index 970600d79daca..8e4d6eda8a8d6 100644
--- a/include/linux/page-flags.h
+++ b/include/linux/page-flags.h
@@ -1150,7 +1150,7 @@ PAGEFLAG_FALSE(MovableOpsIsolated, 
movable_ops_isolated);

  /**
   * page_has_movable_ops - test for a movable_ops page
- * @page The page to test.
+ * @page: The page to test.
   *
   * Test whether this is a movable_ops page. Such pages will stay that
   * way until freed.


-- 
Cheers,

David / dhildenb


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

* linux-next: build warning after merge of the mm-unstable tree
@ 2025-07-15  8:55 Stephen Rothwell
  2025-07-15 18:54 ` SeongJae Park
  0 siblings, 1 reply; 24+ messages in thread
From: Stephen Rothwell @ 2025-07-15  8:55 UTC (permalink / raw)
  To: Andrew Morton
  Cc: SeongJae Park, Linux Kernel Mailing List, Linux Next Mailing List

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

Hi all,

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

include/linux/damon.h:629: warning: Function parameter or struct member 'cleanup_target' not described in 'damon_operations'
include/linux/damon.h:794: warning: Excess struct member 'callback' description in 'damon_ctx'

Introduced by commits

  dff2bc66ec7b ("mm/damon/core: remove damon_callback")
  769bd386e490 ("mm/damon/core: add cleanup_target() ops callback")

-- 
Cheers,
Stephen Rothwell

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

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

* Re: linux-next: build warning after merge of the mm-unstable tree
  2025-07-15  8:55 Stephen Rothwell
@ 2025-07-15 18:54 ` SeongJae Park
  0 siblings, 0 replies; 24+ messages in thread
From: SeongJae Park @ 2025-07-15 18:54 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: SeongJae Park, Andrew Morton, Linux Kernel Mailing List,
	Linux Next Mailing List

Hello Stephen,

On Tue, 15 Jul 2025 18:55:49 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:

> Hi all,
> 
> After merging the mm-unstable tree, today's linux-next build (htmldocs)
> produced this warning:
> 
> include/linux/damon.h:629: warning: Function parameter or struct member 'cleanup_target' not described in 'damon_operations'
> include/linux/damon.h:794: warning: Excess struct member 'callback' description in 'damon_ctx'
> 
> Introduced by commits
> 
>   dff2bc66ec7b ("mm/damon/core: remove damon_callback")
>   769bd386e490 ("mm/damon/core: add cleanup_target() ops callback")

Thank you for reporting, Stephen!  I just sent fixes:
https://lore.kernel.org/20250712204650.155988-1-sj@kernel.org


Thanks,
SJ

[...]

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

* linux-next: build warning after merge of the mm-unstable tree
@ 2025-09-04  2:14 Stephen Rothwell
  2025-09-04  2:59 ` Andrew Morton
  0 siblings, 1 reply; 24+ messages in thread
From: Stephen Rothwell @ 2025-09-04  2:14 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Max Kellermann, Linux Kernel Mailing List,
	Linux Next Mailing List

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

Hi all,

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

In file included from include/linux/highmem.h:14,
                 from include/linux/bvec.h:10,
                 from include/linux/blk_types.h:10,
                 from include/linux/writeback.h:13,
                 from include/linux/memcontrol.h:23,
                 from include/linux/swap.h:9,
                 from include/linux/suspend.h:5,
                 from arch/arm/mach-highbank/pm.c:9:
include/linux/highmem-internal.h: In function 'kmap_local_folio':
include/linux/highmem-internal.h:86:46: warning: passing argument 1 of 'folio_page' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
   86 |         const struct page *page = folio_page(folio, offset / PAGE_SIZE);
      |                                              ^~~~~
In file included from include/linux/mmzone.h:23,
                 from include/linux/swap.h:7:
include/linux/page-flags.h:319:53: note: expected 'struct folio *' but argument is of type 'const struct folio *'
  319 | static inline struct page *folio_page(struct folio *folio, unsigned long n)
      |                                       ~~~~~~~~~~~~~~^~~~~

And 5.5MB more :-(

Introduced by commit

  598ad57d4b46 ("mm: constify highmem related functions for improved const-correctness")

I have reverted that commit for today.

-- 
Cheers,
Stephen Rothwell

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

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

* Re: linux-next: build warning after merge of the mm-unstable tree
  2025-09-04  2:14 Stephen Rothwell
@ 2025-09-04  2:59 ` Andrew Morton
  2025-09-04  6:33   ` David Hildenbrand
  0 siblings, 1 reply; 24+ messages in thread
From: Andrew Morton @ 2025-09-04  2:59 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Max Kellermann, Linux Kernel Mailing List,
	Linux Next Mailing List, Lorenzo Stoakes, David Hildenbrand,
	Vlastimil Babka, Mike Rapoport, Matthew Wilcox

On Thu, 4 Sep 2025 12:14:38 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:

> After merging the mm-unstable tree, today's linux-next build (arm
> multi_v7_defconfig) produced this warning:
> 
> In file included from include/linux/highmem.h:14,
>                  from include/linux/bvec.h:10,
>                  from include/linux/blk_types.h:10,
>                  from include/linux/writeback.h:13,
>                  from include/linux/memcontrol.h:23,
>                  from include/linux/swap.h:9,
>                  from include/linux/suspend.h:5,
>                  from arch/arm/mach-highbank/pm.c:9:
> include/linux/highmem-internal.h: In function 'kmap_local_folio':
> include/linux/highmem-internal.h:86:46: warning: passing argument 1 of 'folio_page' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
>    86 |         const struct page *page = folio_page(folio, offset / PAGE_SIZE);
>       |                                              ^~~~~
> In file included from include/linux/mmzone.h:23,
>                  from include/linux/swap.h:7:
> include/linux/page-flags.h:319:53: note: expected 'struct folio *' but argument is of type 'const struct folio *'
>   319 | static inline struct page *folio_page(struct folio *folio, unsigned long n)


Yeah, thanks, folio_page() is a problem.  I'll do the below nasty for
now, but nasty.

--- a/include/linux/page-flags.h~mm-constify-highmem-related-functions-for-improved-const-correctness-fix
+++ a/include/linux/page-flags.h
@@ -316,9 +316,9 @@ static __always_inline unsigned long _co
  * check that the page number lies within @folio; the caller is presumed
  * to have a reference to the page.
  */
-static inline struct page *folio_page(struct folio *folio, unsigned long n)
+static inline struct page *folio_page(const struct folio *folio, unsigned long n)
 {
-	return &folio->page + n;
+	return (struct page *)(&folio->page + n);
 }
 
 static __always_inline int PageTail(const struct page *page)
_


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

* Re: linux-next: build warning after merge of the mm-unstable tree
  2025-09-04  2:59 ` Andrew Morton
@ 2025-09-04  6:33   ` David Hildenbrand
  0 siblings, 0 replies; 24+ messages in thread
From: David Hildenbrand @ 2025-09-04  6:33 UTC (permalink / raw)
  To: Andrew Morton, Stephen Rothwell
  Cc: Max Kellermann, Linux Kernel Mailing List,
	Linux Next Mailing List, Lorenzo Stoakes, Vlastimil Babka,
	Mike Rapoport, Matthew Wilcox

On 04.09.25 04:59, Andrew Morton wrote:
> On Thu, 4 Sep 2025 12:14:38 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> 
>> After merging the mm-unstable tree, today's linux-next build (arm
>> multi_v7_defconfig) produced this warning:
>>
>> In file included from include/linux/highmem.h:14,
>>                   from include/linux/bvec.h:10,
>>                   from include/linux/blk_types.h:10,
>>                   from include/linux/writeback.h:13,
>>                   from include/linux/memcontrol.h:23,
>>                   from include/linux/swap.h:9,
>>                   from include/linux/suspend.h:5,
>>                   from arch/arm/mach-highbank/pm.c:9:
>> include/linux/highmem-internal.h: In function 'kmap_local_folio':
>> include/linux/highmem-internal.h:86:46: warning: passing argument 1 of 'folio_page' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
>>     86 |         const struct page *page = folio_page(folio, offset / PAGE_SIZE);
>>        |                                              ^~~~~
>> In file included from include/linux/mmzone.h:23,
>>                   from include/linux/swap.h:7:
>> include/linux/page-flags.h:319:53: note: expected 'struct folio *' but argument is of type 'const struct folio *'
>>    319 | static inline struct page *folio_page(struct folio *folio, unsigned long n)
> 

Hm, why did we not detect that in mm-new?
> 
> Yeah, thanks, folio_page() is a problem.  I'll do the below nasty for
> now, but nasty.
> 
> --- a/include/linux/page-flags.h~mm-constify-highmem-related-functions-for-improved-const-correctness-fix
> +++ a/include/linux/page-flags.h
> @@ -316,9 +316,9 @@ static __always_inline unsigned long _co
>    * check that the page number lies within @folio; the caller is presumed
>    * to have a reference to the page.
>    */
> -static inline struct page *folio_page(struct folio *folio, unsigned long n)
> +static inline struct page *folio_page(const struct folio *folio, unsigned long n)
>   {
> -	return &folio->page + n;
> +	return (struct page *)(&folio->page + n);
>   }
>   
>   static __always_inline int PageTail(const struct page *page)
> _

I think the problem  appears when nth_page() removal is paired with const-correctness.


Not a fan of going back to a plain macro either. Likely we can handle it similar to page_folio() and
perform the cast cleanly:


diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h
index faf17ca211b4f..dc67fe08e77c8 100644
--- a/include/linux/page-flags.h
+++ b/include/linux/page-flags.h
@@ -307,6 +307,12 @@ static __always_inline unsigned long _compound_head(const struct page *page)
         const struct page *:    (const struct folio *)_compound_head(p), \
         struct page *:          (struct folio *)_compound_head(p)))
  
+static inline const struct page *_folio_page(const struct folio *folio,
+               unsigned long n)
+{
+       return &folio->page + n;
+}
+
  /**
   * folio_page - Return a page from a folio.
   * @folio: The folio.
@@ -316,10 +322,9 @@ static __always_inline unsigned long _compound_head(const struct page *page)
   * check that the page number lies within @folio; the caller is presumed
   * to have a reference to the page.
   */
-static inline struct page *folio_page(struct folio *folio, unsigned long n)
-{
-       return &folio->page + n;
-}
+#define folio_page(f, p)       (_Generic((f),                          \
+       const struct folio *:   (const struct page *)_folio_page(f, p), \
+       struct folio *:         (struct page *)_folio_page(f, p)))
  
  static __always_inline int PageTail(const struct page *page)
  {


-- 
Cheers

David / dhildenb


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

* linux-next: build warning after merge of the mm-unstable tree
@ 2025-09-12  4:12 Stephen Rothwell
  2025-09-12  4:58 ` Balbir Singh
  0 siblings, 1 reply; 24+ messages in thread
From: Stephen Rothwell @ 2025-09-12  4:12 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Balbir Singh, Linux Kernel Mailing List, Linux Next Mailing List

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

Hi all,

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

WARNING: mm/migrate_device.c:792 function parameter 'page' not described in 'migrate_vma_insert_huge_pmd_page'

Introduced by commit

  9a5e80c43c9e ("mm/migrate_device: implement THP migration of zone device pages")

-- 
Cheers,
Stephen Rothwell

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

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

* Re: linux-next: build warning after merge of the mm-unstable tree
  2025-09-12  4:12 Stephen Rothwell
@ 2025-09-12  4:58 ` Balbir Singh
  0 siblings, 0 replies; 24+ messages in thread
From: Balbir Singh @ 2025-09-12  4:58 UTC (permalink / raw)
  To: Stephen Rothwell, Andrew Morton
  Cc: Linux Kernel Mailing List, Linux Next Mailing List

On 9/12/25 14:12, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the mm-unstable tree, today's linux-next build (htmldocs)
> produced this warning:
> 
> WARNING: mm/migrate_device.c:792 function parameter 'page' not described in 'migrate_vma_insert_huge_pmd_page'
> 
> Introduced by commit
> 
>   9a5e80c43c9e ("mm/migrate_device: implement THP migration of zone device pages")
> 

Thanks, the parameter is incorrectly described as folio, will fix

Balbir

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

* linux-next: build warning after merge of the mm-unstable tree
@ 2025-10-20  2:45 Stephen Rothwell
  2025-10-20  3:41 ` Baoquan He
  0 siblings, 1 reply; 24+ messages in thread
From: Stephen Rothwell @ 2025-10-20  2:45 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Baoquan He, Linux Kernel Mailing List, Linux Next Mailing List

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

Hi all,

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

Documentation/admin-guide/mm/index.rst:24: WARNING: toctree contains reference to nonexisting document 'admin-guide/mm/swap_numa' [toc.not_readable]

Introduced by commit

  9e1d0b5b7f28 ("mm/swap: do not choose swap device according to numa node")

-- 
Cheers,
Stephen Rothwell

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

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

* linux-next: build warning after merge of the mm-unstable tree
@ 2025-10-20  2:49 Stephen Rothwell
  0 siblings, 0 replies; 24+ messages in thread
From: Stephen Rothwell @ 2025-10-20  2:49 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Linux Kernel Mailing List, Linux Next Mailing List

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

Hi all,

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

Documentation/core-api/mm-api:52: /home/sfr/kernels/next/next/mm/vmalloc.c:4036: WARNING: Inline strong start-string without end-string. [docutils]

Introduced by commit

  32904ba6f5ef ("vmalloc: update __vmalloc_node_noprof() documentation")

-- 
Cheers,
Stephen Rothwell

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

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

* Re: linux-next: build warning after merge of the mm-unstable tree
  2025-10-20  2:45 Stephen Rothwell
@ 2025-10-20  3:41 ` Baoquan He
  2025-10-20  4:19   ` Bagas Sanjaya
  0 siblings, 1 reply; 24+ messages in thread
From: Baoquan He @ 2025-10-20  3:41 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Andrew Morton, Linux Kernel Mailing List, Linux Next Mailing List

On 10/20/25 at 01:45pm, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the mm-unstable tree, today's linux-next build (htmldocs)
> produced this warning:
> 
> Documentation/admin-guide/mm/index.rst:24: WARNING: toctree contains reference to nonexisting document 'admin-guide/mm/swap_numa' [toc.not_readable]
> 
> Introduced by commit
> 
>   9e1d0b5b7f28 ("mm/swap: do not choose swap device according to numa node")

Thanks, Stephen.

Below fix can be appended to commit 9e1d0b5b7f28 to fix the building
warning. Not sure if I need respin v5 to include this.

From 0c6f376f320dcc4d902377d540adc519394cdb12 Mon Sep 17 00:00:00 2001
From: Baoquan He <bhe@redhat.com>
Date: Mon, 20 Oct 2025 11:37:09 +0800
Subject: [PATCH] doc: clean up the relics of swap_numa
Content-type: text/plain

The doc swap_numa.rst has been removed in mm-new commit 9e1d0b5b7f28
("mm/swap: do not choose swap device according to numa node"). Clean up
the rest in mm/index.rst.

Signed-off-by: Baoquan He <bhe@redhat.com>
---
 Documentation/admin-guide/mm/index.rst | 1 -
 1 file changed, 1 deletion(-)

diff --git a/Documentation/admin-guide/mm/index.rst b/Documentation/admin-guide/mm/index.rst
index ebc83ca20fdc..bbb563cba5d2 100644
--- a/Documentation/admin-guide/mm/index.rst
+++ b/Documentation/admin-guide/mm/index.rst
@@ -39,7 +39,6 @@ the Linux memory management.
    shrinker_debugfs
    slab
    soft-dirty
-   swap_numa
    transhuge
    userfaultfd
    zswap
-- 
2.41.0


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

* Re: linux-next: build warning after merge of the mm-unstable tree
  2025-10-20  3:41 ` Baoquan He
@ 2025-10-20  4:19   ` Bagas Sanjaya
  0 siblings, 0 replies; 24+ messages in thread
From: Bagas Sanjaya @ 2025-10-20  4:19 UTC (permalink / raw)
  To: Baoquan He, Stephen Rothwell
  Cc: Andrew Morton, Linux Kernel Mailing List, Linux Next Mailing List

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

On Mon, Oct 20, 2025 at 11:41:50AM +0800, Baoquan He wrote:
> diff --git a/Documentation/admin-guide/mm/index.rst b/Documentation/admin-guide/mm/index.rst
> index ebc83ca20fdc..bbb563cba5d2 100644
> --- a/Documentation/admin-guide/mm/index.rst
> +++ b/Documentation/admin-guide/mm/index.rst
> @@ -39,7 +39,6 @@ the Linux memory management.
>     shrinker_debugfs
>     slab
>     soft-dirty
> -   swap_numa
>     transhuge
>     userfaultfd
>     zswap

LGTM, thanks!

-- 
An old man doll... just what I always wanted! - Clara

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

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

* linux-next: build warning after merge of the mm-unstable tree
@ 2025-11-07  3:39 Stephen Rothwell
  2025-11-07  6:51 ` Randy Dunlap
  0 siblings, 1 reply; 24+ messages in thread
From: Stephen Rothwell @ 2025-11-07  3:39 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Lorenzo Stoakes, Linux Kernel Mailing List,
	Linux Next Mailing List

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

Hi all,

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

WARNING: include/linux/mm_types.h:302 cannot understand function prototype: 'typedef swp_entry_t leaf_entry_t;'

Introduced by commit

  1b8c333c0d1c ("mm-introduce-leaf-entry-type-and-use-to-simplify-leaf-entry-logic-fix")

-- 
Cheers,
Stephen Rothwell

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

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

* Re: linux-next: build warning after merge of the mm-unstable tree
  2025-11-07  3:39 linux-next: build warning after merge of the mm-unstable tree Stephen Rothwell
@ 2025-11-07  6:51 ` Randy Dunlap
  0 siblings, 0 replies; 24+ messages in thread
From: Randy Dunlap @ 2025-11-07  6:51 UTC (permalink / raw)
  To: Stephen Rothwell, Andrew Morton
  Cc: Lorenzo Stoakes, Linux Kernel Mailing List,
	Linux Next Mailing List



On 11/6/25 7:39 PM, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the mm-unstable tree, today's linux-next build (htmldocs)
> produced this warning:
> 
> WARNING: include/linux/mm_types.h:302 cannot understand function prototype: 'typedef swp_entry_t leaf_entry_t;'
> 
> Introduced by commit
> 
>   1b8c333c0d1c ("mm-introduce-leaf-entry-type-and-use-to-simplify-leaf-entry-logic-fix")
> 

Change the kernel-doc comment beginning to:

/**
 * typedef leaf_entry_t - Describes a page table 'leaf entry'.

-- 
~Randy


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

end of thread, other threads:[~2025-11-07  6:51 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-07  3:39 linux-next: build warning after merge of the mm-unstable tree Stephen Rothwell
2025-11-07  6:51 ` Randy Dunlap
  -- strict thread matches above, loose matches on Subject: below --
2025-10-20  2:49 Stephen Rothwell
2025-10-20  2:45 Stephen Rothwell
2025-10-20  3:41 ` Baoquan He
2025-10-20  4:19   ` Bagas Sanjaya
2025-09-12  4:12 Stephen Rothwell
2025-09-12  4:58 ` Balbir Singh
2025-09-04  2:14 Stephen Rothwell
2025-09-04  2:59 ` Andrew Morton
2025-09-04  6:33   ` David Hildenbrand
2025-07-15  8:55 Stephen Rothwell
2025-07-15 18:54 ` SeongJae Park
2025-07-10  7:54 Stephen Rothwell
2025-07-10 22:30 ` Andrew Morton
2025-07-10 22:49   ` Stephen Rothwell
2025-07-11  0:36   ` Randy Dunlap
2025-07-11  6:28   ` David Hildenbrand
2025-07-10  7:50 Stephen Rothwell
2025-07-11  9:57 ` David Hildenbrand
2025-06-10  4:33 Stephen Rothwell
2025-06-10  4:35 ` Christoph Hellwig
2025-05-09  9:43 Stephen Rothwell
2025-05-09 20:31 ` Andrew Morton

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