* + mm-change-vma_alloc_folio_noprof-macro-to-inline-function.patch added to mm-hotfixes-unstable branch
@ 2026-02-16 21:47 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2026-02-16 21:47 UTC (permalink / raw)
To: mm-commits, ziy, wangkefeng.wang, vbabka, surenb, shakeel.butt,
rppt, mhocko, lorenzo.stoakes, liam.howlett, joshua.hahnjy,
jackmanb, hannes, david, ast, arnd, akpm
The patch titled
Subject: mm: change vma_alloc_folio_noprof() macro to inline function
has been added to the -mm mm-hotfixes-unstable branch. Its filename is
mm-change-vma_alloc_folio_noprof-macro-to-inline-function.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-change-vma_alloc_folio_noprof-macro-to-inline-function.patch
This patch will later appear in the mm-hotfixes-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 various
branches at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there most days
------------------------------------------------------
From: Arnd Bergmann <arnd@arndb.de>
Subject: mm: change vma_alloc_folio_noprof() macro to inline function
Date: Mon, 16 Feb 2026 13:17:44 +0100
In a few rare configurations with extra warnings eanbled, the new
drm_pagemap_migrate_populate_ram_pfn() calls vma_alloc_folio_noprof() but
that does not use all the arguments, leading to a harmless warning:
drivers/gpu/drm/drm_pagemap.c: In function 'drm_pagemap_migrate_populate_ram_pfn':
drivers/gpu/drm/drm_pagemap.c:701:63: error: parameter 'addr' set but not used [-Werror=unused-but-set-parameter=]
701 | unsigned long addr)
| ~~~~~~~~~~~~~~^~~~
Replace the macro with an inline function so the compiler can see how the
argument would be used, but is still able to optimize out the assignments.
Link: https://lkml.kernel.org/r/20260216121751.2378374-1-arnd@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Acked-by: Zi Yan <ziy@nvidia.com>
Reviewed-by: Suren Baghdasaryan <surenb@google.com>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Brendan Jackman <jackmanb@google.com>
Cc: David Hildenbrand <david@kernel.org>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Joshua Hahn <joshua.hahnjy@gmail.com>
Cc: Kefeng Wang <wangkefeng.wang@huawei.com>
Cc: Liam Howlett <liam.howlett@oracle.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Shakeel Butt <shakeel.butt@linux.dev>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
include/linux/gfp.h | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
--- a/include/linux/gfp.h~mm-change-vma_alloc_folio_noprof-macro-to-inline-function
+++ a/include/linux/gfp.h
@@ -335,8 +335,11 @@ static inline struct folio *folio_alloc_
{
return folio_alloc_noprof(gfp, order);
}
-#define vma_alloc_folio_noprof(gfp, order, vma, addr) \
- folio_alloc_noprof(gfp, order)
+static inline struct folio *vma_alloc_folio_noprof(gfp_t gfp, int order,
+ struct vm_area_struct *vma, unsigned long addr)
+{
+ return folio_alloc_noprof(gfp, order);
+}
#endif
#define alloc_pages(...) alloc_hooks(alloc_pages_noprof(__VA_ARGS__))
_
Patches currently in -mm which might be from arnd@arndb.de are
mm-change-vma_alloc_folio_noprof-macro-to-inline-function.patch
mm-vmscan-avoid-false-positive-wuninitialized-warning.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-02-16 21:47 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-16 21:47 + mm-change-vma_alloc_folio_noprof-macro-to-inline-function.patch added to mm-hotfixes-unstable branch Andrew Morton
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.