linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [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
@ 2025-05-09 13:21 kernel test robot
  2025-05-09 20:57 ` Andrew Morton
  0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2025-05-09 13:21 UTC (permalink / raw)
  To: Zi Yan; +Cc: llvm, oe-kbuild-all, Andrew Morton, Linux Memory Management List

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.


vim +/get_pageblock_isolate +18 mm/page_isolation.c

0f0848e5118a4c Joonsoo Kim 2016-01-14  17  
075a73e5db9ad9 Zi Yan      2025-05-08 @18  static inline bool get_pageblock_isolate(struct page *page)
075a73e5db9ad9 Zi Yan      2025-05-08  19  {
075a73e5db9ad9 Zi Yan      2025-05-08  20  	return get_pfnblock_flags_mask(page, page_to_pfn(page),
075a73e5db9ad9 Zi Yan      2025-05-08  21  			PB_migrate_isolate_bit);
075a73e5db9ad9 Zi Yan      2025-05-08  22  }
075a73e5db9ad9 Zi Yan      2025-05-08  23  static inline void clear_pageblock_isolate(struct page *page)
075a73e5db9ad9 Zi Yan      2025-05-08  24  {
075a73e5db9ad9 Zi Yan      2025-05-08  25  	set_pfnblock_flags_mask(page, 0, page_to_pfn(page),
075a73e5db9ad9 Zi Yan      2025-05-08  26  			PB_migrate_isolate_bit);
075a73e5db9ad9 Zi Yan      2025-05-08  27  }
075a73e5db9ad9 Zi Yan      2025-05-08  28  static inline void set_pageblock_isolate(struct page *page)
075a73e5db9ad9 Zi Yan      2025-05-08  29  {
075a73e5db9ad9 Zi Yan      2025-05-08  30  	set_pfnblock_flags_mask(page, PB_migrate_isolate_bit,
075a73e5db9ad9 Zi Yan      2025-05-08  31  			page_to_pfn(page),
075a73e5db9ad9 Zi Yan      2025-05-08  32  			PB_migrate_isolate_bit);
075a73e5db9ad9 Zi Yan      2025-05-08  33  }
075a73e5db9ad9 Zi Yan      2025-05-08  34  

:::::: The code at line 18 was first introduced by commit
:::::: 075a73e5db9ad940e38c8bca786b7d9ab0d36a37 mm-page_isolation-make-page-isolation-a-standalone-bit-fix

:::::: TO: Zi Yan <ziy@nvidia.com>
:::::: CC: Andrew Morton <akpm@linux-foundation.org>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki


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

* 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
  2025-05-09 13:21 [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 kernel test robot
@ 2025-05-09 20:57 ` Andrew Morton
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Morton @ 2025-05-09 20:57 UTC (permalink / raw)
  To: kernel test robot
  Cc: Zi Yan, llvm, oe-kbuild-all, Linux Memory Management List

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
_



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

end of thread, other threads:[~2025-05-09 20:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-05-09 13:21 [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 kernel test robot
2025-05-09 20:57 ` Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox