From: kernel test robot <lkp@intel.com>
To: Kent Overstreet <kent.overstreet@linux.dev>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
Kent Overstreet <kent.overstreet@linux.dev>
Subject: [bcachefs:master 219/222] fs/bcachefs/btree_io.c:605:1: warning: unused label 'print'
Date: Sat, 29 Mar 2025 06:21:15 +0800 [thread overview]
Message-ID: <202503290610.rdG0ecHf-lkp@intel.com> (raw)
tree: https://evilpiepirate.org/git/bcachefs.git master
head: 3720faca3701df3bb8f5cd2a12061664d01ce817
commit: 1e8de9663f8533830bd12df800d14d7a062bec7d [219/222] bcachefs: Better printing of inconsistency errors
config: arm-randconfig-004-20250329 (https://download.01.org/0day-ci/archive/20250329/202503290610.rdG0ecHf-lkp@intel.com/config)
compiler: clang version 21.0.0git (https://github.com/llvm/llvm-project 7eccafc3c84606587a175c0a8c1ebea6e4fb21cd)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250329/202503290610.rdG0ecHf-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/202503290610.rdG0ecHf-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> fs/bcachefs/btree_io.c:605:1: warning: unused label 'print' [-Wunused-label]
605 | print:
| ^~~~~~
1 warning generated.
vim +/print +605 fs/bcachefs/btree_io.c
538
539 __printf(10, 11)
540 static int __btree_err(int ret,
541 struct bch_fs *c,
542 struct bch_dev *ca,
543 struct btree *b,
544 struct bset *i,
545 struct bkey_packed *k,
546 int write,
547 bool have_retry,
548 enum bch_sb_error_id err_type,
549 const char *fmt, ...)
550 {
551 bool silent = c->curr_recovery_pass == BCH_RECOVERY_PASS_scan_for_btree_nodes;
552
553 if (!have_retry && ret == -BCH_ERR_btree_node_read_err_want_retry)
554 ret = -BCH_ERR_btree_node_read_err_fixable;
555 if (!have_retry && ret == -BCH_ERR_btree_node_read_err_must_retry)
556 ret = -BCH_ERR_btree_node_read_err_bad_node;
557
558 if (!silent && ret != -BCH_ERR_btree_node_read_err_fixable)
559 bch2_sb_error_count(c, err_type);
560
561 struct printbuf out = PRINTBUF;
562 if (write != WRITE && ret != -BCH_ERR_btree_node_read_err_fixable) {
563 printbuf_indent_add_nextline(&out, 2);
564 #ifdef BCACHEFS_LOG_PREFIX
565 prt_printf(&out, bch2_log_msg(c, ""));
566 #endif
567 }
568
569 btree_err_msg(&out, c, ca, b, i, k, b->written, write);
570
571 va_list args;
572 va_start(args, fmt);
573 prt_vprintf(&out, fmt, args);
574 va_end(args);
575
576 if (write == WRITE) {
577 prt_str(&out, ", ");
578 ret = __bch2_inconsistent_error(c, &out)
579 ? -BCH_ERR_fsck_errors_not_fixed
580 : 0;
581 silent = false;
582 }
583
584 switch (ret) {
585 case -BCH_ERR_btree_node_read_err_fixable:
586 ret = !silent
587 ? __bch2_fsck_err(c, NULL, FSCK_CAN_FIX, err_type, "%s", out.buf)
588 : -BCH_ERR_fsck_fix;
589 if (ret != -BCH_ERR_fsck_fix &&
590 ret != -BCH_ERR_fsck_ignore)
591 goto fsck_err;
592 ret = -BCH_ERR_fsck_fix;
593 goto out;
594 case -BCH_ERR_btree_node_read_err_bad_node:
595 prt_str(&out, ", ");
596 ret = __bch2_topology_error(c, &out);
597 if (ret)
598 silent = false;
599 break;
600 case -BCH_ERR_btree_node_read_err_incompatible:
601 ret = -BCH_ERR_fsck_errors_not_fixed;
602 silent = false;
603 break;
604 }
> 605 print:
606 if (!silent)
607 bch2_print_string_as_lines(KERN_ERR, out.buf);
608 out:
609 fsck_err:
610 printbuf_exit(&out);
611 return ret;
612 }
613
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2025-03-28 22:22 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=202503290610.rdG0ecHf-lkp@intel.com \
--to=lkp@intel.com \
--cc=kent.overstreet@linux.dev \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox