From patchwork Wed Dec 21 06:00:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vernon Yang X-Patchwork-Id: 13078462 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 5F2DEC4332F for ; Wed, 21 Dec 2022 06:01:31 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 84DCC8E0002; Wed, 21 Dec 2022 01:01:30 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 7FD838E0001; Wed, 21 Dec 2022 01:01:30 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6EC3D8E0002; Wed, 21 Dec 2022 01:01:30 -0500 (EST) 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 604028E0001 for ; Wed, 21 Dec 2022 01:01:30 -0500 (EST) Received: from smtpin15.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 33ED74082A for ; Wed, 21 Dec 2022 06:01:30 +0000 (UTC) X-FDA: 80265266340.15.39C3D47 Received: from mail-pf1-f171.google.com (mail-pf1-f171.google.com [209.85.210.171]) by imf17.hostedemail.com (Postfix) with ESMTP id 8820D40018 for ; Wed, 21 Dec 2022 06:01:27 +0000 (UTC) Authentication-Results: imf17.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=d1XJ0LC7; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf17.hostedemail.com: domain of vernon2gm@gmail.com designates 209.85.210.171 as permitted sender) smtp.mailfrom=vernon2gm@gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1671602487; 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-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=qMWDOSwDa2fJZaK2qvEdhPYi5mJW5ESN2yWnqdHTXKY=; b=epXupLtGuRrCSWud70ltBYKUE0vsH4PAcAg/cJ21L9nCSNRad5YI/+zAHopD04XXs4TEMa R0Hh4vaJySO6nGuoqVDxUqjjUBB9wED2BPDJyJuSijg6znSH4A15BrAtJGuRcZInTMNtvF Ia7F8qiOCy1xVcMWqRRQhS/KGXuDUxY= ARC-Authentication-Results: i=1; imf17.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=d1XJ0LC7; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf17.hostedemail.com: domain of vernon2gm@gmail.com designates 209.85.210.171 as permitted sender) smtp.mailfrom=vernon2gm@gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1671602487; a=rsa-sha256; cv=none; b=G7OvEscq9nsGN7wSfJQG8QlHiOc5qwJQxIpimy4XV8XiHhkRisN5Y51UtYiq5SPSm6/nfj dOndL9+5eD0D0waV+q1ZksfqVhKzib46SOMTgEA+RGscOTYuEikTYvKZKl4VttqYaG4QtA K99wo40tGwn4/cHceG02aQE/yQdeWBk= Received: by mail-pf1-f171.google.com with SMTP id t18so9957988pfq.13 for ; Tue, 20 Dec 2022 22:01:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=qMWDOSwDa2fJZaK2qvEdhPYi5mJW5ESN2yWnqdHTXKY=; b=d1XJ0LC7K62G/BE2GJcMMB4lKX9S5DOWXKebJXBuG/f7WGlZYWo0Y/8x2TsIPYhQRo pa7+Zr+vV9Yx72kCfj+DM0gedruzyMtl2bPAcBEPFY2rP+7qu4MZYbGdxTPsIkp1EvvE twKa/x/J5/vM0gn+jcde+3MBUbrnLoAWIdfzhh63cunZPKW5iP+BzOJKLeGD13VSuKcL FupTfz5c9Euqf2z+ULNQOqw7T13CK5ke7g03R02/TkJ6G6mpuPUn0w3ToDSvMid1QouI os8jivNy3tPNgFuw4UM+0J1X0mx2vUHH787gV0q3ZuTjcxGSHd36s/QhOYvBPzzRDuoD ShRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=qMWDOSwDa2fJZaK2qvEdhPYi5mJW5ESN2yWnqdHTXKY=; b=HsN4PaxuCrF/50gYj5UunqVlFhjES3JZm5Wkf5j1oCILyYfeTqcmsD80yXw3qxGJ7c o+vCn4STXFzOwVyLjNGWl0Nj8STRMyMVi/f8U8kOOl9bRQoPKNz2ahUMTrvzXzyw/Eia FseeoW0x0qX2EiYhI1MWwx3UnHhKw+VPTaatjzAzdUZJQm6EEr4vHl+iN2VHgU8XmSVO o0nXIBF+o6+G1ve80eH7PmM0D4f5q9cpiS9ZlTaBxODIKjyM4ExKzej+Xz73M4+cUbNc 8AVxVB8PCgOvp9wNtV5cPL6dDMfJLSz7z05X/IpX6Mu80tvrGs95hb3PU0mEvr+kn88G XN/A== X-Gm-Message-State: AFqh2koJSQFAiakpZH9+jU+NRt5figOrjFmQnDQOYx5yRKQ+weflVhGp kwphqw6FSwoH6CA4g8YwFg6yQd1R63mJkReS X-Google-Smtp-Source: AMrXdXsCM96KvIVOVe3Zhf07YYI64smG+DMZpPQxHyRJJeMjLIijY/PARh+DkRgyM1DYJcTeBFUlgw== X-Received: by 2002:aa7:9d1e:0:b0:56c:3ed0:1f9d with SMTP id k30-20020aa79d1e000000b0056c3ed01f9dmr972403pfp.17.1671602486390; Tue, 20 Dec 2022 22:01:26 -0800 (PST) Received: from vernon-pc.. ([114.231.52.81]) by smtp.gmail.com with ESMTPSA id w7-20020a626207000000b00562677968aesm9598886pfb.72.2022.12.20.22.01.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Dec 2022 22:01:25 -0800 (PST) From: Vernon Yang To: Liam.Howlett@oracle.com, akpm@linux-foundation.org Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, maple-tree@lists.infradead.org, Vernon Yang Subject: [PATCH v2 1/7] maple_tree: remove extra space and blank line Date: Wed, 21 Dec 2022 14:00:52 +0800 Message-Id: <20221221060058.609003-2-vernon2gm@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221221060058.609003-1-vernon2gm@gmail.com> References: <20221221060058.609003-1-vernon2gm@gmail.com> MIME-Version: 1.0 X-Rspam-User: X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 8820D40018 X-Stat-Signature: ad77xse3h6yy1x8qaicjjk86kuap919f X-HE-Tag: 1671602487-584917 X-HE-Meta: U2FsdGVkX18mmP1boMktuwyr36Pqt7rwL3KoNmc4TNJ440U2URAWkKDOLh72nBI5zN6DvsDiU2NlU6m+SANbeZsMgh+oDU9i17WQJIpYgAOgP7m0v3CXS30V57qSQQAdHwq+JKB/JJtpNbebfTYJ9bcofIBFRqmHxAoqgDCACKjcZYOmjOw4D+ELnwT8Re3d1O524XlM+9kCNy+1k+Z9XD1y/um2rBX7z9DU19c0tpkS+Bu9Rp5VJH0PhJC1c7MkLGo51EtiJEx2rr8P6Lq77LV4LjBZPBx6KUQ0aDdcMWlI9LXFgeyfuFrYbkA4N3nkXcDJTfsz5wKzlAy3X4TH2iHh3ZG7IY8ACa29wbnrt1EYKFcyRbsyTnxUls57qIcrwvgXNg7mAaM6HrKLCOM0r0LYtmr8jBORTQ6dgylYVIgPtRcIlpLuAC8DiwIOlJMrOAcropOTbSoF9je1Rc6voGylOPBDyN466c4mFNQ6NQpkKQEK7sU0bYXf+kc3s4XaUztAfDd8UP4w8cYSfMwFP9CRFCrqxOAsV/9iCidO20gMoz9oIZ9v5KNYS1wZkBj3BWkFU+chmXaCIuPWoBrfAY54ZlGeifUu9a3XQNv0QX65t0pVXwlKviLQR7/pmA759D6vPbMLRS4scKqLxskGWP6E4ccBg2Q9XezFJTJRMRfpT3vBQ9m4nP3HOtvQX0naahEO2KQ32ND5fDWaC+HbWdu5Q+531yp/HOAkziFSxUMw15E54CHZ3VeqVYRr/QfczvDDfm8eVQRf7X8wg1vzG77xQPwfzcaessAvjULRYFsfZ8nOZHWtDiD8THvoDKzUltVJFsSChDwV3hBw2390/pt9HXXla68ii6PHL54o/WWERnLM9MzsUuvpCJf35sEBKtEFcfom/CUuB0kVMfPw5gWZhdcPLTmjdVLjD5ApLHQAuOaEnde2zWbhbxJCoWqlYuErSJaF4b7ZxEJhFkW dz1jfSX+ 82jCkGBZ21OlSNlLVwwLnaM4DlOlsKml64yMUYvT6GbHUVs1StACF2Ok9BXs/CC2IB8OI+iAPXnClErLMmiuxZjj9tPygevFUZsy4sh77SlMjv9u06Olb/5SRc57T+Ahx7C78D7eFRxc47Y5+s6ijumHatGfd9kpAkkO1fv2hmwirtXg= 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: These extra space and blank line is unnecessary, so drop it. Reviewed-by: Liam R. Howlett Signed-off-by: Vernon Yang --- include/linux/maple_tree.h | 2 -- lib/maple_tree.c | 14 ++++---------- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/include/linux/maple_tree.h b/include/linux/maple_tree.h index e594db58a0f1..4ee5a969441c 100644 --- a/include/linux/maple_tree.h +++ b/include/linux/maple_tree.h @@ -517,7 +517,6 @@ static inline void mas_reset(struct ma_state *mas) * entry. * * Note: may return the zero entry. - * */ #define mas_for_each(__mas, __entry, __max) \ while (((__entry) = mas_find((__mas), (__max))) != NULL) @@ -639,7 +638,6 @@ static inline void mt_set_in_rcu(struct maple_tree *mt) } static inline unsigned int mt_height(const struct maple_tree *mt) - { return (mt->ma_flags & MT_FLAGS_HEIGHT_MASK) >> MT_FLAGS_HEIGHT_OFFSET; } diff --git a/lib/maple_tree.c b/lib/maple_tree.c index fe3947b80069..8ace65a5eea5 100644 --- a/lib/maple_tree.c +++ b/lib/maple_tree.c @@ -183,7 +183,6 @@ static void ma_free_rcu(struct maple_node *node) call_rcu(&node->rcu, mt_free_rcu); } - static void mas_set_height(struct ma_state *mas) { unsigned int new_flags = mas->tree->ma_flags; @@ -468,7 +467,7 @@ static inline void mte_set_parent(struct maple_enode *enode, const struct maple_enode *parent, unsigned char slot) { - unsigned long val = (unsigned long) parent; + unsigned long val = (unsigned long)parent; unsigned long shift; unsigned long type; enum maple_type p_type = mte_node_type(parent); @@ -502,7 +501,7 @@ void mte_set_parent(struct maple_enode *enode, const struct maple_enode *parent, */ static inline unsigned int mte_parent_slot(const struct maple_enode *enode) { - unsigned long val = (unsigned long) mte_to_node(enode)->parent; + unsigned long val = (unsigned long)mte_to_node(enode)->parent; /* Root. */ if (val & 1) @@ -1278,7 +1277,6 @@ static inline void mas_alloc_nodes(struct ma_state *mas, gfp_t gfp) mas->alloc->total = success; mas_set_err(mas, -ENOMEM); return; - } /* @@ -2946,7 +2944,7 @@ static inline void *mtree_range_walk(struct ma_state *mas) mas->min = prev_min; mas->max = prev_max; mas->node = last; - return (void *) next; + return (void *)next; dead_node: mas_reset(mas); @@ -3464,7 +3462,6 @@ static inline bool mas_push_data(struct ma_state *mas, int height, */ static int mas_split(struct ma_state *mas, struct maple_big_node *b_node) { - struct maple_subtree_state mast; int height = 0; unsigned char mid_split, split = 0; @@ -3890,7 +3887,7 @@ static inline void *mtree_lookup_walk(struct ma_state *mas) goto dead_node; } while (!ma_is_leaf(type)); - return (void *) next; + return (void *)next; dead_node: mas_reset(mas); @@ -4708,7 +4705,6 @@ static inline void *mas_next_nentry(struct ma_state *mas, static inline void mas_rewalk(struct ma_state *mas, unsigned long index) { - retry: mas_set(mas, index); mas_state_walk(mas); @@ -4716,7 +4712,6 @@ static inline void mas_rewalk(struct ma_state *mas, unsigned long index) goto retry; return; - } /* @@ -5618,7 +5613,6 @@ static void mas_wr_store_setup(struct ma_wr_state *wr_mas) mas_reset(wr_mas->mas); } } - } /* Interface */