* [liam:maple_marks_v7.2 27/31] lib/maple_tree.c:2586:38: warning: result of comparison of constant 94416707145727 with expression of type 'unsigned long' is always false
@ 2026-06-26 20:16 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-06-26 20:16 UTC (permalink / raw)
To: Liam R. Howlett; +Cc: llvm, oe-kbuild-all
tree: https://git.kernel.org/pub/scm/linux/kernel/git/liam/linux.git maple_marks_v7.2
head: be119ad50e9c87a4a975871d84614f7c6aeaf0de
commit: 6660fa9424f74b0ad010d43c448244824351754d [27/31] maple_tree: Remove requirement for NULLs to never be at end of a node
config: arm-allnoconfig (https://download.01.org/0day-ci/archive/20260627/202606270428.Q97lALXU-lkp@intel.com/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260627/202606270428.Q97lALXU-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/202606270428.Q97lALXU-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> lib/maple_tree.c:2586:38: warning: result of comparison of constant 94416707145727 with expression of type 'unsigned long' is always false [-Wtautological-constant-out-of-range-compare]
2586 | if (unlikely(total == 29 && cp->max == 0x55df1a4a4fffUL))
| ~~~~~~~ ^ ~~~~~~~~~~~~~~~~
include/linux/compiler.h:77:42: note: expanded from macro 'unlikely'
77 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
lib/maple_tree.c:2596:39: warning: result of comparison of constant 94416707145727 with expression of type 'unsigned long' is always false [-Wtautological-constant-out-of-range-compare]
2596 | if (unlikely(total == 29 && cp->max == 0x55df1a4a4fffUL))
| ~~~~~~~ ^ ~~~~~~~~~~~~~~~~
include/linux/compiler.h:77:42: note: expanded from macro 'unlikely'
77 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
lib/maple_tree.c:2624:38: warning: result of comparison of constant 94416707145727 with expression of type 'unsigned long' is always false [-Wtautological-constant-out-of-range-compare]
2624 | if (unlikely(total == 29 && cp->max == 0x55df1a4a4fffUL))
| ~~~~~~~ ^ ~~~~~~~~~~~~~~~~
include/linux/compiler.h:77:42: note: expanded from macro 'unlikely'
77 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
lib/maple_tree.c:2764:41: warning: result of comparison of constant 94416707145727 with expression of type 'unsigned long' is always false [-Wtautological-constant-out-of-range-compare]
2764 | if (unlikely(cp->data == 29 && cp->max == 0x55df1a4a4fffUL))
| ~~~~~~~ ^ ~~~~~~~~~~~~~~~~
include/linux/compiler.h:77:42: note: expanded from macro 'unlikely'
77 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
4 warnings generated.
vim +2586 lib/maple_tree.c
2556
2557 /*
2558 * dst_setup() - Set up one or more destinations for the new data.
2559 * @cp: The maple copy node
2560 * @mas: The maple state
2561 * @mt: The source node type
2562 */
2563 static inline
2564 void dst_setup(struct maple_copy *cp, struct ma_state *mas, enum maple_type mt)
2565 {
2566 int capacity = mt_slots[mt];
2567 int total;
2568 int min_count;
2569 int left_count;
2570 int left_low;
2571 int left_high;
2572 int shift;
2573
2574 /* Data is 1 indexed, every src has +1 added. */
2575
2576 if (cp->data <= capacity) {
2577 cp->split = cp->data - 1;
2578 cp->d_count = 1;
2579 goto node_setup;
2580 }
2581
2582 total = cp->data;
2583 if (total > capacity * 2)
2584 goto split_3way;
2585
> 2586 if (unlikely(total == 29 && cp->max == 0x55df1a4a4fffUL))
2587 pr_err("dst_setup pre mas=%lx-%lx data=%d write_off=%u\n",
2588 mas->index, mas->last, total, cp->write_off);
2589
2590 cp->split = (total - 1) / 2;
2591 cp->d_count = 2;
2592 if (!ma_is_leaf(mt))
2593 goto node_setup;
2594
2595 if (cp->write_off < cp->split || cp->write_off > cp->split + 1) {
2596 if (unlikely(total == 29 && cp->max == 0x55df1a4a4fffUL))
2597 pr_err("dst_setup fast split=%u\n", cp->split);
2598 goto node_setup;
2599 }
2600
2601 min_count = mt_min_slots[mt] + 1;
2602 left_count = cp->split + 1;
2603
2604 left_low = min_count;
2605 if (total - capacity > left_low)
2606 left_low = total - capacity;
2607
2608 left_high = capacity;
2609 if (total - min_count < left_high)
2610 left_high = total - min_count;
2611
2612 if (left_count < left_low)
2613 left_count = left_low;
2614 else if (left_count > left_high)
2615 left_count = left_high;
2616
2617 shift = left_count - left_low;
2618 if (shift > 2)
2619 shift = 2;
2620
2621 if (shift > 0)
2622 left_count -= shift;
2623
2624 if (unlikely(total == 29 && cp->max == 0x55df1a4a4fffUL))
2625 pr_err("dst_setup edge split=%d left_low=%d left_high=%d shift=%d\n",
2626 left_count - 1, left_low, left_high, shift);
2627
2628 if ((left_count < min_count) || (left_count > capacity) ||
2629 (total - left_count < min_count) || (total - left_count > capacity))
2630 goto split_3way;
2631
2632 cp->split = left_count - 1;
2633
2634 goto node_setup;
2635
2636 split_3way:
2637 /* No other choice but to 3-way split the data */
2638 cp->split = (cp->data + 2) / 3;
2639 cp->d_count = 3;
2640
2641 node_setup:
2642 for (int i = 0; i < cp->d_count; i++) {
2643 cp->dst[i].mt = mt;
2644 cp->dst[i].node = ma_mnode_ptr(mas_pop_node(mas));
2645 }
2646 }
2647
--
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:[~2026-06-26 20:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-26 20:16 [liam:maple_marks_v7.2 27/31] lib/maple_tree.c:2586:38: warning: result of comparison of constant 94416707145727 with expression of type 'unsigned long' is always false kernel test robot
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.