All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Qi Zheng <zhengqi.arch@bytedance.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: Re: [PATCH 3/3] s390: supplement for ptdesc conversion
Date: Wed, 6 Mar 2024 12:53:00 +0800	[thread overview]
Message-ID: <202403061249.4URm4Yxi-lkp@intel.com> (raw)
In-Reply-To: <04beaf3255056ffe131a5ea595736066c1e84756.1709541697.git.zhengqi.arch@bytedance.com>

Hi Qi,

kernel test robot noticed the following build errors:

[auto build test ERROR on s390/features]
[also build test ERROR on kvms390/next linus/master v6.8-rc7]
[cannot apply to akpm-mm/mm-everything next-20240305]
[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/Qi-Zheng/mm-pgtable-correct-the-wrong-comment-about-ptdesc-__page_flags/20240304-191006
base:   https://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git features
patch link:    https://lore.kernel.org/r/04beaf3255056ffe131a5ea595736066c1e84756.1709541697.git.zhengqi.arch%40bytedance.com
patch subject: [PATCH 3/3] s390: supplement for ptdesc conversion
config: s390-defconfig (https://download.01.org/0day-ci/archive/20240306/202403061249.4URm4Yxi-lkp@intel.com/config)
compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project 325f51237252e6dab8e4e1ea1fa7acbb4faee1cd)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240306/202403061249.4URm4Yxi-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/202403061249.4URm4Yxi-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from arch/s390/mm/gmap.c:12:
   In file included from include/linux/pagewalk.h:5:
   In file included from include/linux/mm.h:2188:
   include/linux/vmstat.h:508:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     508 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     509 |                            item];
         |                            ~~~~
   include/linux/vmstat.h:515:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     515 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     516 |                            NR_VM_NUMA_EVENT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~~
   include/linux/vmstat.h:522:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
     522 |         return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
         |                               ~~~~~~~~~~~ ^ ~~~
   include/linux/vmstat.h:527:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     527 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     528 |                            NR_VM_NUMA_EVENT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~~
   include/linux/vmstat.h:536:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     536 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     537 |                            NR_VM_NUMA_EVENT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~~
>> arch/s390/mm/gmap.c:212:3: error: incompatible pointer types assigning to 'struct page *' from 'typeof (*(ptdesc)) *' (aka 'struct ptdesc *') [-Werror,-Wincompatible-pointer-types]
     212 |                 list_for_each_entry_safe(ptdesc, next, &gmap->pt_list, pt_list)
         |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/list.h:866:5: note: expanded from macro 'list_for_each_entry_safe'
     866 |                 n = list_next_entry(pos, member);                       \
         |                   ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> arch/s390/mm/gmap.c:212:3: error: incompatible pointer types assigning to 'struct ptdesc *' from 'struct page *' [-Werror,-Wincompatible-pointer-types]
     212 |                 list_for_each_entry_safe(ptdesc, next, &gmap->pt_list, pt_list)
         |                 ^                                ~~~~
   include/linux/list.h:868:11: note: expanded from macro 'list_for_each_entry_safe'
     868 |              pos = n, n = list_next_entry(n, member))
         |                  ^ ~
>> arch/s390/mm/gmap.c:212:58: error: no member named 'pt_list' in 'struct page'; did you mean 'pcp_list'?
     212 |                 list_for_each_entry_safe(ptdesc, next, &gmap->pt_list, pt_list)
         |                                                                        ^~~~~~~
         |                                                                        pcp_list
   include/linux/list.h:868:39: note: expanded from macro 'list_for_each_entry_safe'
     868 |              pos = n, n = list_next_entry(n, member))
         |                                              ^
   include/linux/list.h:645:20: note: expanded from macro 'list_next_entry'
     645 |         list_entry((pos)->member.next, typeof(*(pos)), member)
         |                           ^
   include/linux/list.h:601:15: note: expanded from macro 'list_entry'
     601 |         container_of(ptr, type, member)
         |                      ^
   include/linux/container_of.h:19:26: note: expanded from macro 'container_of'
      19 |         void *__mptr = (void *)(ptr);                                   \
         |                                 ^
   include/linux/mm_types.h:103:22: note: 'pcp_list' declared here
     103 |                                 struct list_head pcp_list;
         |                                                  ^
>> arch/s390/mm/gmap.c:212:58: error: no member named 'pt_list' in 'struct page'; did you mean 'pcp_list'?
     212 |                 list_for_each_entry_safe(ptdesc, next, &gmap->pt_list, pt_list)
         |                                                                        ^~~~~~~
         |                                                                        pcp_list
   include/linux/list.h:868:39: note: expanded from macro 'list_for_each_entry_safe'
     868 |              pos = n, n = list_next_entry(n, member))
         |                                              ^
   include/linux/list.h:645:20: note: expanded from macro 'list_next_entry'
     645 |         list_entry((pos)->member.next, typeof(*(pos)), member)
         |                           ^
   include/linux/list.h:601:15: note: expanded from macro 'list_entry'
     601 |         container_of(ptr, type, member)
         |                      ^
   note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
   include/linux/compiler_types.h:376:63: note: expanded from macro '__same_type'
     376 | #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
         |                                                               ^
   include/linux/build_bug.h:77:50: note: expanded from macro 'static_assert'
      77 | #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
         |                                                  ^
   include/linux/build_bug.h:78:56: note: expanded from macro '__static_assert'
      78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
         |                                                        ^
   include/linux/mm_types.h:103:22: note: 'pcp_list' declared here
     103 |                                 struct list_head pcp_list;
         |                                                  ^
>> arch/s390/mm/gmap.c:212:58: error: no member named 'pt_list' in 'struct page'; did you mean 'pcp_list'?
     212 |                 list_for_each_entry_safe(ptdesc, next, &gmap->pt_list, pt_list)
         |                                                                        ^~~~~~~
         |                                                                        pcp_list
   include/linux/list.h:868:39: note: expanded from macro 'list_for_each_entry_safe'
     868 |              pos = n, n = list_next_entry(n, member))
         |                                              ^
   include/linux/list.h:645:49: note: expanded from macro 'list_next_entry'
     645 |         list_entry((pos)->member.next, typeof(*(pos)), member)
         |                                                        ^
   include/linux/list.h:601:26: note: expanded from macro 'list_entry'
     601 |         container_of(ptr, type, member)
         |                                 ^
   note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
   include/linux/compiler_types.h:376:74: note: expanded from macro '__same_type'
     376 | #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
         |                                                                          ^
   include/linux/build_bug.h:77:50: note: expanded from macro 'static_assert'
      77 | #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
         |                                                  ^
   include/linux/build_bug.h:78:56: note: expanded from macro '__static_assert'
      78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
         |                                                        ^
   include/linux/mm_types.h:103:22: note: 'pcp_list' declared here
     103 |                                 struct list_head pcp_list;
         |                                                  ^
>> arch/s390/mm/gmap.c:212:58: error: no member named 'pt_list' in 'struct page'; did you mean 'pcp_list'?
     212 |                 list_for_each_entry_safe(ptdesc, next, &gmap->pt_list, pt_list)
         |                                                                        ^~~~~~~
         |                                                                        pcp_list
   include/linux/list.h:868:39: note: expanded from macro 'list_for_each_entry_safe'
     868 |              pos = n, n = list_next_entry(n, member))
         |                                              ^
   include/linux/list.h:645:20: note: expanded from macro 'list_next_entry'
     645 |         list_entry((pos)->member.next, typeof(*(pos)), member)
         |                           ^
   include/linux/list.h:601:15: note: expanded from macro 'list_entry'
     601 |         container_of(ptr, type, member)
         |                      ^
   note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
   include/linux/compiler_types.h:376:63: note: expanded from macro '__same_type'
     376 | #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
         |                                                               ^
   include/linux/build_bug.h:77:50: note: expanded from macro 'static_assert'
      77 | #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
         |                                                  ^
   include/linux/build_bug.h:78:56: note: expanded from macro '__static_assert'
      78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
         |                                                        ^
   include/linux/mm_types.h:103:22: note: 'pcp_list' declared here
     103 |                                 struct list_head pcp_list;
         |                                                  ^
>> arch/s390/mm/gmap.c:212:3: error: no member named 'pt_list' in 'page'
     212 |                 list_for_each_entry_safe(ptdesc, next, &gmap->pt_list, pt_list)
         |                 ^                                                      ~~~~~~~
   include/linux/list.h:868:20: note: expanded from macro 'list_for_each_entry_safe'
     868 |              pos = n, n = list_next_entry(n, member))
         |                           ^                  ~~~~~~
   include/linux/list.h:645:2: note: expanded from macro 'list_next_entry'
     645 |         list_entry((pos)->member.next, typeof(*(pos)), member)
         |         ^                                              ~~~~~~
   include/linux/list.h:601:2: note: expanded from macro 'list_entry'
     601 |         container_of(ptr, type, member)
         |         ^                       ~~~~~~
   include/linux/container_of.h:23:21: note: expanded from macro 'container_of'
      23 |         ((type *)(__mptr - offsetof(type, member))); })
         |                            ^              ~~~~~~
   include/linux/stddef.h:16:32: note: expanded from macro 'offsetof'
      16 | #define offsetof(TYPE, MEMBER)  __builtin_offsetof(TYPE, MEMBER)
         |                                 ^                        ~~~~~~
>> arch/s390/mm/gmap.c:212:3: error: assigning to 'struct page *' from incompatible type 'void'
     212 |                 list_for_each_entry_safe(ptdesc, next, &gmap->pt_list, pt_list)
         |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/list.h:868:18: note: expanded from macro 'list_for_each_entry_safe'
     868 |              pos = n, n = list_next_entry(n, member))
         |                         ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~
   5 warnings and 8 errors generated.


vim +212 arch/s390/mm/gmap.c

   187	
   188	/**
   189	 * gmap_free - free a guest address space
   190	 * @gmap: pointer to the guest address space structure
   191	 *
   192	 * No locks required. There are no references to this gmap anymore.
   193	 */
   194	static void gmap_free(struct gmap *gmap)
   195	{
   196		struct page *page, *next;
   197	
   198		/* Flush tlb of all gmaps (if not already done for shadows) */
   199		if (!(gmap_is_shadow(gmap) && gmap->removed))
   200			gmap_flush_tlb(gmap);
   201		/* Free all segment & region tables. */
   202		list_for_each_entry_safe(page, next, &gmap->crst_list, lru)
   203			__free_pages(page, CRST_ALLOC_ORDER);
   204		gmap_radix_tree_free(&gmap->guest_to_host);
   205		gmap_radix_tree_free(&gmap->host_to_guest);
   206	
   207		/* Free additional data for a shadow gmap */
   208		if (gmap_is_shadow(gmap)) {
   209			struct ptdesc *ptdesc;
   210	
   211			/* Free all page tables. */
 > 212			list_for_each_entry_safe(ptdesc, next, &gmap->pt_list, pt_list)
   213				page_table_free_pgste(ptdesc);
   214			gmap_rmap_radix_tree_free(&gmap->host_to_rmap);
   215			/* Release reference to the parent */
   216			gmap_put(gmap->parent);
   217		}
   218	
   219		kfree(gmap);
   220	}
   221	

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

  parent reply	other threads:[~2024-03-06  4:53 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-04 11:07 [PATCH 0/3] minor fixes and supplement for ptdesc Qi Zheng
2024-03-04 11:07 ` [PATCH 1/3] mm: pgtable: correct the wrong comment about ptdesc->__page_flags Qi Zheng
2024-03-26 19:12   ` Vishal Moola
2024-03-27  2:00     ` Qi Zheng
2024-03-04 11:07 ` [PATCH 2/3] mm: pgtable: add missing pt_index to struct ptdesc Qi Zheng
2024-03-26 19:25   ` Vishal Moola
2024-03-27  2:06     ` Qi Zheng
2024-03-04 11:07 ` [PATCH 3/3] s390: supplement for ptdesc conversion Qi Zheng
2024-03-05  7:21   ` [PATCH v2 " Qi Zheng
2024-03-26  7:46     ` Heiko Carstens
2024-03-05 22:32   ` [PATCH " kernel test robot
2024-03-06  2:46     ` Qi Zheng
2024-03-06  4:53   ` kernel test robot [this message]
2024-03-26 19:48   ` Vishal Moola
2024-03-27  2:11     ` Qi Zheng
2024-03-26 19:07 ` [PATCH 0/3] minor fixes and supplement for ptdesc Vishal Moola
2024-03-27  8:52   ` David Hildenbrand

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=202403061249.4URm4Yxi-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=zhengqi.arch@bytedance.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.