From: kernel test robot <lkp@intel.com>
To: Jesse Brandeburg <jesse.brandeburg@intel.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
linux-kernel@vger.kernel.org,
Andy Shevchenko <andriy.shevchenko@intel.com>,
Andrew Morton <akpm@linux-foundation.org>,
Linux Memory Management List <linux-mm@kvack.org>
Subject: include/linux/vmstat.h:400:43: error: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item')
Date: Sun, 3 Mar 2024 12:18:46 +0800 [thread overview]
Message-ID: <202403031232.DGh2J4ks-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 04b8076df2534f08bb4190f90a24e0f7f8930aca
commit: c348c16305280fe3e6c1186378f96c8634c149f9 lib: make a test module with set/clear bit
date: 3 years, 9 months ago
config: s390-allmodconfig (https://download.01.org/0day-ci/archive/20240303/202403031232.DGh2J4ks-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/20240303/202403031232.DGh2J4ks-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/202403031232.DGh2J4ks-lkp@intel.com/
All errors (new ones prefixed by >>):
In file included from lib/test_bitops.c:9:
In file included from include/linux/module.h:18:
In file included from include/linux/elf.h:6:
In file included from arch/s390/include/asm/elf.h:145:
In file included from arch/s390/include/asm/mmu_context.h:11:
In file included from arch/s390/include/asm/pgalloc.h:18:
In file included from include/linux/mm.h:1485:
>> include/linux/vmstat.h:400:43: error: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Werror,-Wenum-enum-conversion]
400 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
401 | item];
| ~~~~
include/linux/vmstat.h:407:43: error: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Werror,-Wenum-enum-conversion]
407 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
408 | NR_VM_NUMA_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~
>> include/linux/vmstat.h:414:36: error: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Werror,-Wenum-enum-conversion]
414 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
| ~~~~~~~~~~~ ^ ~~~
include/linux/vmstat.h:419:43: error: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Werror,-Wenum-enum-conversion]
419 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
420 | NR_VM_NUMA_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~
include/linux/vmstat.h:428:43: error: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Werror,-Wenum-enum-conversion]
428 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
429 | NR_VM_NUMA_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~
5 errors generated.
vim +400 include/linux/vmstat.h
9d7ea9a297e644 Konstantin Khlebnikov 2019-12-04 396
9d7ea9a297e644 Konstantin Khlebnikov 2019-12-04 397 #ifdef CONFIG_NUMA
9d7ea9a297e644 Konstantin Khlebnikov 2019-12-04 398 static inline const char *numa_stat_name(enum numa_stat_item item)
9d7ea9a297e644 Konstantin Khlebnikov 2019-12-04 399 {
9d7ea9a297e644 Konstantin Khlebnikov 2019-12-04 @400 return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
9d7ea9a297e644 Konstantin Khlebnikov 2019-12-04 401 item];
9d7ea9a297e644 Konstantin Khlebnikov 2019-12-04 402 }
9d7ea9a297e644 Konstantin Khlebnikov 2019-12-04 403 #endif /* CONFIG_NUMA */
9d7ea9a297e644 Konstantin Khlebnikov 2019-12-04 404
9d7ea9a297e644 Konstantin Khlebnikov 2019-12-04 405 static inline const char *node_stat_name(enum node_stat_item item)
9d7ea9a297e644 Konstantin Khlebnikov 2019-12-04 406 {
9d7ea9a297e644 Konstantin Khlebnikov 2019-12-04 407 return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
9d7ea9a297e644 Konstantin Khlebnikov 2019-12-04 408 NR_VM_NUMA_STAT_ITEMS +
9d7ea9a297e644 Konstantin Khlebnikov 2019-12-04 409 item];
9d7ea9a297e644 Konstantin Khlebnikov 2019-12-04 410 }
9d7ea9a297e644 Konstantin Khlebnikov 2019-12-04 411
9d7ea9a297e644 Konstantin Khlebnikov 2019-12-04 412 static inline const char *lru_list_name(enum lru_list lru)
9d7ea9a297e644 Konstantin Khlebnikov 2019-12-04 413 {
9d7ea9a297e644 Konstantin Khlebnikov 2019-12-04 @414 return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
9d7ea9a297e644 Konstantin Khlebnikov 2019-12-04 415 }
9d7ea9a297e644 Konstantin Khlebnikov 2019-12-04 416
:::::: The code at line 400 was first introduced by commit
:::::: 9d7ea9a297e6445d567056f15b469dde13ca4134 mm/vmstat: add helpers to get vmstat item names for each enum type
:::::: TO: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
:::::: CC: Linus Torvalds <torvalds@linux-foundation.org>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2024-03-03 4:19 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202403031232.DGh2J4ks-lkp@intel.com \
--to=lkp@intel.com \
--cc=akpm@linux-foundation.org \
--cc=andriy.shevchenko@intel.com \
--cc=jesse.brandeburg@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
/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.