[liam:maple_marks_v7.2_fixes 27/31] lib/test_maple_tree.c:356:29: error: call to undeclared function 'mt_slot_count'; ISO C99 and later do not support implicit function declarations
kernel test robot <[email protected]>
| Newsgroups | dev.linux.lists.llvm,dev.linux.lists.oe-kbuild-all |
|---|---|
| Message-ID | <[email protected]> |
tree: https://git.kernel.org/pub/scm/linux/kernel/git/liam/linux.git maple_marks_v7.2_fixes head: bad7721b2ef18bd6c1361bff214b8323cef1296f commit: 5dc6e2040f47d163de17af84a26609cee99f962e [27/31] maple_tree: Testing code update for triple split config: hexagon-randconfig-001-20260710 (https://download.01.org/0day-ci/archive/20260710/[email protected]/config) compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project b3e6e6dabdc02153552a64fc74ff5c7532447eed) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260710/[email protected]/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 <[email protected]> | Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ All errors (new ones prefixed by >>): >> lib/test_maple_tree.c:356:29: error: call to undeclared function 'mt_slot_count'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 356 | if (mas->max - mas->min <= mt_slot_count(mas->node)) | ^ >> lib/test_maple_tree.c:359:8: error: call to undeclared function 'mas_data_end'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 359 | val = mas_data_end(mas) + 1; | ^ >> lib/test_maple_tree.c:420:2: error: call to undeclared function 'mas_start'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 420 | mas_start(mas); | ^ lib/test_maple_tree.c:420:2: note: did you mean 'mas_store'? include/linux/maple_tree.h:640:7: note: 'mas_store' declared here 640 | void *mas_store(struct ma_state *mas, void *entry); | ^ lib/test_maple_tree.c:425:11: error: call to undeclared function 'mas_data_end'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 425 | count = mas_data_end(mas); | ^ >> lib/test_maple_tree.c:426:9: error: call to undeclared function 'ma_pivots'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 426 | piv = ma_pivots(mas_mn(mas), mte_node_type(mas->node)); | ^ >> lib/test_maple_tree.c:426:19: error: call to undeclared function 'mas_mn'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 426 | piv = ma_pivots(mas_mn(mas), mte_node_type(mas->node)); | ^ >> lib/test_maple_tree.c:426:32: error: call to undeclared function 'mte_node_type'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 426 | piv = ma_pivots(mas_mn(mas), mte_node_type(mas->node)); | ^ >> lib/test_maple_tree.c:426:7: error: incompatible integer to pointer conversion assigning to 'unsigned long *' from 'int' [-Wint-conversion] 426 | piv = ma_pivots(mas_mn(mas), mte_node_type(mas->node)); | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> lib/test_maple_tree.c:432:3: error: call to undeclared function 'mas_descend'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 432 | mas_descend(mas); | ^ >> lib/test_maple_tree.c:443:23: error: call to undeclared function 'mte_is_leaf'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 443 | MT_BUG_ON(mas->tree, mte_is_leaf(mas->node)); | ^ lib/test_maple_tree.c:444:8: error: call to undeclared function 'mas_data_end'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 444 | val = mas_data_end(mas) + 1; | ^ lib/test_maple_tree.c:445:11: error: call to undeclared function 'mt_slot_count'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 445 | target = mt_slot_count(mas->node); | ^ lib/test_maple_tree.c:1522:2: error: call to undeclared function 'mas_start'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 1522 | mas_start(&mas); | ^ lib/test_maple_tree.c:1528:10: error: call to undeclared function 'ma_pivots'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 1528 | index = ma_pivots(mas_mn(&mas), mte_node_type(mas.node))[7] + 1; | ^ lib/test_maple_tree.c:1528:20: error: call to undeclared function 'mas_mn'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 1528 | index = ma_pivots(mas_mn(&mas), mte_node_type(mas.node))[7] + 1; | ^ lib/test_maple_tree.c:1528:34: error: call to undeclared function 'mte_node_type'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 1528 | index = ma_pivots(mas_mn(&mas), mte_node_type(mas.node))[7] + 1; | ^ >> lib/test_maple_tree.c:1528:58: error: subscripted value is not an array, pointer, or vector 1528 | index = ma_pivots(mas_mn(&mas), mte_node_type(mas.node))[7] + 1; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~ lib/test_maple_tree.c:1535:58: error: subscripted value is not an array, pointer, or vector 1535 | index = ma_pivots(mas_mn(&mas), mte_node_type(mas.node))[8] + 1; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~ 18 errors generated. vim +/mt_slot_count +356 lib/test_maple_tree.c 343 344 static noinline bool __init mas_node_fill(struct ma_state *mas) 345 { 346 int target, val; 347 void *fill = (void*)0x11111111; 348 unsigned long high; 349 350 if (!mas_is_active(mas)) 351 mas_walk(mas); 352 353 if (!mas_is_active(mas)) 354 return false; 355 > 356 if (mas->max - mas->min <= mt_slot_count(mas->node)) 357 goto done; 358 > 359 val = mas_data_end(mas) + 1; 360 target = mt_slot_count(mas->node); 361 if (val == target) 362 goto full; 363 364 mas_walk(mas); 365 high = mas->max; 366 while (target > val && mas_is_active(mas)) { 367 unsigned long old_last = mas->last; 368 unsigned long new_last; 369 370 if (old_last > mas->index) { 371 new_last = mas->index + 1; 372 if (new_last <= mas->index || new_last > old_last) 373 new_last = old_last; 374 mas->last = new_last; 375 mas_store(mas, fill); 376 val = mas_data_end(mas) + 1; 377 if (target <= val) 378 break; 379 } 380 mas_next_range(mas, high); 381 if (!mas_is_active(mas)) 382 break; 383 } 384 return mas_node_first_split_offset(mas); 385 386 full: 387 if (mas->max - mas->min > mt_slot_count(mas->node)) 388 return mas_node_first_split_offset(mas); 389 done: 390 mas_set(mas, mas->max); 391 mas_walk(mas); 392 return false; 393 } 394 395 static noinline bool __init mas_node_split(struct ma_state *mas) 396 { 397 void *fill = (void*)0x22222222; 398 unsigned long old_last, new_last; 399 400 if (mas_node_fill(mas)) { 401 old_last = mas->last; 402 if (old_last <= mas->index) 403 return false; 404 405 new_last = mas->index + 1; 406 if (new_last <= mas->index || new_last > old_last) 407 new_last = old_last; 408 mas->last = new_last; 409 mas_store(mas, fill); 410 return true; 411 } 412 413 return false; 414 } 415 416 static noinline void __init test_mas_node_depth(struct ma_state *mas, 417 int depth) 418 { 419 mas_reset(mas); > 420 mas_start(mas); 421 while (mas->depth < depth) { 422 unsigned long *piv; 423 int count, offset; 424 425 count = mas_data_end(mas); > 426 piv = ma_pivots(mas_mn(mas), mte_node_type(mas->node)); 427 offset = 0; 428 while (offset < count && mas->index > piv[offset]) { 429 offset++; 430 } 431 mas->offset = offset; > 432 mas_descend(mas); 433 mas->depth++; 434 } 435 436 } 437 438 static noinline void __init mas_internal_node_fill(struct ma_state *mas) 439 { 440 int val, target, depth; 441 unsigned long high, next; 442 > 443 MT_BUG_ON(mas->tree, mte_is_leaf(mas->node)); 444 val = mas_data_end(mas) + 1; 445 target = mt_slot_count(mas->node); 446 if (val == target) 447 return; 448 449 high = mas->max; 450 depth = mas->depth; 451 while (mas_data_end(mas) + 1 < target) { 452 mas_walk(mas); 453 if (mas_node_split(mas)) { 454 next = mas->last + 1; 455 } else { 456 next = mas->max + 1; 457 } 458 if (!next || next > high) 459 return; 460 461 mas->index = next; 462 test_mas_node_depth(mas, depth); 463 } 464 465 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki