Subject: linux-next: build warning after merge of the mm-unstable tree

From: Stephen Rothwell <[email-masked]>
Date: Thu, 4 Sep 2025 12:14:38 +1000

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