From: kernel test robot <lkp@intel.com>
To: Kairui Song <kasong@tencent.com>
Cc: <oe-kbuild-all@lists.linux.dev>, 0day robot <lkp@intel.com>
Subject: include/linux/mm_inline.h:131:19: warning: overflow in conversion from 'long unsigned int' to 'int' changes value from '18446744073709551615' to '-1'
Date: Tue, 6 Oct 2026 20:07:39 +0800 [thread overview]
Message-ID: <asTki775sfHniKBV@rli9-mobl> (raw)
tree: https://github.com/intel-lab-lkp/linux/commits/Kairui-Song-via-B4-Relay/mm-memcontrol-allow-update-of-LRU-statistic-without-holding-LRU-lock/20261003-205512
head: fb7e985a90aa08774d1149de30384a36bb55bafb
commit: a24ab9c3982c5dca7d02d319bddb26221bbe433c mm/mglru: make folio lru referenced times count a generic API
config: alpha-allnoconfig (https://download.01.org/0day-ci/archive/20261004/202610041009.rRGnlvdY-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 16.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261004/202610041009.rRGnlvdY-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/r/202610041009.rRGnlvdY-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from kernel/fork.c:47:
include/linux/mm_inline.h: In function 'lru_get_gen_flags':
>> include/linux/mm_inline.h:131:19: warning: overflow in conversion from 'long unsigned int' to 'int' changes value from '18446744073709551615' to '-1' [-Woverflow]
131 | int gen = ((flags & LRU_GEN_MASK) >> LRU_GEN_PGOFF) - 1;
| ^
vim +131 include/linux/mm_inline.h
49ccf47e2e054a Kairui Song 2026-09-06 121
49ccf47e2e054a Kairui Song 2026-09-06 122 /**
49ccf47e2e054a Kairui Song 2026-09-06 123 * lru_get_gen_flags - Return the LRU generation number from folio flags.
49ccf47e2e054a Kairui Song 2026-09-06 124 * @flags: folio flags
49ccf47e2e054a Kairui Song 2026-09-06 125 *
49ccf47e2e054a Kairui Song 2026-09-06 126 * Returns: A number between 0 and (MAX_NR_GENS - 1), inclusive. Returns
49ccf47e2e054a Kairui Song 2026-09-06 127 * -1 if the flags indicate the folio is off the list (e.g., isolated).
49ccf47e2e054a Kairui Song 2026-09-06 128 */
49ccf47e2e054a Kairui Song 2026-09-06 129 static inline int lru_get_gen_flags(unsigned long flags)
ac35a490237446 Yu Zhao 2022-09-18 130 {
49ccf47e2e054a Kairui Song 2026-09-06 @131 int gen = ((flags & LRU_GEN_MASK) >> LRU_GEN_PGOFF) - 1;
ac35a490237446 Yu Zhao 2022-09-18 132
49ccf47e2e054a Kairui Song 2026-09-06 133 /* Exclude the legal -1 from the unsigned MAX_NR_GENS comparison */
49ccf47e2e054a Kairui Song 2026-09-06 134 VM_WARN_ON_ONCE(gen != -1 && gen >= MAX_NR_GENS);
49ccf47e2e054a Kairui Song 2026-09-06 135 return gen;
49ccf47e2e054a Kairui Song 2026-09-06 136 }
49ccf47e2e054a Kairui Song 2026-09-06 137
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next reply other threads:[~2026-10-06 12:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-06 12:07 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-10-04 2:39 include/linux/mm_inline.h:131:19: warning: overflow in conversion from 'long unsigned int' to 'int' changes value from '18446744073709551615' to '-1' kernel test robot
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=asTki775sfHniKBV@rli9-mobl \
--to=lkp@intel.com \
--cc=kasong@tencent.com \
--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.