Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 28C2CC433B4 for ; Fri, 21 May 2021 12:30:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 05CB6613CB for ; Fri, 21 May 2021 12:30:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233314AbhEUMbm (ORCPT ); Fri, 21 May 2021 08:31:42 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:5657 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229457AbhEUMbg (ORCPT ); Fri, 21 May 2021 08:31:36 -0400 Received: from dggems702-chm.china.huawei.com (unknown [172.30.72.58]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4Fmm8D1NYGz1BPTy; Fri, 21 May 2021 20:27:24 +0800 (CST) Received: from dggemi762-chm.china.huawei.com (10.1.198.148) by dggems702-chm.china.huawei.com (10.3.19.179) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2176.2; Fri, 21 May 2021 20:30:11 +0800 Received: from linux-lmwb.huawei.com (10.175.103.112) by dggemi762-chm.china.huawei.com (10.1.198.148) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Fri, 21 May 2021 20:30:11 +0800 From: Zou Wei To: , , CC: , Zou Wei Subject: [PATCH -next] dm btree: make symbol 'shadow_child' static Date: Fri, 21 May 2021 20:48:56 +0800 Message-ID: <1621601336-11279-1-git-send-email-zou_wei@huawei.com> X-Mailer: git-send-email 2.6.2 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.103.112] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggemi762-chm.china.huawei.com (10.1.198.148) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The sparse tool complains as follows: drivers/md/persistent-data/dm-btree.c:696:5: warning: symbol 'shadow_child' was not declared. Should it be static? This symbol is not used outside of dm-btree.c, so marks it static. Reported-by: Hulk Robot Signed-off-by: Zou Wei --- drivers/md/persistent-data/dm-btree.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/md/persistent-data/dm-btree.c b/drivers/md/persistent-data/dm-btree.c index b8d21b6..a29bcb8 100644 --- a/drivers/md/persistent-data/dm-btree.c +++ b/drivers/md/persistent-data/dm-btree.c @@ -693,8 +693,10 @@ static int split_one_into_two(struct shadow_spine *s, unsigned parent_index, * child of the given parent node. Making sure to update the parent to point * to the new shadow. */ -int shadow_child(struct dm_btree_info *info, struct dm_btree_value_type *vt, - struct btree_node *parent, unsigned index, struct dm_block **result) +static int shadow_child(struct dm_btree_info *info, + struct dm_btree_value_type *vt, + struct btree_node *parent, + unsigned index, struct dm_block **result) { int r, inc; dm_block_t root; -- 2.6.2