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 C59EEC43334 for ; Thu, 16 Jun 2022 15:10:11 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4C8356B0071; Thu, 16 Jun 2022 11:10:11 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 45ABE6B0074; Thu, 16 Jun 2022 11:10:11 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2A3636B0078; Thu, 16 Jun 2022 11:10:11 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 1600D6B0071 for ; Thu, 16 Jun 2022 11:10:11 -0400 (EDT) Received: from smtpin31.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id E60232050B for ; Thu, 16 Jun 2022 15:10:10 +0000 (UTC) X-FDA: 79584434580.31.BE39A02 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by imf30.hostedemail.com (Postfix) with ESMTP id 1267C8009E for ; Thu, 16 Jun 2022 15:10:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1655392209; x=1686928209; h=date:from:to:cc:subject:message-id:mime-version; bh=qD6/1DdRq8T9O10VpV/Go+Sup0rtxVaqgKH7guLGtYs=; b=Ee6QHg5zW1dB5gXp2m+GxpEr0n59sWeAUr64oitQZWCrJFfPRbrmKyc7 JtJRa+23ta2tMJiVfCbJkwjnf2IBbW59xN60CDpWztzz+O2108sto/gX0 009mAGqGPXsgZCuwu6kW8c2AsYunm12gR6OyMr5Hfr00LNTehmZHeqEbe FoxaPeeW6LKnnxKJgJBn5nUmrIsVOYW+1nxpLehjhHnmBA1yVo1V5GW6V PnX2SqKe+hl8Ce+L9Z4vw39DC/UeK5NQsNSaiz+fcepFQha+rEpvpYP+S /787Tk9Z1zXp0D3iqmqesgbOy1buQPjgdmIASareyF9FkUlnhRKOQJhL/ A==; X-IronPort-AV: E=McAfee;i="6400,9594,10379"; a="304713572" X-IronPort-AV: E=Sophos;i="5.92,305,1650956400"; d="scan'208";a="304713572" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Jun 2022 08:10:06 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,305,1650956400"; d="scan'208";a="536481845" Received: from lkp-server01.sh.intel.com (HELO 60dabacc1df6) ([10.239.97.150]) by orsmga003.jf.intel.com with ESMTP; 16 Jun 2022 08:10:03 -0700 Received: from kbuild by 60dabacc1df6 with local (Exim 4.95) (envelope-from ) id 1o1r8F-000OTt-6p; Thu, 16 Jun 2022 15:10:03 +0000 Date: Thu, 16 Jun 2022 23:09:37 +0800 From: kernel test robot To: Liam Howlett Cc: kbuild-all@lists.01.org, Linux Memory Management List , Andrew Morton , "Liam R. Howlett" Subject: [linux-next:master 3611/4062] lib/maple_tree.c:4022 mas_wr_spanning_store() warn: inconsistent indenting Message-ID: <202206162357.8GGQoQpW-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline ARC-Authentication-Results: i=1; imf30.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=Ee6QHg5z; dmarc=pass (policy=none) header.from=intel.com; spf=none (imf30.hostedemail.com: domain of lkp@intel.com has no SPF policy when checking 192.55.52.88) smtp.mailfrom=lkp@intel.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1655392209; 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=gBf4qfgSXd2RYFGK+mbqmDiYWhi1Kdh+jqImyLKYnvU=; b=XRhZfLhQfG86VKgVJRArd/viqdWY5OICol4+HDKK/U5uWYMVu/+QceZRCDZldQhX/a+U69 Le1685dKxH3TbdguLovkVWXKa/jVUXKwocrB5BhtrDw0Yla+KMLImDkHWGpfv1fX9aj7mj yKhHnGWPrbw9YcrDjIi9DjNpK1yG1Nw= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1655392209; a=rsa-sha256; cv=none; b=YExLh3MRdfxgOK77wcxfkfp1f8Gq6DZGL/EKpzMEzL5SLHB1/b+7gwhx5hAQ/rdw0gFCo8 qe0V+4gFmUdP3+Ku3KgfuvT9mbXsf/Vh0zfFP1PodK1op+x8sDiRNO6C6QT5IaPf9q97/y V6/WcRuuos3qw+52ZtzJUNv6ikvnJ6E= X-Stat-Signature: off9qso6jfkunz9j38f4djjh14s9fdwg X-Rspamd-Queue-Id: 1267C8009E X-Rspam-User: Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=Ee6QHg5z; dmarc=pass (policy=none) header.from=intel.com; spf=none (imf30.hostedemail.com: domain of lkp@intel.com has no SPF policy when checking 192.55.52.88) smtp.mailfrom=lkp@intel.com X-Rspamd-Server: rspam10 X-HE-Tag: 1655392208-167840 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: c6d7e3b385f19869ab96e9404c92ff1abc34f2c8 commit: 5b979a0bc9ed8749e385a651f53c3a923cbaba9e [3611/4062] maple_tree: change spanning store to work on larger trees config: x86_64-randconfig-m001 (https://download.01.org/0day-ci/archive/20220616/202206162357.8GGQoQpW-lkp@intel.com/config) compiler: gcc-11 (Debian 11.3.0-3) 11.3.0 If you fix the issue, kindly add following tag where applicable Reported-by: kernel test robot smatch warnings: lib/maple_tree.c:4022 mas_wr_spanning_store() warn: inconsistent indenting vim +4022 lib/maple_tree.c 3886 3887 /* 3888 * mas_new_root() - Create a new root node that only contains the entry passed 3889 * in. 3890 * @mas: The maple state 3891 * @entry: The entry to store. 3892 * 3893 * Only valid when the index == 0 and the last == ULONG_MAX 3894 * 3895 * Return 0 on error, 1 on success. 3896 */ 3897 static inline int mas_new_root(struct ma_state *mas, void *entry) 3898 { 3899 struct maple_enode *root = mas_root_locked(mas); 3900 enum maple_type type = maple_leaf_64; 3901 struct maple_node *node; 3902 void __rcu **slots; 3903 unsigned long *pivots; 3904 3905 if (!entry && !mas->index && mas->last == ULONG_MAX) { 3906 mas->depth = 0; 3907 mas_set_height(mas); 3908 rcu_assign_pointer(mas->tree->ma_root, entry); 3909 mas->node = MAS_START; 3910 goto done; 3911 } 3912 3913 mas_node_count(mas, 1); 3914 if (mas_is_err(mas)) 3915 return 0; 3916 3917 node = mas_pop_node(mas); 3918 pivots = ma_pivots(node, type); 3919 slots = ma_slots(node, type); 3920 node->parent = ma_parent_ptr( 3921 ((unsigned long)mas->tree | MA_ROOT_PARENT)); 3922 mas->node = mt_mk_node(node, type); 3923 rcu_assign_pointer(slots[0], entry); 3924 pivots[0] = mas->last; 3925 mas->depth = 1; 3926 mas_set_height(mas); 3927 rcu_assign_pointer(mas->tree->ma_root, mte_mk_root(mas->node)); 3928 3929 done: 3930 if (xa_is_node(root)) 3931 mte_destroy_walk(root, mas->tree); 3932 3933 return 1; 3934 } 3935 /* 3936 * mas_wr_spanning_store() - Create a subtree with the store operation completed 3937 * and new nodes where necessary, then place the sub-tree in the actual tree. 3938 * Note that mas is expected to point to the node which caused the store to 3939 * span. 3940 * @wr_mas: The maple write state 3941 * 3942 * Return: 0 on error, positive on success. 3943 */ 3944 static inline int mas_wr_spanning_store(struct ma_wr_state *wr_mas) 3945 { 3946 struct maple_subtree_state mast; 3947 struct maple_big_node b_node; 3948 struct ma_state *mas; 3949 unsigned char height; 3950 3951 /* Left and Right side of spanning store */ 3952 MA_STATE(l_mas, NULL, 0, 0); 3953 MA_STATE(r_mas, NULL, 0, 0); 3954 3955 MA_WR_STATE(r_wr_mas, &r_mas, wr_mas->entry); 3956 MA_WR_STATE(l_wr_mas, &l_mas, wr_mas->entry); 3957 3958 /* 3959 * A store operation that spans multiple nodes is called a spanning 3960 * store and is handled early in the store call stack by the function 3961 * mas_is_span_wr(). When a spanning store is identified, the maple 3962 * state is duplicated. The first maple state walks the left tree path 3963 * to ``index``, the duplicate walks the right tree path to ``last``. 3964 * The data in the two nodes are combined into a single node, two nodes, 3965 * or possibly three nodes (see the 3-way split above). A ``NULL`` 3966 * written to the last entry of a node is considered a spanning store as 3967 * a rebalance is required for the operation to complete and an overflow 3968 * of data may happen. 3969 */ 3970 mas = wr_mas->mas; 3971 trace_ma_op(__func__, mas); 3972 3973 if (unlikely(!mas->index && mas->last == ULONG_MAX)) 3974 return mas_new_root(mas, wr_mas->entry); 3975 /* 3976 * Node rebalancing may occur due to this store, so there may be two new 3977 * entries per level plus a new root. 3978 */ 3979 height = mas_mt_height(mas); 3980 mas_node_count(mas, 1 + height * 3); 3981 if (mas_is_err(mas)) 3982 return 0; 3983 3984 /* 3985 * Set up right side. Need to get to the next offset after the spanning 3986 * store to ensure it's not NULL and to combine both the next node and 3987 * the node with the start together. 3988 */ 3989 r_mas = *mas; 3990 /* Avoid overflow, walk to next slot in the tree. */ 3991 if (r_mas.last + 1) 3992 r_mas.last++; 3993 3994 r_mas.index = r_mas.last; 3995 mas_wr_walk_index(&r_wr_mas); 3996 r_mas.last = r_mas.index = mas->last; 3997 3998 /* Set up left side. */ 3999 l_mas = *mas; 4000 mas_wr_walk_index(&l_wr_mas); 4001 4002 if (!wr_mas->entry) { 4003 mas_extend_spanning_null(&l_wr_mas, &r_wr_mas); 4004 mas->offset = l_mas.offset; 4005 mas->index = l_mas.index; 4006 mas->last = l_mas.last = r_mas.last; 4007 } 4008 4009 memset(&b_node, 0, sizeof(struct maple_big_node)); 4010 /* Copy l_mas and store the value in b_node. */ 4011 mas_store_b_node(&l_wr_mas, &b_node, l_wr_mas.node_end); 4012 /* Copy r_mas into b_node. */ 4013 if (r_mas.offset <= r_wr_mas.node_end) 4014 mas_mab_cp(&r_mas, r_mas.offset, r_wr_mas.node_end, 4015 &b_node, b_node.b_end + 1); 4016 /* Stop spanning searches by searching for just index. */ 4017 l_mas.index = l_mas.last = mas->index; 4018 4019 mast.bn = &b_node; 4020 mast.orig_l = &l_mas; 4021 mast.orig_r = &r_mas; > 4022 if (mte_dead_node(mast.orig_l->node) || 4023 mte_dead_node(mast.orig_r->node)) { 4024 printk("FUCKED. l is %s and r is %s\n", 4025 mte_dead_node(mast.orig_l->node) ? "dead" : "alive", 4026 mte_dead_node(mast.orig_r->node) ? "dead" : "alive"); 4027 printk("Writing %lu-%lu\n", mas->index, mas->last); 4028 } 4029 /* Combine l_mas and r_mas and split them up evenly again. */ 4030 return mas_spanning_rebalance(mas, &mast, height + 1); 4031 } 4032 -- 0-DAY CI Kernel Test Service https://01.org/lkp