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 ADAEEC4332F for ; Sat, 11 Nov 2023 16:19:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231307AbjKKQS7 (ORCPT ); Sat, 11 Nov 2023 11:18:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32932 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229797AbjKKQS6 (ORCPT ); Sat, 11 Nov 2023 11:18:58 -0500 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C2C5EEA for ; Sat, 11 Nov 2023 08:18:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1699719534; x=1731255534; h=date:from:to:cc:subject:message-id:mime-version; bh=PZjo+7huWc7gsxAJq9vb23Q6wNAN+H+pc7xiLHTJTk0=; b=hMHsbOyvCXr/S4LmhachvvDnvlzp3zaRYjgfZjUWFvEHERuil0Blv9F5 cgccGU1oov30O5On+nY9yzDwgFM55TgOLm3jt3A824KIXTSdmwSY5AQaa glaB/GhgvfIGNmEP7YQu/sirPPyIUTu9rkp/zqrINaFasWtBJDxs26cgk WxHLuC8508LBnt3jmD6Hd9NK0ukJFrysAG0FvWCEXAsFErbHkPSL+RvSN 4LV1dz5UV4t05IXCKkNO95/gtwWjeleyPYTvnbt0jmdKpuObXBhjcAf+H jKscAYPNzWASTEsFxDlNo2C4008BEwTT8HejOPgwekcVdDAgiHQ5msnjC A==; X-IronPort-AV: E=McAfee;i="6600,9927,10891"; a="456781837" X-IronPort-AV: E=Sophos;i="6.03,295,1694761200"; d="scan'208";a="456781837" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Nov 2023 08:18:53 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10891"; a="907678117" X-IronPort-AV: E=Sophos;i="6.03,295,1694761200"; d="scan'208";a="907678117" Received: from lkp-server01.sh.intel.com (HELO 17d9e85e5079) ([10.239.97.150]) by fmsmga001.fm.intel.com with ESMTP; 11 Nov 2023 08:18:52 -0800 Received: from kbuild by 17d9e85e5079 with local (Exim 4.96) (envelope-from ) id 1r1qh8-000AZs-1O; Sat, 11 Nov 2023 16:18:50 +0000 Date: Sun, 12 Nov 2023 00:17:54 +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: <202311120044.n5XJIFIC-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: 3ca112b71f35dd5d99fc4571a56b5fc6f0c15814 commit: 822835ffeae411bbc8af104da9331fdf63a7bc12 bcachefs: Fold bucket_state in to BCH_DATA_TYPES() date: 3 weeks ago config: loongarch-randconfig-r132-20231107 (https://download.01.org/0day-ci/archive/20231112/202311120044.n5XJIFIC-lkp@intel.com/config) compiler: loongarch64-linux-gcc (GCC) 13.2.0 reproduce: (https://download.01.org/0day-ci/archive/20231112/202311120044.n5XJIFIC-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/202311120044.n5XJIFIC-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