From: Andrew Morton <akpm@linux-foundation.org>
To: mm-commits@vger.kernel.org, trix@redhat.com,
dan.j.williams@intel.com, nathan@kernel.org,
akpm@linux-foundation.org
Subject: [folded-merged] fsdax-introduce-pgmap_request_folios-fix.patch removed from -mm tree
Date: Thu, 01 Dec 2022 15:13:17 -0800 [thread overview]
Message-ID: <20221201231317.D9A2FC433C1@smtp.kernel.org> (raw)
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
reply other threads:[~2022-12-01 23:13 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221201231317.D9A2FC433C1@smtp.kernel.org \
--to=akpm@linux-foundation.org \
--cc=dan.j.williams@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mm-commits@vger.kernel.org \
--cc=nathan@kernel.org \
--cc=trix@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.