All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-next:master 4134/5419] fs/bcachefs/sb-members.c:192:25: sparse: sparse: restricted __le64 degrades to integer
@ 2025-05-07 13:35 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-05-07 13:35 UTC (permalink / raw)
  To: Kent Overstreet; +Cc: oe-kbuild-all

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-05-07 13:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-07 13:35 [linux-next:master 4134/5419] fs/bcachefs/sb-members.c:192:25: sparse: sparse: restricted __le64 degrades to integer 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.