* [djwong-xfs:scrub-rtsummary 23/25] fs/xfs/scrub/array.c:627:2: error: implicit declaration of function 'trace_xfbma_sort_stats'
@ 2020-06-23 7:22 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2020-06-23 7:22 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 6521 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git scrub-rtsummary
head: 6a3195f0b8086aa941c656f91b7a0498e15aad0d
commit: 6fdc49bc994d255e80d09aece3521849005b956a [23/25] xfs: create a big array data structure
config: x86_64-kexec (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce (this is a W=1 build):
git checkout 6fdc49bc994d255e80d09aece3521849005b956a
# save the attached .config to linux build tree
make W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
fs/xfs/scrub/array.c: In function 'xfbma_sort':
>> fs/xfs/scrub/array.c:627:2: error: implicit declaration of function 'trace_xfbma_sort_stats' [-Werror=implicit-function-declaration]
627 | trace_xfbma_sort_stats(array->nr, max_stack_depth, max_stack_used,
| ^~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/trace_xfbma_sort_stats +627 fs/xfs/scrub/array.c
468
469 /*
470 * For array subsets smaller than 4 elements, it's slightly faster to use
471 * insertion sort than quicksort's stack machine.
472 */
473 #define ISORT_THRESHOLD (4)
474 int
475 xfbma_sort(
476 struct xfbma *array,
477 xfbma_cmp_fn cmp_fn)
478 {
479 int64_t *stack;
480 int64_t *beg;
481 int64_t *end;
482 void *pivot = xfbma_temp(array, 0);
483 void *temp = xfbma_temp(array, 1);
484 int64_t lo, mid, hi;
485 const int max_stack_depth = ilog2(array->nr) + 1;
486 int stack_depth = 0;
487 int max_stack_used = 0;
488 int error = 0;
489
490 if (array->nr == 0)
491 return 0;
492 if (array->nr >= QSORT_MAX_RECS)
493 return -E2BIG;
494 if (array->nr <= ISORT_THRESHOLD)
495 return xfbma_isort(array, cmp_fn, 0, array->nr - 1);
496
497 /* Allocate our pointer stacks for sorting. */
498 stack = kmem_alloc(sizeof(int64_t) * 2 * max_stack_depth,
499 KM_NOFS | KM_MAYFAIL);
500 if (!stack)
501 return -ENOMEM;
502 beg = stack;
503 end = &stack[max_stack_depth];
504
505 beg[0] = 0;
506 end[0] = array->nr;
507 while (stack_depth >= 0) {
508 lo = beg[stack_depth];
509 hi = end[stack_depth] - 1;
510
511 /* Nothing left in this partition to sort; pop stack. */
512 if (lo >= hi) {
513 stack_depth--;
514 continue;
515 }
516
517 /* Small enough for insertion sort? */
518 if (hi - lo <= ISORT_THRESHOLD) {
519 error = xfbma_isort(array, cmp_fn, lo, hi);
520 if (error)
521 goto out_free;
522 stack_depth--;
523 continue;
524 }
525
526 /* Pick a pivot, move it to a[lo] and stash it. */
527 mid = lo + ((hi - lo) / 2);
528 error = xfbma_qsort_pivot(array, cmp_fn, lo, mid, hi);
529 if (error)
530 goto out_free;
531
532 error = xfbma_get(array, lo, pivot);
533 if (error)
534 goto out_free;
535
536 /*
537 * Rearrange a[lo..hi] such that everything smaller than the
538 * pivot is on the left side of the range and everything larger
539 * than the pivot is on the right side of the range.
540 */
541 while (lo < hi) {
542 /*
543 * Decrement hi until it finds an a[hi] less than the
544 * pivot value.
545 */
546 error = xfbma_get(array, hi, temp);
547 if (error)
548 goto out_free;
549 while (cmp_fn(temp, pivot) >= 0 && lo < hi) {
550 hi--;
551 error = xfbma_get(array, hi, temp);
552 if (error)
553 goto out_free;
554 }
555
556 /* Copy that item (a[hi]) to a[lo]. */
557 if (lo < hi) {
558 error = xfbma_set(array, lo++, temp);
559 if (error)
560 goto out_free;
561 }
562
563 /*
564 * Increment lo until it finds an a[lo] greater than
565 * the pivot value.
566 */
567 error = xfbma_get(array, lo, temp);
568 if (error)
569 goto out_free;
570 while (cmp_fn(temp, pivot) <= 0 && lo < hi) {
571 lo++;
572 error = xfbma_get(array, lo, temp);
573 if (error)
574 goto out_free;
575 }
576
577 /* Copy that item (a[lo]) to a[hi]. */
578 if (lo < hi) {
579 error = xfbma_set(array, hi--, temp);
580 if (error)
581 goto out_free;
582 }
583 }
584
585 /*
586 * Put our pivot value in the correct place@a[lo]. All
587 * values between a[beg[i]] and a[lo - 1] should be less than
588 * the pivot; and all values between a[lo + 1] and a[end[i]-1]
589 * should be greater than the pivot.
590 */
591 error = xfbma_set(array, lo, pivot);
592 if (error)
593 goto out_free;
594
595 /*
596 * Set up the pointers for the next iteration. We push onto
597 * the stack all of the unsorted values between a[lo + 1] and
598 * a[end[i]], and we tweak the current stack frame to point to
599 * the unsorted values between a[beg[i]] and a[lo] so that
600 * those values will be sorted when we pop the stack.
601 */
602 beg[stack_depth + 1] = lo + 1;
603 end[stack_depth + 1] = end[stack_depth];
604 end[stack_depth++] = lo;
605
606 /* Check our stack usage. */
607 max_stack_used = max(max_stack_used, stack_depth);
608 if (stack_depth >= max_stack_depth) {
609 ASSERT(0);
610 error = -EFSCORRUPTED;
611 goto out_free;
612 }
613
614 /*
615 * Always start with the smaller of the two partitions to keep
616 * the amount of recursion in check.
617 */
618 if (end[stack_depth] - beg[stack_depth] >
619 end[stack_depth - 1] - beg[stack_depth - 1]) {
620 swap(beg[stack_depth], beg[stack_depth - 1]);
621 swap(end[stack_depth], end[stack_depth - 1]);
622 }
623 }
624
625 out_free:
626 kfree(stack);
> 627 trace_xfbma_sort_stats(array->nr, max_stack_depth, max_stack_used,
628 error);
629 return error;
630 }
631
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 28075 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-06-23 7:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-23 7:22 [djwong-xfs:scrub-rtsummary 23/25] fs/xfs/scrub/array.c:627:2: error: implicit declaration of function 'trace_xfbma_sort_stats' 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.