From: Andrew Morton <akpm@linux-foundation.org>
To: kernel test robot <lkp@intel.com>
Cc: Zi Yan <ziy@nvidia.com>,
llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
Linux Memory Management List <linux-mm@kvack.org>
Subject: Re: [akpm-mm:mm-new 337/348] mm/page_isolation.c:18:20: warning: function 'get_pageblock_isolate' is not needed and will not be emitted
Date: Fri, 9 May 2025 13:57:11 -0700 [thread overview]
Message-ID: <20250509135711.28707139f71901046f998243@linux-foundation.org> (raw)
In-Reply-To: <202505092126.yRGhLhg1-lkp@intel.com>
On Fri, 9 May 2025 21:21:03 +0800 kernel test robot <lkp@intel.com> wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-new
> head: 9fe9c5a30f2f2d799c0e2df192df6622969b23b7
> commit: ca2f45163b701e1632c452022b2aadeb52841ec6 [337/348] mm/page_isolation: remove migratetype parameter from more functions
> config: i386-buildonly-randconfig-004-20250509 (https://download.01.org/0day-ci/archive/20250509/202505092126.yRGhLhg1-lkp@intel.com/config)
> compiler: clang version 20.1.2 (https://github.com/llvm/llvm-project 58df0ef89dd64126512e4ee27b4ac3fd8ddf6247)
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250509/202505092126.yRGhLhg1-lkp@intel.com/reproduce)
>
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202505092126.yRGhLhg1-lkp@intel.com/
>
> All warnings (new ones prefixed by >>):
>
> >> mm/page_isolation.c:18:20: warning: function 'get_pageblock_isolate' is not needed and will not be emitted [-Wunneeded-internal-declaration]
> 18 | static inline bool get_pageblock_isolate(struct page *page)
> | ^~~~~~~~~~~~~~~~~~~~~
> mm/page_isolation.c:28:20: warning: unused function 'set_pageblock_isolate' [-Wunused-function]
> 28 | static inline void set_pageblock_isolate(struct page *page)
> | ^~~~~~~~~~~~~~~~~~~~~
> 2 warnings generated.
Thanks. I'll try something like the below fixup, but this is all
looking a bit messy - the benefit of those helpers is questionable!
--- a/mm/page_isolation.c~mm-page_isolation-remove-migratetype-parameter-from-more-functions-fix-2
+++ a/mm/page_isolation.c
@@ -15,22 +15,19 @@
#define CREATE_TRACE_POINTS
#include <trace/events/page_isolation.h>
+#ifdef CONFIG_DEBUG_VM
static inline bool get_pageblock_isolate(struct page *page)
{
return get_pfnblock_flags_mask(page, page_to_pfn(page),
PB_migrate_isolate_bit);
}
+#endif
+
static inline void clear_pageblock_isolate(struct page *page)
{
set_pfnblock_flags_mask(page, 0, page_to_pfn(page),
PB_migrate_isolate_bit);
}
-static inline void set_pageblock_isolate(struct page *page)
-{
- set_pfnblock_flags_mask(page, PB_migrate_isolate_bit,
- page_to_pfn(page),
- PB_migrate_isolate_bit);
-}
/*
* This function checks whether the range [start_pfn, end_pfn) includes
_
prev parent reply other threads:[~2025-05-09 20:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-09 13:21 kernel test robot
2025-05-09 20:57 ` Andrew Morton [this message]
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=20250509135711.28707139f71901046f998243@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=linux-mm@kvack.org \
--cc=lkp@intel.com \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=ziy@nvidia.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox