* [android-common:android15-6.6-2024-09 44/44] include/linux/mm_inline.h:46:41: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list')
@ 2025-07-01 21:15 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-07-01 21:15 UTC (permalink / raw)
Cc: oe-kbuild-all, llvm
TO: cros-kernel-buildreports@googlegroups.com
tree: https://android.googlesource.com/kernel/common android15-6.6-2024-09
head: f20ec5968458dc75eff21363f4ea28947c6e3800
commit: c40e60f00caf18bc382215c79651777eb40f5f9d [44/44] kbuild: Enable -Wenum-conversion by default
config: i386-buildonly-randconfig-001-20250702 (https://download.01.org/0day-ci/archive/20250702/202507020556.SLemvbia-lkp@intel.com/config)
compiler: clang version 20.1.7 (https://github.com/llvm/llvm-project 6146a88f60492b520a36f8f8f3231e15f3cc6082)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250702/202507020556.SLemvbia-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/202507020556.SLemvbia-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from mm/page-writeback.c:20:
In file included from include/linux/mm.h:2116:
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_"
| ~~~~~~~~~~~ ^ ~~~
In file included from mm/page-writeback.c:40:
>> include/linux/mm_inline.h:46:41: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
46 | __mod_lruvec_state(lruvec, NR_LRU_BASE + lru, nr_pages);
| ~~~~~~~~~~~ ^ ~~~
>> include/linux/mm_inline.h:48:22: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
48 | NR_ZONE_LRU_BASE + lru, nr_pages);
| ~~~~~~~~~~~~~~~~ ^ ~~~
3 warnings generated.
--
In file included from mm/page_alloc.c:19:
In file included from include/linux/mm.h:2116:
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_"
| ~~~~~~~~~~~ ^ ~~~
In file included from mm/page_alloc.c:43:
>> include/linux/mm_inline.h:46:41: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
46 | __mod_lruvec_state(lruvec, NR_LRU_BASE + lru, nr_pages);
| ~~~~~~~~~~~ ^ ~~~
>> include/linux/mm_inline.h:48:22: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
48 | NR_ZONE_LRU_BASE + lru, nr_pages);
| ~~~~~~~~~~~~~~~~ ^ ~~~
mm/page_alloc.c:2712:2: warning: arithmetic between different enumeration types ('enum vm_event_item' and 'enum zone_type') [-Wenum-enum-conversion]
2712 | __count_zid_vm_events(PGALLOC, page_zonenum(page), 1 << order);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/vmstat.h:135:34: note: expanded from macro '__count_zid_vm_events'
135 | __count_vm_events(item##_NORMAL - ZONE_NORMAL + zid, delta)
| ~~~~~~~~~~~~~ ^ ~~~~~~~~~~~
mm/page_alloc.c:2788:3: warning: arithmetic between different enumeration types ('enum vm_event_item' and 'enum zone_type') [-Wenum-enum-conversion]
2788 | __count_zid_vm_events(PGALLOC, page_zonenum(page), 1 << order);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/vmstat.h:135:34: note: expanded from macro '__count_zid_vm_events'
135 | __count_vm_events(item##_NORMAL - ZONE_NORMAL + zid, delta)
| ~~~~~~~~~~~~~ ^ ~~~~~~~~~~~
mm/page_alloc.c:4415:2: warning: arithmetic between different enumeration types ('enum vm_event_item' and 'enum zone_type') [-Wenum-enum-conversion]
4415 | __count_zid_vm_events(PGALLOC, zone_idx(zone), nr_account);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/vmstat.h:135:34: note: expanded from macro '__count_zid_vm_events'
135 | __count_vm_events(item##_NORMAL - ZONE_NORMAL + zid, delta)
| ~~~~~~~~~~~~~ ^ ~~~~~~~~~~~
6 warnings generated.
--
In file included from mm/compaction.c:12:
In file included from include/linux/swap.h:9:
In file included from include/linux/memcontrol.h:20:
In file included from include/linux/mm.h:2116:
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_"
| ~~~~~~~~~~~ ^ ~~~
In file included from mm/compaction.c:15:
>> include/linux/mm_inline.h:46:41: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
46 | __mod_lruvec_state(lruvec, NR_LRU_BASE + lru, nr_pages);
| ~~~~~~~~~~~ ^ ~~~
>> include/linux/mm_inline.h:48:22: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
48 | NR_ZONE_LRU_BASE + lru, nr_pages);
| ~~~~~~~~~~~~~~~~ ^ ~~~
mm/compaction.c:479:20: warning: unused function 'pageblock_skip_persistent' [-Wunused-function]
479 | static inline bool pageblock_skip_persistent(struct page *page)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
mm/compaction.c:484:20: warning: unused function 'update_pageblock_skip' [-Wunused-function]
484 | static inline void update_pageblock_skip(struct compact_control *cc,
| ^~~~~~~~~~~~~~~~~~~~~
5 warnings generated.
--
In file included from mm/vmscan.c:15:
In file included from include/linux/mm.h:2116:
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_"
| ~~~~~~~~~~~ ^ ~~~
In file included from mm/vmscan.c:30:
>> include/linux/mm_inline.h:46:41: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
46 | __mod_lruvec_state(lruvec, NR_LRU_BASE + lru, nr_pages);
| ~~~~~~~~~~~ ^ ~~~
>> include/linux/mm_inline.h:48:22: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
48 | NR_ZONE_LRU_BASE + lru, nr_pages);
| ~~~~~~~~~~~~~~~~ ^ ~~~
mm/vmscan.c:669:51: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
669 | size += zone_page_state(zone, NR_ZONE_LRU_BASE + lru);
| ~~~~~~~~~~~~~~~~ ^ ~~~
mm/vmscan.c:2386:4: warning: arithmetic between different enumeration types ('enum vm_event_item' and 'enum zone_type') [-Wenum-enum-conversion]
2386 | __count_zid_vm_events(PGSCAN_SKIP, zid, nr_skipped[zid]);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/vmstat.h:135:34: note: expanded from macro '__count_zid_vm_events'
135 | __count_vm_events(item##_NORMAL - ZONE_NORMAL + zid, delta)
| ~~~~~~~~~~~~~ ^ ~~~~~~~~~~~
mm/vmscan.c:2893:51: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
2893 | inactive = lruvec_page_state(lruvec, NR_LRU_BASE + inactive_lru);
| ~~~~~~~~~~~ ^ ~~~~~~~~~~~~
mm/vmscan.c:2894:49: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
2894 | active = lruvec_page_state(lruvec, NR_LRU_BASE + active_lru);
| ~~~~~~~~~~~ ^ ~~~~~~~~~~
mm/vmscan.c:6818:3: warning: arithmetic between different enumeration types ('enum vm_event_item' and 'enum zone_type') [-Wenum-enum-conversion]
6818 | __count_zid_vm_events(ALLOCSTALL, sc->reclaim_idx, 1);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/vmstat.h:135:34: note: expanded from macro '__count_zid_vm_events'
135 | __count_vm_events(item##_NORMAL - ZONE_NORMAL + zid, delta)
| ~~~~~~~~~~~~~ ^ ~~~~~~~~~~~
8 warnings generated.
vim +46 include/linux/mm_inline.h
b2e185384f53478 Rik van Riel 2008-10-18 36
aa1b67903a19e02 Yu Zhao 2022-09-18 37 static __always_inline void __update_lru_size(struct lruvec *lruvec,
599d0c954f91d06 Mel Gorman 2016-07-28 38 enum lru_list lru, enum zone_type zid,
889a3747b3b7661 Matthew Wilcox (Oracle 2021-02-25 39) long nr_pages)
9d5e6a9f22311b0 Hugh Dickins 2016-05-19 40 {
599d0c954f91d06 Mel Gorman 2016-07-28 41 struct pglist_data *pgdat = lruvec_pgdat(lruvec);
599d0c954f91d06 Mel Gorman 2016-07-28 42
ec1c86b25f4bdd9 Yu Zhao 2022-09-18 43 lockdep_assert_held(&lruvec->lru_lock);
ec1c86b25f4bdd9 Yu Zhao 2022-09-18 44 WARN_ON_ONCE(nr_pages != (int)nr_pages);
ec1c86b25f4bdd9 Yu Zhao 2022-09-18 45
e0ee0e71078abbc Johannes Weiner 2019-05-13 @46 __mod_lruvec_state(lruvec, NR_LRU_BASE + lru, nr_pages);
71c799f4982d340 Minchan Kim 2016-07-28 47 __mod_zone_page_state(&pgdat->node_zones[zid],
71c799f4982d340 Minchan Kim 2016-07-28 @48 NR_ZONE_LRU_BASE + lru, nr_pages);
aa1b67903a19e02 Yu Zhao 2022-09-18 49 }
aa1b67903a19e02 Yu Zhao 2022-09-18 50
:::::: The code at line 46 was first introduced by commit
:::::: e0ee0e71078abbcadd4cbc38fb8570551fccc103 mm: memcontrol: track LRU counts in the vmstats array
:::::: TO: Johannes Weiner <hannes@cmpxchg.org>
:::::: CC: Linus Torvalds <torvalds@linux-foundation.org>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-07-01 21:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-01 21:15 [android-common:android15-6.6-2024-09 44/44] include/linux/mm_inline.h:46:41: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).