From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9AB60C4332F for ; Wed, 8 Nov 2023 08:51:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343836AbjKHIvV (ORCPT ); Wed, 8 Nov 2023 03:51:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57148 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232221AbjKHIvT (ORCPT ); Wed, 8 Nov 2023 03:51:19 -0500 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2EADB197 for ; Wed, 8 Nov 2023 00:51:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1699433477; x=1730969477; h=date:from:to:cc:subject:message-id:mime-version; bh=ECVYpGxQJq40bymFUX/XFIyJOoAzyF5oDhmDluEFhgA=; b=DN3tpluXu2folbONwUsb4C+nn1rEimRRRfzVpEkY8Ufz60qAPJj3gjxE 1QX9F9y2TgVHDs30uRZOAL4tAOkrdiPPGfbJzu4Fuqd/SszsKS5Kt8a9U BA9KOLoucuwf82R5nkP6uoebWhNWngWih17DdIjxnZ6u8XJJdUEhIR+Dk Vo+IUEixVTVGJOY041Qmq3+iJ9LRx3+EwEN5n5KVHPcLJXVzouaQxJpBx EkXTQbhM0mzB5EvZcKPEx+yWutJ1WnqP9IaW0z/teHnF+A0/r6k2bmsRq I1V4U5lG49OmF5vtmI2OQj2b/PdntD9UQUCNDFBU3U9hQNRxcT5qvUc9x A==; X-IronPort-AV: E=McAfee;i="6600,9927,10887"; a="2662988" X-IronPort-AV: E=Sophos;i="6.03,285,1694761200"; d="scan'208";a="2662988" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Nov 2023 00:51:17 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10887"; a="828901173" X-IronPort-AV: E=Sophos;i="6.03,285,1694761200"; d="scan'208";a="828901173" Received: from lkp-server01.sh.intel.com (HELO 17d9e85e5079) ([10.239.97.150]) by fmsmga008.fm.intel.com with ESMTP; 08 Nov 2023 00:51:15 -0800 Received: from kbuild by 17d9e85e5079 with local (Exim 4.96) (envelope-from ) id 1r0eHJ-0007pg-0i; Wed, 08 Nov 2023 08:51:13 +0000 Date: Wed, 8 Nov 2023 16:50:26 +0800 From: kernel test robot To: Kent Overstreet Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org Subject: fs/bcachefs/btree_gc.c:1304:17: sparse: sparse: incorrect type in argument 1 (different address spaces) Message-ID: <202311081639.wRdkh0hk-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 305230142ae0637213bf6e04f6d9f10bbcb74af8 commit: 822835ffeae411bbc8af104da9331fdf63a7bc12 bcachefs: Fold bucket_state in to BCH_DATA_TYPES() date: 2 weeks ago config: loongarch-randconfig-r132-20231107 (https://download.01.org/0day-ci/archive/20231108/202311081639.wRdkh0hk-lkp@intel.com/config) compiler: loongarch64-linux-gcc (GCC) 13.2.0 reproduce: (https://download.01.org/0day-ci/archive/20231108/202311081639.wRdkh0hk-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 | Closes: https://lore.kernel.org/oe-kbuild-all/202311081639.wRdkh0hk-lkp@intel.com/ sparse warnings: (new ones prefixed by >>) fs/bcachefs/btree_gc.c: note: in included file (through fs/bcachefs/btree_locking.h): fs/bcachefs/btree_iter.h:204:8: sparse: sparse: duplicate inline fs/bcachefs/btree_gc.c: note: in included file (through fs/bcachefs/bcachefs.h): fs/bcachefs/bcachefs_format.h:1274:45: sparse: sparse: array of flexible structures fs/bcachefs/bcachefs_format.h:1289:42: sparse: sparse: array of flexible structures fs/bcachefs/btree_gc.c: note: in included file: fs/bcachefs/bcachefs.h:834:9: sparse: sparse: array of flexible structures fs/bcachefs/btree_gc.c:854:45: sparse: sparse: mixing different enum types: fs/bcachefs/btree_gc.c:854:45: sparse: unsigned int enum btree_id fs/bcachefs/btree_gc.c:854:45: sparse: unsigned int enum btree_node_type fs/bcachefs/btree_gc.c:1000:45: sparse: sparse: mixing different enum types: fs/bcachefs/btree_gc.c:1000:45: sparse: unsigned int enum btree_id fs/bcachefs/btree_gc.c:1000:45: sparse: unsigned int enum btree_node_type fs/bcachefs/btree_gc.c:1215:47: sparse: sparse: cast removes address space '__percpu' of expression fs/bcachefs/btree_gc.c:1215:47: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned long long [noderef] [usertype] __percpu * @@ got void * @@ fs/bcachefs/btree_gc.c:1215:47: sparse: expected unsigned long long [noderef] [usertype] __percpu * fs/bcachefs/btree_gc.c:1215:47: sparse: got void * fs/bcachefs/btree_gc.c:1231:47: sparse: sparse: cast removes address space '__percpu' of expression fs/bcachefs/btree_gc.c:1231:47: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned long long [noderef] [usertype] __percpu * @@ got void * @@ fs/bcachefs/btree_gc.c:1231:47: sparse: expected unsigned long long [noderef] [usertype] __percpu * fs/bcachefs/btree_gc.c:1231:47: sparse: got void * >> fs/bcachefs/btree_gc.c:1304:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got unsigned long long [noderef] __percpu * @@ fs/bcachefs/btree_gc.c:1304:17: sparse: expected void *ptr fs/bcachefs/btree_gc.c:1304:17: sparse: got unsigned long long [noderef] __percpu * >> fs/bcachefs/btree_gc.c:1304:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got unsigned long long [noderef] __percpu * @@ fs/bcachefs/btree_gc.c:1304:17: sparse: expected void *ptr fs/bcachefs/btree_gc.c:1304:17: sparse: got unsigned long long [noderef] __percpu * >> fs/bcachefs/btree_gc.c:1304:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got unsigned long long [noderef] __percpu * @@ fs/bcachefs/btree_gc.c:1304:17: sparse: expected void *ptr fs/bcachefs/btree_gc.c:1304:17: sparse: got unsigned long long [noderef] __percpu * >> fs/bcachefs/btree_gc.c:1304:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got unsigned long long [noderef] __percpu * @@ fs/bcachefs/btree_gc.c:1304:17: sparse: expected void *ptr fs/bcachefs/btree_gc.c:1304:17: sparse: got unsigned long long [noderef] __percpu * fs/bcachefs/btree_gc.c: note: in included file (through fs/bcachefs/buckets.h, fs/bcachefs/alloc_background.h): fs/bcachefs/extents.h:145:44: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le32 [usertype] @@ got unsigned int const [usertype] csum @@ fs/bcachefs/extents.h:145:44: sparse: expected restricted __le32 [usertype] fs/bcachefs/extents.h:145:44: sparse: got unsigned int const [usertype] csum fs/bcachefs/extents.h:159:44: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le16 [usertype] @@ got unsigned long long const [usertype] csum_hi:16 @@ fs/bcachefs/extents.h:159:44: sparse: expected restricted __le16 [usertype] fs/bcachefs/extents.h:159:44: sparse: got unsigned long long const [usertype] csum_hi:16 fs/bcachefs/extents.h:145:44: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le32 [usertype] @@ got unsigned int const [usertype] csum @@ fs/bcachefs/extents.h:145:44: sparse: expected restricted __le32 [usertype] fs/bcachefs/extents.h:145:44: sparse: got unsigned int const [usertype] csum fs/bcachefs/extents.h:159:44: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le16 [usertype] @@ got unsigned long long const [usertype] csum_hi:16 @@ fs/bcachefs/extents.h:159:44: sparse: expected restricted __le16 [usertype] fs/bcachefs/extents.h:159:44: sparse: got unsigned long long const [usertype] csum_hi:16 fs/bcachefs/btree_gc.c: note: in included file (through include/linux/mmzone.h, include/linux/gfp.h, include/linux/xarray.h, ...): include/linux/seqlock.h:269:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got unsigned int [noderef] __percpu * @@ include/linux/seqlock.h:269:9: sparse: expected void *ptr include/linux/seqlock.h:269:9: sparse: got unsigned int [noderef] __percpu * include/linux/seqlock.h:269:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got unsigned int [noderef] __percpu * @@ include/linux/seqlock.h:269:9: sparse: expected void *ptr include/linux/seqlock.h:269:9: sparse: got unsigned int [noderef] __percpu * include/linux/seqlock.h:269:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got unsigned int [noderef] __percpu * @@ include/linux/seqlock.h:269:9: sparse: expected void *ptr include/linux/seqlock.h:269:9: sparse: got unsigned int [noderef] __percpu * include/linux/seqlock.h:269:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got unsigned int [noderef] __percpu * @@ include/linux/seqlock.h:269:9: sparse: expected void *ptr include/linux/seqlock.h:269:9: sparse: got unsigned int [noderef] __percpu * include/linux/seqlock.h:269:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got int [noderef] __percpu * @@ include/linux/seqlock.h:269:9: sparse: expected void *ptr include/linux/seqlock.h:269:9: sparse: got int [noderef] __percpu * include/linux/seqlock.h:269:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got int [noderef] __percpu * @@ include/linux/seqlock.h:269:9: sparse: expected void *ptr include/linux/seqlock.h:269:9: sparse: got int [noderef] __percpu * include/linux/seqlock.h:269:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got int [noderef] __percpu * @@ include/linux/seqlock.h:269:9: sparse: expected void *ptr include/linux/seqlock.h:269:9: sparse: got int [noderef] __percpu * include/linux/seqlock.h:269:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got int [noderef] __percpu * @@ include/linux/seqlock.h:269:9: sparse: expected void *ptr include/linux/seqlock.h:269:9: sparse: got int [noderef] __percpu * include/linux/seqlock.h:269:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got unsigned int [noderef] __percpu * @@ include/linux/seqlock.h:269:9: sparse: expected void *ptr include/linux/seqlock.h:269:9: sparse: got unsigned int [noderef] __percpu * include/linux/seqlock.h:269:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got unsigned int [noderef] __percpu * @@ include/linux/seqlock.h:269:9: sparse: expected void *ptr include/linux/seqlock.h:269:9: sparse: got unsigned int [noderef] __percpu * include/linux/seqlock.h:269:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got unsigned int [noderef] __percpu * @@ include/linux/seqlock.h:269:9: sparse: expected void *ptr include/linux/seqlock.h:269:9: sparse: got unsigned int [noderef] __percpu * include/linux/seqlock.h:269:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got unsigned int [noderef] __percpu * @@ include/linux/seqlock.h:269:9: sparse: expected void *ptr include/linux/seqlock.h:269:9: sparse: got unsigned int [noderef] __percpu * include/linux/seqlock.h:269:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got int [noderef] __percpu * @@ include/linux/seqlock.h:269:9: sparse: expected void *ptr include/linux/seqlock.h:269:9: sparse: got int [noderef] __percpu * include/linux/seqlock.h:269:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got int [noderef] __percpu * @@ include/linux/seqlock.h:269:9: sparse: expected void *ptr include/linux/seqlock.h:269:9: sparse: got int [noderef] __percpu * include/linux/seqlock.h:269:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got int [noderef] __percpu * @@ include/linux/seqlock.h:269:9: sparse: expected void *ptr include/linux/seqlock.h:269:9: sparse: got int [noderef] __percpu * include/linux/seqlock.h:269:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got int [noderef] __percpu * @@ include/linux/seqlock.h:269:9: sparse: expected void *ptr include/linux/seqlock.h:269:9: sparse: got int [noderef] __percpu * include/linux/seqlock.h:269:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got unsigned int [noderef] __percpu * @@ include/linux/seqlock.h:269:9: sparse: expected void *ptr include/linux/seqlock.h:269:9: sparse: got unsigned int [noderef] __percpu * include/linux/seqlock.h:269:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got unsigned int [noderef] __percpu * @@ include/linux/seqlock.h:269:9: sparse: expected void *ptr include/linux/seqlock.h:269:9: sparse: got unsigned int [noderef] __percpu * include/linux/seqlock.h:269:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got unsigned int [noderef] __percpu * @@ include/linux/seqlock.h:269:9: sparse: expected void *ptr include/linux/seqlock.h:269:9: sparse: got unsigned int [noderef] __percpu * include/linux/seqlock.h:269:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got unsigned int [noderef] __percpu * @@ include/linux/seqlock.h:269:9: sparse: expected void *ptr include/linux/seqlock.h:269:9: sparse: got unsigned int [noderef] __percpu * include/linux/seqlock.h:269:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got int [noderef] __percpu * @@ include/linux/seqlock.h:269:9: sparse: expected void *ptr include/linux/seqlock.h:269:9: sparse: got int [noderef] __percpu * include/linux/seqlock.h:269:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got int [noderef] __percpu * @@ include/linux/seqlock.h:269:9: sparse: expected void *ptr include/linux/seqlock.h:269:9: sparse: got int [noderef] __percpu * include/linux/seqlock.h:269:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got int [noderef] __percpu * @@ include/linux/seqlock.h:269:9: sparse: expected void *ptr include/linux/seqlock.h:269:9: sparse: got int [noderef] __percpu * include/linux/seqlock.h:269:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got int [noderef] __percpu * @@ include/linux/seqlock.h:269:9: sparse: expected void *ptr include/linux/seqlock.h:269:9: sparse: got int [noderef] __percpu * include/linux/seqlock.h:269:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got unsigned int [noderef] __percpu * @@ include/linux/seqlock.h:269:9: sparse: expected void *ptr include/linux/seqlock.h:269:9: sparse: got unsigned int [noderef] __percpu * include/linux/seqlock.h:269:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got unsigned int [noderef] __percpu * @@ include/linux/seqlock.h:269:9: sparse: expected void *ptr include/linux/seqlock.h:269:9: sparse: got unsigned int [noderef] __percpu * include/linux/seqlock.h:269:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got unsigned int [noderef] __percpu * @@ include/linux/seqlock.h:269:9: sparse: expected void *ptr include/linux/seqlock.h:269:9: sparse: got unsigned int [noderef] __percpu * include/linux/seqlock.h:269:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got unsigned int [noderef] __percpu * @@ include/linux/seqlock.h:269:9: sparse: expected void *ptr include/linux/seqlock.h:269:9: sparse: got unsigned int [noderef] __percpu * vim +1304 fs/bcachefs/btree_gc.c 1277 1278 static int bch2_gc_start(struct bch_fs *c, 1279 bool metadata_only) 1280 { 1281 struct bch_dev *ca = NULL; 1282 unsigned i; 1283 1284 BUG_ON(c->usage_gc); 1285 1286 c->usage_gc = __alloc_percpu_gfp(fs_usage_u64s(c) * sizeof(u64), 1287 sizeof(u64), GFP_KERNEL); 1288 if (!c->usage_gc) { 1289 bch_err(c, "error allocating c->usage_gc"); 1290 return -ENOMEM; 1291 } 1292 1293 for_each_member_device(ca, c, i) { 1294 BUG_ON(ca->buckets_gc); 1295 BUG_ON(ca->usage_gc); 1296 1297 ca->usage_gc = alloc_percpu(struct bch_dev_usage); 1298 if (!ca->usage_gc) { 1299 bch_err(c, "error allocating ca->usage_gc"); 1300 percpu_ref_put(&ca->ref); 1301 return -ENOMEM; 1302 } 1303 > 1304 this_cpu_write(ca->usage_gc->d[BCH_DATA_free].buckets, 1305 ca->mi.nbuckets - ca->mi.first_bucket); 1306 } 1307 1308 return 0; 1309 } 1310 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki