All of lore.kernel.org
 help / color / mirror / Atom feed
* + mm-constify-highmem-related-functions-for-improved-const-correctness-fix.patch added to mm-unstable branch
@ 2025-09-04  2:59 Andrew Morton
  2025-09-04  6:37 ` David Hildenbrand
  0 siblings, 1 reply; 12+ messages in thread
From: Andrew Morton @ 2025-09-04  2:59 UTC (permalink / raw)
  To: mm-commits, vbabka, sfr, rppt, lorenzo.stoakes, jcmvbkbc, david,
	akpm, akpm


The patch titled
     Subject: mm-constify-highmem-related-functions-for-improved-const-correctness-fix
has been added to the -mm mm-unstable branch.  Its filename is
     mm-constify-highmem-related-functions-for-improved-const-correctness-fix.patch

This patch will shortly appear at
     https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-constify-highmem-related-functions-for-improved-const-correctness-fix.patch

This patch will later appear in the mm-unstable branch at
    git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next via the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days

------------------------------------------------------
From: Andrew Morton <akpm@linux-foundation.org>
Subject: mm-constify-highmem-related-functions-for-improved-const-correctness-fix
Date: Wed Sep  3 07:51:59 PM PDT 2025

nastily "fix" folio_page()

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Cc: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Mike Rapoport (Microsoft) <rppt@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 include/linux/page-flags.h |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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

Patches currently in -mm which might be from akpm@linux-foundation.org are

mm-replace-20-page_shift-with-common-macros-for-pages-mb-conversion-fix.patch
mm-replace-20-page_shift-with-common-macros-for-pages-mb-conversion-fix-fix.patch
mm-damon-core-skip-needless-update-of-damon_attrs-in-damon_commit_ctx-fix.patch
mm-convert-core-mm-to-mm_flags_-accessors-fix.patch
memcg-optimize-exit-to-user-space-fix.patch
memfd-move-mfd_all_flags-definition-to-memfdh.patch
mm-constify-highmem-related-functions-for-improved-const-correctness-fix.patch
mm-filemap-align-last_index-to-folio-size-fix-fix.patch


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

end of thread, other threads:[~2025-09-23  9:02 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-04  2:59 + mm-constify-highmem-related-functions-for-improved-const-correctness-fix.patch added to mm-unstable branch Andrew Morton
2025-09-04  6:37 ` David Hildenbrand
2025-09-04  7:57   ` Vlastimil Babka
2025-09-04  9:16     ` David Hildenbrand
2025-09-04  9:28       ` Vlastimil Babka
2025-09-04  9:40         ` David Hildenbrand
2025-09-04  9:48           ` Vlastimil Babka
2025-09-04 10:01             ` David Hildenbrand
2025-09-04 13:06           ` Matthew Wilcox
2025-09-04 13:15             ` David Hildenbrand
2025-09-21 20:05   ` Andrew Morton
2025-09-23  9:02     ` David Hildenbrand

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.