* [folded-merged] fsdax-introduce-pgmap_request_folios-fix.patch removed from -mm tree
@ 2022-12-01 23:13 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2022-12-01 23:13 UTC (permalink / raw)
To: mm-commits, trix, dan.j.williams, nathan, akpm
The quilt patch titled
Subject: mm/memremap: mark folio_span_valid() as __maybe_unused
has been removed from the -mm tree. Its filename was
fsdax-introduce-pgmap_request_folios-fix.patch
This patch was dropped because it was folded into fsdax-introduce-pgmap_request_folios.patch
------------------------------------------------------
From: Nathan Chancellor <nathan@kernel.org>
Subject: mm/memremap: mark folio_span_valid() as __maybe_unused
Date: Tue, 18 Oct 2022 08:26:46 -0700
When building without CONFIG_DEBUG_VM, clang warns:
mm/memremap.c:495:13: error: function 'folio_span_valid' is not needed and will not be emitted [-Werror,-Wunneeded-internal-declaration]
static bool folio_span_valid(struct dev_pagemap *pgmap, struct folio *folio,
^
1 error generated.
folio_span_valid() is only used within a instance of VM_WARN_ON_ONCE(),
which evaluates to BUILD_BUG_ON_INVALID() with CONFIG_DEBUG_VM=n, which
ultimately resolves to sizeof(), which is fully resolved at compile
time. Basically, the warning is flagging that folio_span_valid() is
only used in a compile time context and will not be called at run time.
Since this is expected given the configuration, mark folio_span_valid()
as __maybe_unused so that there is no warning.
Link: https://lkml.kernel.org/r/20221018152645.3195108-1-nathan@kernel.org
Fixes: ("fsdax: introduce pgmap_request_folios()")
Link: https://github.com/ClangBuiltLinux/linux/issues/1739
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Tom Rix <trix@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/memremap.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
--- a/mm/memremap.c~fsdax-introduce-pgmap_request_folios-fix
+++ a/mm/memremap.c
@@ -531,8 +531,9 @@ void zone_device_page_init(struct page *
}
EXPORT_SYMBOL_GPL(zone_device_page_init);
-static bool folio_span_valid(struct dev_pagemap *pgmap, struct folio *folio,
- int nr_folios)
+static __maybe_unused bool folio_span_valid(struct dev_pagemap *pgmap,
+ struct folio *folio,
+ int nr_folios)
{
unsigned long pfn_start, pfn_end;
_
Patches currently in -mm which might be from nathan@kernel.org are
fsdax-introduce-pgmap_request_folios.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-12-01 23:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-01 23:13 [folded-merged] fsdax-introduce-pgmap_request_folios-fix.patch removed from -mm tree 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.