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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 953F8EE0212 for ; Wed, 13 Sep 2023 23:40:25 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 92D166B0283; Wed, 13 Sep 2023 19:40:24 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8DD9A6B0288; Wed, 13 Sep 2023 19:40:24 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7A4D66B0289; Wed, 13 Sep 2023 19:40:24 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 688686B0283 for ; Wed, 13 Sep 2023 19:40:24 -0400 (EDT) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 2A0DC80541 for ; Wed, 13 Sep 2023 23:40:24 +0000 (UTC) X-FDA: 81233195568.05.D7FEFD6 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.100]) by imf19.hostedemail.com (Postfix) with ESMTP id 30CCF1A0003 for ; Wed, 13 Sep 2023 23:40:20 +0000 (UTC) Authentication-Results: imf19.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=IJZo+f1U; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf19.hostedemail.com: domain of lkp@intel.com designates 134.134.136.100 as permitted sender) smtp.mailfrom=lkp@intel.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1694648422; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding:in-reply-to: references:dkim-signature; bh=PY76WojX1ON6I6HXF0H8DUl6gfFtVLfLew9ryLY1LL8=; b=BvNQJr2CDNeQZbKg03WMEGv8GixPdOWJV5cGBlUStsazwfkZw5+k7LybG4Z3sAzxnSd80r rkqcI8D2F9UABy1racxIaUKWvDtsy1HkJdGChIHnBmomlToXtN8OtWJU8E40WHXJFkqfAO YdG9vh4NJKeosd+owHD661kWoCu5grI= ARC-Authentication-Results: i=1; imf19.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=IJZo+f1U; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf19.hostedemail.com: domain of lkp@intel.com designates 134.134.136.100 as permitted sender) smtp.mailfrom=lkp@intel.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1694648422; a=rsa-sha256; cv=none; b=OXJSlrgJ53XMs3ZS80VEoUQlVJpzpjFCTE6Xxl+jCzzBDRVcdpGSM0CJ+iM+11vtNsKr6P nCM8CiE5oN92++kZSflgtCBqLUqx7GDweqMRxDFG45Snoz5rLL0XBbi9hIUYK/fFlZHGcw NopNS/+fCFDCgWkM5ovxWDMTxhUXPco= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1694648421; x=1726184421; h=date:from:to:cc:subject:message-id:mime-version; bh=C1FDyltSoQ3qjQLQbuNS/6kccI9mTJ4EheIrqfUnPWo=; b=IJZo+f1UvkvJJ1P2HI0q3MvAiSopHdbBachuPlFTlUVqDrE0t6Pen2RP YHbW7v7Ah3uJGzBedH+cq086I1141lkhYRlyvVf5DDkJFOYtHe9kQi5SS UGaDVZjsIC0m42/lZX84R8Yn52Fb+cqWoW4JX8Kcm8snhNpTryFUZcdE5 foa3KLSm2SVprZSO3lDpUjnS3Zy4icCiX36IPF7NG9IuAaK+Nd6bpsk56 YqYuxF0zlvgzLS3/ImzZQkcLgt2KZUeuqsIIcXofHnGgzan1GfhT/xzbN 5vvwIwkRKT0E77lPyj0HyBm49H/nmkLeKJHTDfTAsjqammCyLhOJrHIOL A==; X-IronPort-AV: E=McAfee;i="6600,9927,10832"; a="445244049" X-IronPort-AV: E=Sophos;i="6.02,144,1688454000"; d="scan'208";a="445244049" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Sep 2023 16:40:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10832"; a="834516968" X-IronPort-AV: E=Sophos;i="6.02,144,1688454000"; d="scan'208";a="834516968" Received: from lkp-server02.sh.intel.com (HELO 9ef86b2655e5) ([10.239.97.151]) by FMSMGA003.fm.intel.com with ESMTP; 13 Sep 2023 16:40:06 -0700 Received: from kbuild by 9ef86b2655e5 with local (Exim 4.96) (envelope-from ) id 1qgZSn-0000oj-00; Wed, 13 Sep 2023 23:40:05 +0000 Date: Thu, 14 Sep 2023 07:39:56 +0800 From: kernel test robot To: Kent Overstreet Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev, Linux Memory Management List Subject: [linux-next:master 3807/4552] fs/bcachefs/snapshot.c:942:5: warning: no previous prototype for function 'bch2_snapshot_node_delete' Message-ID: <202309140719.SIXNytRW-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Rspam-User: X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 30CCF1A0003 X-Stat-Signature: o3op7jiuut54zjg6rczi871er5stobuf X-HE-Tag: 1694648420-160162 X-HE-Meta: U2FsdGVkX19F4loAR+6t70deC4AH90WN30NIbsKWC/6T0wu2ZUGKQz1XoT76rnOvMVR6mstzUmA3wfT/DwShelHhoQApgjHIcgPFrwqj457GNv+8PZinDUCn5yhb0Xe2OwOKPD0M6XhoKYivSITEnmETI8MDQetzVkX9Fhy5VXRiI55AnI153Mk+MLPc1eN8+YrR0J3NRogOiI8zPXsRsfY42c2HdBLw9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wTgEXkGJPzbWfn9RJ1D51B01AzNkqVAe22LM8jZc+Vj5wfT X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: e143016b56ecb0fcda5bb6026b0a25fe55274f56 commit: c25d6a495d7f6c73c4f14d31c5e1b80ff8cbe338 [3807/4552] bcachefs: Cleanup redundant snapshot nodes config: powerpc-randconfig-r006-20230912 (https://download.01.org/0day-ci/archive/20230914/202309140719.SIXNytRW-lkp@intel.com/config) compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project.git 4a5ac14ee968ff0ad5d2cc1ffa0299048db4c88a) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230914/202309140719.SIXNytRW-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/202309140719.SIXNytRW-lkp@intel.com/ All warnings (new ones prefixed by >>): In file included from fs/bcachefs/snapshot.c:3: In file included from fs/bcachefs/bcachefs.h:188: In file included from include/linux/bio.h:10: In file included from include/linux/blk_types.h:10: In file included from include/linux/bvec.h:10: In file included from include/linux/highmem.h:12: In file included from include/linux/hardirq.h:11: In file included from arch/powerpc/include/asm/hardirq.h:6: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/powerpc/include/asm/io.h:672: arch/powerpc/include/asm/io-defs.h:47:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 47 | DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c), | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 48 | (p, b, c), pio, p) | ~~~~~~~~~~~~~~~~~~ arch/powerpc/include/asm/io.h:669:3: note: expanded from macro 'DEF_PCI_AC_NORET' 669 | __do_##name al; \ | ^~~~~~~~~~~~~~ :211:1: note: expanded from here 211 | __do_insl | ^ arch/powerpc/include/asm/io.h:611:56: note: expanded from macro '__do_insl' 611 | #define __do_insl(p, b, n) readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n)) | ~~~~~~~~~~~~~~~~~~~~~^ In file included from fs/bcachefs/snapshot.c:3: In file included from fs/bcachefs/bcachefs.h:188: In file included from include/linux/bio.h:10: In file included from include/linux/blk_types.h:10: In file included from include/linux/bvec.h:10: In file included from include/linux/highmem.h:12: In file included from include/linux/hardirq.h:11: In file included from arch/powerpc/include/asm/hardirq.h:6: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/powerpc/include/asm/io.h:672: arch/powerpc/include/asm/io-defs.h:49:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 49 | DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c), | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 50 | (p, b, c), pio, p) | ~~~~~~~~~~~~~~~~~~ arch/powerpc/include/asm/io.h:669:3: note: expanded from macro 'DEF_PCI_AC_NORET' 669 | __do_##name al; \ | ^~~~~~~~~~~~~~ :213:1: note: expanded from here 213 | __do_outsb | ^ arch/powerpc/include/asm/io.h:612:58: note: expanded from macro '__do_outsb' 612 | #define __do_outsb(p, b, n) writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n)) | ~~~~~~~~~~~~~~~~~~~~~^ In file included from fs/bcachefs/snapshot.c:3: In file included from fs/bcachefs/bcachefs.h:188: In file included from include/linux/bio.h:10: In file included from include/linux/blk_types.h:10: In file included from include/linux/bvec.h:10: In file included from include/linux/highmem.h:12: In file included from include/linux/hardirq.h:11: In file included from arch/powerpc/include/asm/hardirq.h:6: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/powerpc/include/asm/io.h:672: arch/powerpc/include/asm/io-defs.h:51:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 51 | DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c), | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 52 | (p, b, c), pio, p) | ~~~~~~~~~~~~~~~~~~ arch/powerpc/include/asm/io.h:669:3: note: expanded from macro 'DEF_PCI_AC_NORET' 669 | __do_##name al; \ | ^~~~~~~~~~~~~~ :215:1: note: expanded from here 215 | __do_outsw | ^ arch/powerpc/include/asm/io.h:613:58: note: expanded from macro '__do_outsw' 613 | #define __do_outsw(p, b, n) writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n)) | ~~~~~~~~~~~~~~~~~~~~~^ In file included from fs/bcachefs/snapshot.c:3: In file included from fs/bcachefs/bcachefs.h:188: In file included from include/linux/bio.h:10: In file included from include/linux/blk_types.h:10: In file included from include/linux/bvec.h:10: In file included from include/linux/highmem.h:12: In file included from include/linux/hardirq.h:11: In file included from arch/powerpc/include/asm/hardirq.h:6: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/powerpc/include/asm/io.h:672: arch/powerpc/include/asm/io-defs.h:53:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 53 | DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c), | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 54 | (p, b, c), pio, p) | ~~~~~~~~~~~~~~~~~~ arch/powerpc/include/asm/io.h:669:3: note: expanded from macro 'DEF_PCI_AC_NORET' 669 | __do_##name al; \ | ^~~~~~~~~~~~~~ :217:1: note: expanded from here 217 | __do_outsl | ^ arch/powerpc/include/asm/io.h:614:58: note: expanded from macro '__do_outsl' 614 | #define __do_outsl(p, b, n) writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n)) | ~~~~~~~~~~~~~~~~~~~~~^ >> fs/bcachefs/snapshot.c:942:5: warning: no previous prototype for function 'bch2_snapshot_node_delete' [-Wmissing-prototypes] 942 | int bch2_snapshot_node_delete(struct btree_trans *trans, u32 id) | ^ fs/bcachefs/snapshot.c:942:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 942 | int bch2_snapshot_node_delete(struct btree_trans *trans, u32 id) | ^ | static 7 warnings generated. Kconfig warnings: (for reference only) WARNING: unmet direct dependencies detected for HOTPLUG_CPU Depends on [n]: SMP [=y] && (PPC_PSERIES [=n] || PPC_PMAC [=n] || PPC_POWERNV [=n] || FSL_SOC_BOOKE [=n]) Selected by [y]: - PM_SLEEP_SMP [=y] && SMP [=y] && (ARCH_SUSPEND_POSSIBLE [=n] || ARCH_HIBERNATION_POSSIBLE [=y]) && PM_SLEEP [=y] vim +/bch2_snapshot_node_delete +942 fs/bcachefs/snapshot.c 941 > 942 int bch2_snapshot_node_delete(struct btree_trans *trans, u32 id) 943 { 944 struct bch_fs *c = trans->c; 945 struct btree_iter iter, p_iter = (struct btree_iter) { NULL }; 946 struct btree_iter c_iter = (struct btree_iter) { NULL }; 947 struct btree_iter tree_iter = (struct btree_iter) { NULL }; 948 struct bkey_s_c_snapshot s; 949 u32 parent_id, child_id; 950 unsigned i; 951 int ret = 0; 952 953 s = bch2_bkey_get_iter_typed(trans, &iter, BTREE_ID_snapshots, POS(0, id), 954 BTREE_ITER_INTENT, snapshot); 955 ret = bkey_err(s); 956 bch2_fs_inconsistent_on(bch2_err_matches(ret, ENOENT), c, 957 "missing snapshot %u", id); 958 959 if (ret) 960 goto err; 961 962 BUG_ON(s.v->children[1]); 963 964 parent_id = le32_to_cpu(s.v->parent); 965 child_id = le32_to_cpu(s.v->children[0]); 966 967 if (parent_id) { 968 struct bkey_i_snapshot *parent; 969 970 parent = bch2_bkey_get_mut_typed(trans, &p_iter, 971 BTREE_ID_snapshots, POS(0, parent_id), 972 0, snapshot); 973 ret = PTR_ERR_OR_ZERO(parent); 974 bch2_fs_inconsistent_on(bch2_err_matches(ret, ENOENT), c, 975 "missing snapshot %u", parent_id); 976 if (unlikely(ret)) 977 goto err; 978 979 /* find entry in parent->children for node being deleted */ 980 for (i = 0; i < 2; i++) 981 if (le32_to_cpu(parent->v.children[i]) == id) 982 break; 983 984 if (bch2_fs_inconsistent_on(i == 2, c, 985 "snapshot %u missing child pointer to %u", 986 parent_id, id)) 987 goto err; 988 989 parent->v.children[i] = le32_to_cpu(child_id); 990 991 normalize_snapshot_child_pointers(&parent->v); 992 } 993 994 if (child_id) { 995 struct bkey_i_snapshot *child; 996 997 child = bch2_bkey_get_mut_typed(trans, &c_iter, 998 BTREE_ID_snapshots, POS(0, child_id), 999 0, snapshot); 1000 ret = PTR_ERR_OR_ZERO(child); 1001 bch2_fs_inconsistent_on(bch2_err_matches(ret, ENOENT), c, 1002 "missing snapshot %u", child_id); 1003 if (unlikely(ret)) 1004 goto err; 1005 1006 child->v.parent = cpu_to_le32(parent_id); 1007 1008 if (!child->v.parent) { 1009 child->v.skip[0] = 0; 1010 child->v.skip[1] = 0; 1011 child->v.skip[2] = 0; 1012 } 1013 } 1014 1015 if (!parent_id) { 1016 /* 1017 * We're deleting the root of a snapshot tree: update the 1018 * snapshot_tree entry to point to the new root, or delete it if 1019 * this is the last snapshot ID in this tree: 1020 */ 1021 struct bkey_i_snapshot_tree *s_t; 1022 1023 BUG_ON(s.v->children[1]); 1024 1025 s_t = bch2_bkey_get_mut_typed(trans, &tree_iter, 1026 BTREE_ID_snapshot_trees, POS(0, le32_to_cpu(s.v->tree)), 1027 0, snapshot_tree); 1028 ret = PTR_ERR_OR_ZERO(s_t); 1029 if (ret) 1030 goto err; 1031 1032 if (s.v->children[0]) { 1033 s_t->v.root_snapshot = s.v->children[0]; 1034 } else { 1035 s_t->k.type = KEY_TYPE_deleted; 1036 set_bkey_val_u64s(&s_t->k, 0); 1037 } 1038 } 1039 1040 ret = bch2_btree_delete_at(trans, &iter, 0); 1041 err: 1042 bch2_trans_iter_exit(trans, &tree_iter); 1043 bch2_trans_iter_exit(trans, &p_iter); 1044 bch2_trans_iter_exit(trans, &c_iter); 1045 bch2_trans_iter_exit(trans, &iter); 1046 return ret; 1047 } 1048 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki