From patchwork Sat Aug 4 11:13:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: zhong jiang X-Patchwork-Id: 10555681 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5913813BB for ; Sat, 4 Aug 2018 11:25:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 382E02982E for ; Sat, 4 Aug 2018 11:25:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2C8072A080; Sat, 4 Aug 2018 11:25:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A21232982E for ; Sat, 4 Aug 2018 11:25:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726947AbeHDNZx (ORCPT ); Sat, 4 Aug 2018 09:25:53 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:32796 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726550AbeHDNZx (ORCPT ); Sat, 4 Aug 2018 09:25:53 -0400 Received: from DGGEMS401-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 140A658229224; Sat, 4 Aug 2018 19:25:21 +0800 (CST) Received: from linux-ibm.site (10.175.102.37) by DGGEMS401-HUB.china.huawei.com (10.3.19.201) with Microsoft SMTP Server id 14.3.399.0; Sat, 4 Aug 2018 19:25:20 +0800 From: zhong jiang To: , , CC: , Subject: [PATCH] btrfs/extent_map: Remove unneeded variable "ret" Date: Sat, 4 Aug 2018 19:13:43 +0800 Message-ID: <1533381223-16734-1-git-send-email-zhongjiang@huawei.com> X-Mailer: git-send-email 1.7.12.4 MIME-Version: 1.0 X-Originating-IP: [10.175.102.37] X-CFilter-Loop: Reflected Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The ret is not used after initalization, So just remove it. Signed-off-by: zhong jiang Reviewed-by: Su Yue --- fs/btrfs/extent_map.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/fs/btrfs/extent_map.c b/fs/btrfs/extent_map.c index 6648d55..b48ab41 100644 --- a/fs/btrfs/extent_map.c +++ b/fs/btrfs/extent_map.c @@ -276,7 +276,6 @@ static void try_merge_map(struct extent_map_tree *tree, struct extent_map *em) int unpin_extent_cache(struct extent_map_tree *tree, u64 start, u64 len, u64 gen) { - int ret = 0; struct extent_map *em; bool prealloc = false; @@ -308,7 +307,7 @@ int unpin_extent_cache(struct extent_map_tree *tree, u64 start, u64 len, free_extent_map(em); out: write_unlock(&tree->lock); - return ret; + return 0; } @@ -430,14 +429,13 @@ struct extent_map *search_extent_mapping(struct extent_map_tree *tree, */ int remove_extent_mapping(struct extent_map_tree *tree, struct extent_map *em) { - int ret = 0; - WARN_ON(test_bit(EXTENT_FLAG_PINNED, &em->flags)); rb_erase(&em->rb_node, &tree->map); if (!test_bit(EXTENT_FLAG_LOGGING, &em->flags)) list_del_init(&em->list); RB_CLEAR_NODE(&em->rb_node); - return ret; + + return 0; } void replace_extent_mapping(struct extent_map_tree *tree,