Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1819132imm; Thu, 23 Aug 2018 09:14:27 -0700 (PDT) X-Google-Smtp-Source: AA+uWPzqrM8EQ0iJ0KrxHuGBiIgrY82R5vbDZfC5rTIgZ4JzGNZRV9roJ/WrLwhCS3Ls8omvcLRz X-Received: by 2002:a17:902:9a48:: with SMTP id x8-v6mr30983942plv.72.1535040867870; Thu, 23 Aug 2018 09:14:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535040867; cv=none; d=google.com; s=arc-20160816; b=LjIE6WTt8XFDLCFAz4VSIqNU2czrEU7iOGF4NqMqXCr4yTL0/xkNPn+bJ9a2XdJnWi neNCM6ZZEiHr7lV73qddBcbYzf2e4rI5XgR0Y+NPXFTRLB8W0t8BwSGX+ZSYavWdkiLl ADEMi/gkYBD4SN/q1P34RrIBxRUSr+zqdkIySQLi5KAkBcC3Btnvx+2t8sMJ0N7X9OZ5 T+iuV/gvvh3K3xdjFBO3Fyw1v31PdxERT+N/F7IOBtLhq386Nxn0RPpTtS0Kja6ps7vo /TLbpT5XNBJp+4pO4PFMAEwz6W1iK1nZWLXAF/o0+t8/VXXdASQQb2bkdubzJFonJnRL PCwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :references:subject:cc:to:mime-version:user-agent:from:date :message-id:arc-authentication-results; bh=iY/KNweP3S53TMyxvSlrU4X1dSUOtykVQFYXTTeWENk=; b=R1a+uWfYQ6HFmPHcSBZmaHVvYTmVLUPLfcRbgWlpBBT6BRrxnNBKuOZjJQ3BVL4dMf 0e+JgJZR/KFmJ+7JqQ3+mdSwP0y3DFZt/n/vsndwRJifK4Y+jEZaKFAElGPzfTC8DKTy YHrJK0YC74oDcOW70dpI7z07/OF7GKl0YcgIUUkVz+NlrYSZ+Dyo9Qtzj4wmtHtgTz48 rlrVxKUmcVDUvD3/TcDvRtlCj9nH+kurkZ7gtvfBLOiAC4mFlucNyCDyzwSY44KhqZA5 EPoe+uqzafhB/CI4pisKhz5Rv/4yE8aG7oXc2U2/jsw+MKiAAscLIQbOCCFU55osrFfQ HgFA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y8-v6si4840266pfm.141.2018.08.23.09.14.12; Thu, 23 Aug 2018 09:14:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731732AbeHWPBF (ORCPT + 99 others); Thu, 23 Aug 2018 11:01:05 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:11601 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726246AbeHWPBF (ORCPT ); Thu, 23 Aug 2018 11:01:05 -0400 Received: from DGGEMS410-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 9C46FDFBA968A; Thu, 23 Aug 2018 19:31:44 +0800 (CST) Received: from [127.0.0.1] (10.177.29.68) by DGGEMS410-HUB.china.huawei.com (10.3.19.210) with Microsoft SMTP Server id 14.3.399.0; Thu, 23 Aug 2018 19:31:41 +0800 Message-ID: <5B7E9B1C.40404@huawei.com> Date: Thu, 23 Aug 2018 19:31:40 +0800 From: zhong jiang User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: , , CC: , , , Subject: Re: [PATCH v2] btrfs/extent_map: Remove unneeded variable "ret" References: <1533474287-15049-1-git-send-email-zhongjiang@huawei.com> In-Reply-To: <1533474287-15049-1-git-send-email-zhongjiang@huawei.com> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.29.68] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, dsterba Can you pick up the patch? Thanks Best wishes, zhong jiang On 2018/8/5 21:04, zhong jiang wrote: > The ret is not used after initalization, and we do not care about > the return value. So make it void function. > > Signed-off-by: zhong jiang > --- > fs/btrfs/extent_map.c | 10 ++-------- > fs/btrfs/extent_map.h | 4 ++-- > 2 files changed, 4 insertions(+), 10 deletions(-) > > diff --git a/fs/btrfs/extent_map.c b/fs/btrfs/extent_map.c > index 6648d55..da4e4f3 100644 > --- a/fs/btrfs/extent_map.c > +++ b/fs/btrfs/extent_map.c > @@ -273,10 +273,9 @@ static void try_merge_map(struct extent_map_tree *tree, struct extent_map *em) > * to the generation that actually added the file item to the inode so we know > * we need to sync this extent when we call fsync(). > */ > -int unpin_extent_cache(struct extent_map_tree *tree, u64 start, u64 len, > +void 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,8 +307,6 @@ int unpin_extent_cache(struct extent_map_tree *tree, u64 start, u64 len, > free_extent_map(em); > out: > write_unlock(&tree->lock); > - return ret; > - > } > > void clear_em_logging(struct extent_map_tree *tree, struct extent_map *em) > @@ -428,16 +425,13 @@ struct extent_map *search_extent_mapping(struct extent_map_tree *tree, > * Removes @em from @tree. No reference counts are dropped, and no checks > * are done to see if the range is in use > */ > -int remove_extent_mapping(struct extent_map_tree *tree, struct extent_map *em) > +void 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; > } > > void replace_extent_mapping(struct extent_map_tree *tree, > diff --git a/fs/btrfs/extent_map.h b/fs/btrfs/extent_map.h > index 25d985e..c80649b 100644 > --- a/fs/btrfs/extent_map.h > +++ b/fs/btrfs/extent_map.h > @@ -78,7 +78,7 @@ struct extent_map *lookup_extent_mapping(struct extent_map_tree *tree, > u64 start, u64 len); > int add_extent_mapping(struct extent_map_tree *tree, > struct extent_map *em, int modified); > -int remove_extent_mapping(struct extent_map_tree *tree, struct extent_map *em); > +void remove_extent_mapping(struct extent_map_tree *tree, struct extent_map *em); > void replace_extent_mapping(struct extent_map_tree *tree, > struct extent_map *cur, > struct extent_map *new, > @@ -88,7 +88,7 @@ void replace_extent_mapping(struct extent_map_tree *tree, > void free_extent_map(struct extent_map *em); > int __init extent_map_init(void); > void __cold extent_map_exit(void); > -int unpin_extent_cache(struct extent_map_tree *tree, u64 start, u64 len, u64 gen); > +void unpin_extent_cache(struct extent_map_tree *tree, u64 start, u64 len, u64 gen); > void clear_em_logging(struct extent_map_tree *tree, struct extent_map *em); > struct extent_map *search_extent_mapping(struct extent_map_tree *tree, > u64 start, u64 len);