From patchwork Mon Sep 12 19:35:52 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 9327925 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 949466077F for ; Mon, 12 Sep 2016 19:39:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 86F2F28D84 for ; Mon, 12 Sep 2016 19:39:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7AA6328E93; Mon, 12 Sep 2016 19:39:34 +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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable 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 4330328D84 for ; Mon, 12 Sep 2016 19:39:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751986AbcILTja (ORCPT ); Mon, 12 Sep 2016 15:39:30 -0400 Received: from condef003-v.nifty.com ([210.131.4.240]:54499 "EHLO condef003-v.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751644AbcILTj3 (ORCPT ); Mon, 12 Sep 2016 15:39:29 -0400 Received: from conuserg-07.nifty.com ([10.26.8.70])by condef003-v.nifty.com with ESMTP id u8CJaWss004090 for ; Tue, 13 Sep 2016 04:36:32 +0900 Received: from grover.sesame (FL1-111-169-71-157.osk.mesh.ad.jp [111.169.71.157]) (authenticated) by conuserg-07.nifty.com with ESMTP id u8CJZtaK020601; Tue, 13 Sep 2016 04:35:57 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com u8CJZtaK020601 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1473708958; bh=e1aTtA5T2UcDPHhDDUdT9biBI3Jb2AGl2By4eOmgUdU=; h=From:To:Cc:Subject:Date:From; b=LCN5k3LQOFDDjytaBGGewRh2TkS8xRxHeQ3j44v2t50I6sBBJj82BS7dN9WKnMLtx /mz4i2zvy78kaWPShoJOmrR9+KMamBfGzFCdcIvXI4N2P8f5+4ose0r6ergYzt8Sd9 lUzuoulCXoi/Z6cHyYliNKI2xFhEfScJut3U7W0YdENc1KJWpivf/VVspnDaYmt4Un Ajc+flzJv8teyzxVwHNJq2ATsAV7VJOrAGwyKqn0Ux1PayEt7LUliMBmxb9ptTLrmX uS1lpf/WtIInCmkJXZyFSld/0eFgx/64F+w9RxIFB3ezNusbrsZEx47MkZ6jB6Rnw4 ZYUmJQ7OVcWkw== X-Nifty-SrcIP: [111.169.71.157] From: Masahiro Yamada To: linux-btrfs@vger.kernel.org Cc: Masahiro Yamada , Josef Bacik , Chris Mason , David Sterba , linux-kernel@vger.kernel.org Subject: [PATCH] btrfs: squash lines for simple wrapper functions Date: Tue, 13 Sep 2016 04:35:52 +0900 Message-Id: <1473708952-1007-1-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 1.9.1 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 Remove unneeded variables and assignments. Signed-off-by: Masahiro Yamada Reviewed-by: David Sterba --- fs/btrfs/check-integrity.c | 7 ++----- fs/btrfs/ctree.c | 4 +--- fs/btrfs/delayed-inode.c | 5 +---- fs/btrfs/extent-tree.c | 12 ++---------- fs/btrfs/send.c | 8 ++------ 5 files changed, 8 insertions(+), 28 deletions(-) diff --git a/fs/btrfs/check-integrity.c b/fs/btrfs/check-integrity.c index 6678947..183c98f 100644 --- a/fs/btrfs/check-integrity.c +++ b/fs/btrfs/check-integrity.c @@ -2849,11 +2849,8 @@ static void btrfsic_cmp_log_and_dev_bytenr(struct btrfsic_state *state, static struct btrfsic_dev_state *btrfsic_dev_state_lookup( struct block_device *bdev) { - struct btrfsic_dev_state *ds; - - ds = btrfsic_dev_state_hashtable_lookup(bdev, - &btrfsic_dev_state_hashtable); - return ds; + return btrfsic_dev_state_hashtable_lookup(bdev, + &btrfsic_dev_state_hashtable); } int btrfsic_submit_bh(int op, int op_flags, struct buffer_head *bh) diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c index d1c56c9..381e9ad 100644 --- a/fs/btrfs/ctree.c +++ b/fs/btrfs/ctree.c @@ -45,9 +45,7 @@ static int tree_mod_log_free_eb(struct btrfs_fs_info *fs_info, struct btrfs_path *btrfs_alloc_path(void) { - struct btrfs_path *path; - path = kmem_cache_zalloc(btrfs_path_cachep, GFP_NOFS); - return path; + return kmem_cache_zalloc(btrfs_path_cachep, GFP_NOFS); } /* diff --git a/fs/btrfs/delayed-inode.c b/fs/btrfs/delayed-inode.c index 3eeb9cd..403b2af 100644 --- a/fs/btrfs/delayed-inode.c +++ b/fs/btrfs/delayed-inode.c @@ -385,11 +385,8 @@ static struct btrfs_delayed_item *__btrfs_lookup_delayed_insertion_item( struct btrfs_delayed_node *delayed_node, struct btrfs_key *key) { - struct btrfs_delayed_item *item; - - item = __btrfs_lookup_delayed_item(&delayed_node->ins_root, key, + return __btrfs_lookup_delayed_item(&delayed_node->ins_root, key, NULL, NULL); - return item; } static int __btrfs_add_delayed_item(struct btrfs_delayed_node *delayed_node, diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 38c2df8..3fe8fdc 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -730,11 +730,7 @@ static int cache_block_group(struct btrfs_block_group_cache *cache, static struct btrfs_block_group_cache * btrfs_lookup_first_block_group(struct btrfs_fs_info *info, u64 bytenr) { - struct btrfs_block_group_cache *cache; - - cache = block_group_cache_tree_search(info, bytenr, 0); - - return cache; + return block_group_cache_tree_search(info, bytenr, 0); } /* @@ -744,11 +740,7 @@ struct btrfs_block_group_cache *btrfs_lookup_block_group( struct btrfs_fs_info *info, u64 bytenr) { - struct btrfs_block_group_cache *cache; - - cache = block_group_cache_tree_search(info, bytenr, 1); - - return cache; + return block_group_cache_tree_search(info, bytenr, 1); } static struct btrfs_space_info *__find_space_info(struct btrfs_fs_info *info, diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c index a87675f..bc7185c 100644 --- a/fs/btrfs/send.c +++ b/fs/btrfs/send.c @@ -4398,12 +4398,8 @@ static int process_new_xattr(struct send_ctx *sctx) static int process_deleted_xattr(struct send_ctx *sctx) { - int ret; - - ret = iterate_dir_item(sctx->parent_root, sctx->right_path, - sctx->cmp_key, __process_deleted_xattr, sctx); - - return ret; + return iterate_dir_item(sctx->parent_root, sctx->right_path, + sctx->cmp_key, __process_deleted_xattr, sctx); } struct find_xattr_ctx {