From patchwork Tue Aug 23 00:16:57 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wanlong Gao X-Patchwork-Id: 1086932 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p7N0Ign2004024 for ; Tue, 23 Aug 2011 00:18:42 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753624Ab1HWASV (ORCPT ); Mon, 22 Aug 2011 20:18:21 -0400 Received: from cn.fujitsu.com ([222.73.24.84]:61704 "EHLO song.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1751798Ab1HWAST (ORCPT ); Mon, 22 Aug 2011 20:18:19 -0400 Received: from tang.cn.fujitsu.com (tang.cn.fujitsu.com [10.167.250.3]) by song.cn.fujitsu.com (Postfix) with ESMTP id 91ACD170080; Tue, 23 Aug 2011 08:18:12 +0800 (CST) Received: from mailserver.fnst.cn.fujitsu.com (tang.cn.fujitsu.com [127.0.0.1]) by tang.cn.fujitsu.com (8.14.3/8.13.1) with ESMTP id p7N0ICwO029075; Tue, 23 Aug 2011 08:18:12 +0800 Received: from gaowanlong.fnst.cn.fujitsu.com ([10.167.225.68]) by mailserver.fnst.cn.fujitsu.com (Lotus Domino Release 8.5.1FP4) with ESMTP id 2011082308171312-13056 ; Tue, 23 Aug 2011 08:17:13 +0800 From: Wanlong Gao To: linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Wanlong Gao , chris.mason@oracle.com, Wanlong Gao , t-itoh@jp.fujitsu.com Subject: [PATCH v2] btrfs:make btrfs_init_compress() return void Date: Tue, 23 Aug 2011 08:16:57 +0800 Message-Id: <1314058617-3283-1-git-send-email-gaowanlong@cn.fujitsu.com> X-Mailer: git-send-email 1.7.6 In-Reply-To: <1314022940-6717-1-git-send-email-wanlong.gao@gmail.com> References: <1314022940-6717-1-git-send-email-wanlong.gao@gmail.com> X-MIMETrack: Itemize by SMTP Server on mailserver/fnst(Release 8.5.1FP4|July 25, 2010) at 2011-08-23 08:17:13, Serialize by Router on mailserver/fnst(Release 8.5.1FP4|July 25, 2010) at 2011-08-23 08:17:13, Serialize complete at 2011-08-23 08:17:13 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Tue, 23 Aug 2011 00:18:42 +0000 (UTC) Make btrfs_init_compress() return void, since it always return 0, and no need to check return value. Signed-off-by: Wanlong Gao --- fs/btrfs/compression.c | 3 +-- fs/btrfs/compression.h | 2 +- fs/btrfs/super.c | 7 +++---- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c index 8ec5d86..b2dbefa 100644 --- a/fs/btrfs/compression.c +++ b/fs/btrfs/compression.c @@ -731,7 +731,7 @@ struct btrfs_compress_op *btrfs_compress_op[] = { &btrfs_lzo_compress, }; -int __init btrfs_init_compress(void) +void __init btrfs_init_compress(void) { int i; @@ -741,7 +741,6 @@ int __init btrfs_init_compress(void) atomic_set(&comp_alloc_workspace[i], 0); init_waitqueue_head(&comp_workspace_wait[i]); } - return 0; } /* diff --git a/fs/btrfs/compression.h b/fs/btrfs/compression.h index a12059f..9afb0a6 100644 --- a/fs/btrfs/compression.h +++ b/fs/btrfs/compression.h @@ -19,7 +19,7 @@ #ifndef __BTRFS_COMPRESSION_ #define __BTRFS_COMPRESSION_ -int btrfs_init_compress(void); +void btrfs_init_compress(void); void btrfs_exit_compress(void); int btrfs_compress_pages(int type, struct address_space *mapping, diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index 15634d4..ece8d9f 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c @@ -1238,9 +1238,7 @@ static int __init init_btrfs_fs(void) if (err) return err; - err = btrfs_init_compress(); - if (err) - goto free_sysfs; + btrfs_init_compress(); err = btrfs_init_cachep(); if (err) @@ -1281,8 +1279,9 @@ free_cachep: btrfs_destroy_cachep(); free_compress: btrfs_exit_compress(); -free_sysfs: + btrfs_exit_sysfs(); + return err; }