From: kernel test robot <lkp@intel.com>
To: Kent Overstreet <kent.overstreet@linux.dev>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [linux-next:master 4134/5419] fs/bcachefs/sb-members.c:192:25: sparse: sparse: restricted __le64 degrades to integer
Date: Wed, 7 May 2025 21:35:05 +0800 [thread overview]
Message-ID: <202505072156.deeoT0Bc-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 08710e696081d58163c8078e0e096be6d35c5fad
commit: 5359b9ec1ddce6f7a0cb80ba9b820456f0ee69b7 [4134/5419] bcachefs: BCH_FEATURE_no_alloc_info
config: microblaze-randconfig-r111-20250417 (https://download.01.org/0day-ci/archive/20250507/202505072156.deeoT0Bc-lkp@intel.com/config)
compiler: microblaze-linux-gcc (GCC) 10.5.0
reproduce: (https://download.01.org/0day-ci/archive/20250507/202505072156.deeoT0Bc-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/202505072156.deeoT0Bc-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
fs/bcachefs/sb-members.c: note: in included file:
fs/bcachefs/bcachefs.h:1015:9: sparse: sparse: array of flexible structures
>> fs/bcachefs/sb-members.c:192:25: sparse: sparse: restricted __le64 degrades to integer
vim +192 fs/bcachefs/sb-members.c
153
154 static int validate_member(struct printbuf *err,
155 struct bch_member m,
156 struct bch_sb *sb,
157 int i)
158 {
159 if (le64_to_cpu(m.nbuckets) > BCH_MEMBER_NBUCKETS_MAX) {
160 prt_printf(err, "device %u: too many buckets (got %llu, max %u)",
161 i, le64_to_cpu(m.nbuckets), BCH_MEMBER_NBUCKETS_MAX);
162 return -BCH_ERR_invalid_sb_members;
163 }
164
165 if (le64_to_cpu(m.nbuckets) -
166 le16_to_cpu(m.first_bucket) < BCH_MIN_NR_NBUCKETS) {
167 prt_printf(err, "device %u: not enough buckets (got %llu, max %u)",
168 i, le64_to_cpu(m.nbuckets), BCH_MIN_NR_NBUCKETS);
169 return -BCH_ERR_invalid_sb_members;
170 }
171
172 if (le16_to_cpu(m.bucket_size) <
173 le16_to_cpu(sb->block_size)) {
174 prt_printf(err, "device %u: bucket size %u smaller than block size %u",
175 i, le16_to_cpu(m.bucket_size), le16_to_cpu(sb->block_size));
176 return -BCH_ERR_invalid_sb_members;
177 }
178
179 if (le16_to_cpu(m.bucket_size) <
180 BCH_SB_BTREE_NODE_SIZE(sb)) {
181 prt_printf(err, "device %u: bucket size %u smaller than btree node size %llu",
182 i, le16_to_cpu(m.bucket_size), BCH_SB_BTREE_NODE_SIZE(sb));
183 return -BCH_ERR_invalid_sb_members;
184 }
185
186 if (m.btree_bitmap_shift >= BCH_MI_BTREE_BITMAP_SHIFT_MAX) {
187 prt_printf(err, "device %u: invalid btree_bitmap_shift %u", i, m.btree_bitmap_shift);
188 return -BCH_ERR_invalid_sb_members;
189 }
190
191 if (BCH_MEMBER_FREESPACE_INITIALIZED(&m) &&
> 192 sb->features[0] & BIT_ULL(BCH_FEATURE_no_alloc_info)) {
193 prt_printf(err, "device %u: freespace initialized but fs has no alloc info", i);
194 return -BCH_ERR_invalid_sb_members;
195 }
196
197 return 0;
198 }
199
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2025-05-07 13:35 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=202505072156.deeoT0Bc-lkp@intel.com \
--to=lkp@intel.com \
--cc=kent.overstreet@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 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.