linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Baoquan He <bhe@redhat.com>
To: kernel test robot <lkp@intel.com>
Cc: linux-mm@kvack.org, oe-kbuild-all@lists.linux.dev,
	akpm@linux-foundation.org, chrisl@kernel.org, kasong@tencent.com,
	youngjun.park@lge.com, aaron.lu@intel.com, baohua@kernel.org,
	shikemeng@huaweicloud.com, nphamcs@gmail.com
Subject: Re: [PATCH v2 1/1] mm/swapfile.c: select the swap device with default priority round robin
Date: Sun, 28 Sep 2025 10:22:28 +0800	[thread overview]
Message-ID: <aNib5FROJYwjcsa1@fedora> (raw)
In-Reply-To: <202509280002.NWLixh90-lkp@intel.com>

On 09/28/25 at 01:14am, kernel test robot wrote:
> Hi Baoquan,
> 
> kernel test robot noticed the following build warnings:
> 
> [auto build test WARNING on linus/master]
> [also build test WARNING on v6.17-rc7 next-20250926]
> [cannot apply to akpm-mm/mm-everything]
> [If your patch is applied to the wrong git tree, kindly drop us a note.
> And when submitting patch, we suggest to use '--base' as documented in
> https://git-scm.com/docs/git-format-patch#_base_tree_information]
> 
> url:    https://github.com/intel-lab-lkp/linux/commits/Baoquan-He/mm-swapfile-c-select-the-swap-device-with-default-priority-round-robin/20250926-235740
> base:   linus/master
> patch link:    https://lore.kernel.org/r/20250926155504.5122-2-bhe%40redhat.com
> patch subject: [PATCH v2 1/1] mm/swapfile.c: select the swap device with default priority round robin
> config: sparc-randconfig-001-20250927 (https://download.01.org/0day-ci/archive/20250928/202509280002.NWLixh90-lkp@intel.com/config)
> compiler: sparc64-linux-gcc (GCC) 11.5.0
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250928/202509280002.NWLixh90-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/202509280002.NWLixh90-lkp@intel.com/
> 
> All warnings (new ones prefixed by >>):
> 
>    mm/swapfile.c: In function '_enable_swap_info':
>    mm/swapfile.c:2550:31: error: 'swap_active_head' undeclared (first use in this function); did you mean 'swap_avail_head'?
>     2550 |         plist_add(&si->list, &swap_active_head);
>          |                               ^~~~~~~~~~~~~~~~
>          |                               swap_avail_head

Sorry, I mistakenly removed the definition of swap_avail_head. I planned
to remove swap_avail_head in later work, but mixed the draft code to
this patch. I will post v3 to split patch as Chris suggested, will fix
it this at the same time. Thanks for reporting this, please drop this v2
patch from testing.

>    mm/swapfile.c:2550:31: note: each undeclared identifier is reported only once for each function it appears in
>    In file included from include/linux/list.h:5,
>                     from include/linux/wait.h:7,
>                     from include/linux/wait_bit.h:8,
>                     from include/linux/fs.h:7,
>                     from include/linux/highmem.h:5,
>                     from include/linux/bvec.h:10,
>                     from include/linux/blk_types.h:10,
>                     from include/linux/blkdev.h:9,
>                     from mm/swapfile.c:9:
>    mm/swapfile.c: In function '__do_sys_swapoff':
>    mm/swapfile.c:2655:34: error: 'swap_active_head' undeclared (first use in this function); did you mean 'swap_avail_head'?
>     2655 |         plist_for_each_entry(p, &swap_active_head, list) {
>          |                                  ^~~~~~~~~~~~~~~~
>    include/linux/container_of.h:20:33: note: in definition of macro 'container_of'
>       20 |         void *__mptr = (void *)(ptr);                                   \
>          |                                 ^~~
>    include/linux/list.h:612:9: note: in expansion of macro 'list_entry'
>      612 |         list_entry((ptr)->next, type, member)
>          |         ^~~~~~~~~~
>    include/linux/list.h:770:20: note: in expansion of macro 'list_first_entry'
>      770 |         for (pos = list_first_entry(head, typeof(*pos), member);        \
>          |                    ^~~~~~~~~~~~~~~~
>    include/linux/plist.h:173:10: note: in expansion of macro 'list_for_each_entry'
>      173 |          list_for_each_entry(pos, &(head)->node_list, mem.node_list)
>          |          ^~~~~~~~~~~~~~~~~~~
>    mm/swapfile.c:2655:9: note: in expansion of macro 'plist_for_each_entry'
>     2655 |         plist_for_each_entry(p, &swap_active_head, list) {
>          |         ^~~~~~~~~~~~~~~~~~~~
>    In file included from include/linux/init.h:5,
>                     from include/linux/printk.h:6,
>                     from include/asm-generic/bug.h:22,
>                     from arch/sparc/include/asm/bug.h:25,
>                     from include/linux/bug.h:5,
>                     from include/linux/vfsdebug.h:5,
>                     from include/linux/fs.h:5,
>                     from include/linux/highmem.h:5,
>                     from include/linux/bvec.h:10,
>                     from include/linux/blk_types.h:10,
>                     from include/linux/blkdev.h:9,
>                     from mm/swapfile.c:9:
>    include/linux/compiler_types.h:507:27: error: expression in static assertion is not an integer
>      507 | #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
>          |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
>    include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert'
>       78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
>          |                                                        ^~~~
>    include/linux/container_of.h:21:9: note: in expansion of macro 'static_assert'
>       21 |         static_assert(__same_type(*(ptr), ((type *)0)->member) ||       \
>          |         ^~~~~~~~~~~~~
>    include/linux/container_of.h:21:23: note: in expansion of macro '__same_type'
>       21 |         static_assert(__same_type(*(ptr), ((type *)0)->member) ||       \
>          |                       ^~~~~~~~~~~
>    include/linux/list.h:601:9: note: in expansion of macro 'container_of'
>      601 |         container_of(ptr, type, member)
>          |         ^~~~~~~~~~~~
>    include/linux/list.h:612:9: note: in expansion of macro 'list_entry'
>      612 |         list_entry((ptr)->next, type, member)
>          |         ^~~~~~~~~~
>    include/linux/list.h:770:20: note: in expansion of macro 'list_first_entry'
>      770 |         for (pos = list_first_entry(head, typeof(*pos), member);        \
>          |                    ^~~~~~~~~~~~~~~~
>    include/linux/plist.h:173:10: note: in expansion of macro 'list_for_each_entry'
>      173 |          list_for_each_entry(pos, &(head)->node_list, mem.node_list)
>          |          ^~~~~~~~~~~~~~~~~~~
>    mm/swapfile.c:2655:9: note: in expansion of macro 'plist_for_each_entry'
>     2655 |         plist_for_each_entry(p, &swap_active_head, list) {
>          |         ^~~~~~~~~~~~~~~~~~~~
>    mm/swapfile.c: In function '__has_usable_swap':
>    mm/swapfile.c:3835:35: error: 'swap_active_head' undeclared (first use in this function); did you mean 'swap_avail_head'?
>     3835 |         return !plist_head_empty(&swap_active_head);
>          |                                   ^~~~~~~~~~~~~~~~
>          |                                   swap_avail_head
> >> mm/swapfile.c:3836:1: warning: control reaches end of non-void function [-Wreturn-type]
>     3836 | }
>          | ^
> 
> 
> vim +3836 mm/swapfile.c
> 
> a2468cc9bfdff6 Aaron Lu    2017-09-06  3831  
> 2cf855837b89d9 Tejun Heo   2018-07-03  3832  #if defined(CONFIG_MEMCG) && defined(CONFIG_BLK_CGROUP)
> 0ff67f990bd457 Kairui Song 2025-03-14  3833  static bool __has_usable_swap(void)
> 0ff67f990bd457 Kairui Song 2025-03-14  3834  {
> 0ff67f990bd457 Kairui Song 2025-03-14  3835  	return !plist_head_empty(&swap_active_head);
> 0ff67f990bd457 Kairui Song 2025-03-14 @3836  }
> 0ff67f990bd457 Kairui Song 2025-03-14  3837  
> 
> -- 
> 0-DAY CI Kernel Test Service
> https://github.com/intel/lkp-tests/wiki
> 



  reply	other threads:[~2025-09-28  2:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-26 15:55 [PATCH v2 0/1] " Baoquan He
2025-09-26 15:55 ` [PATCH v2 1/1] " Baoquan He
2025-09-27  7:56   ` kernel test robot
2025-09-27 17:14   ` kernel test robot
2025-09-28  2:22     ` Baoquan He [this message]
2025-09-26 16:02 ` [PATCH v2 0/1] " Baoquan He
2025-09-26 16:04   ` Baoquan He
2025-09-27  0:14 ` Baoquan He

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=aNib5FROJYwjcsa1@fedora \
    --to=bhe@redhat.com \
    --cc=aaron.lu@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=baohua@kernel.org \
    --cc=chrisl@kernel.org \
    --cc=kasong@tencent.com \
    --cc=linux-mm@kvack.org \
    --cc=lkp@intel.com \
    --cc=nphamcs@gmail.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=shikemeng@huaweicloud.com \
    --cc=youngjun.park@lge.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