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,
Linux Memory Management List <linux-mm@kvack.org>
Subject: [linux-next:master 7634/8795] fs/bcachefs/sb-members.c:503:2: error: expected expression
Date: Tue, 3 Sep 2024 19:07:41 +0800 [thread overview]
Message-ID: <202409031807.S80qlUjK-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 6804f0edbe7747774e6ae60f20cec4ee3ad7c187
commit: 4e7795eda4459bf3e69c87c793bc34f610f9d981 [7634/8795] bcachefs: bch2_sb_member_alloc()
config: powerpc64-randconfig-003-20240903 (https://download.01.org/0day-ci/archive/20240903/202409031807.S80qlUjK-lkp@intel.com/config)
compiler: clang version 16.0.6 (https://github.com/llvm/llvm-project 7cbf1a2591520c2491aa35339f227775f4d3adf6)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240903/202409031807.S80qlUjK-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/202409031807.S80qlUjK-lkp@intel.com/
All errors (new ones prefixed by >>):
>> fs/bcachefs/sb-members.c:503:2: error: expected expression
unsigned nr_devices = max_t(unsigned, dev_idx + 1, c->sb.nr_devices);
^
>> fs/bcachefs/sb-members.c:507:42: error: use of undeclared identifier 'nr_devices'
le16_to_cpu(mi->member_bytes) * nr_devices, sizeof(u64));
^
include/linux/math.h:37:22: note: expanded from macro 'DIV_ROUND_UP'
#define DIV_ROUND_UP __KERNEL_DIV_ROUND_UP
^
fs/bcachefs/sb-members.c:513:30: error: use of undeclared identifier 'nr_devices'
c->disk_sb.sb->nr_devices = nr_devices;
^
3 errors generated.
vim +503 fs/bcachefs/sb-members.c
476
477 int bch2_sb_member_alloc(struct bch_fs *c)
478 {
479 unsigned dev_idx = c->sb.nr_devices;
480 if (dev_idx < BCH_SB_MEMBERS_MAX)
481 goto have_slot;
482
483 int best = -1;
484 u64 best_last_mount = 0;
485 for (dev_idx = 0; dev_idx < BCH_SB_MEMBERS_MAX; dev_idx++) {
486 struct bch_member m = bch2_sb_member_get(c->disk_sb.sb, dev_idx);
487 if (bch2_member_alive(&m))
488 continue;
489
490 u64 last_mount = le64_to_cpu(m.last_mount);
491 if (best < 0 || last_mount < best_last_mount) {
492 best = dev_idx;
493 best_last_mount = last_mount;
494 }
495 }
496 if (best >= 0) {
497 dev_idx = best;
498 goto have_slot;
499 }
500
501 return -BCH_ERR_ENOSPC_sb_members;
502 have_slot:
> 503 unsigned nr_devices = max_t(unsigned, dev_idx + 1, c->sb.nr_devices);
504
505 struct bch_sb_field_members_v2 *mi = bch2_sb_field_get(c->disk_sb.sb, members_v2);
506 unsigned u64s = DIV_ROUND_UP(sizeof(struct bch_sb_field_members_v2) +
> 507 le16_to_cpu(mi->member_bytes) * nr_devices, sizeof(u64));
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2024-09-03 11:08 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=202409031807.S80qlUjK-lkp@intel.com \
--to=lkp@intel.com \
--cc=kent.overstreet@linux.dev \
--cc=linux-mm@kvack.org \
--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