From patchwork Mon Aug 22 14:22:20 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wanlong Gao X-Patchwork-Id: 1085572 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p7MEOlGb002146 for ; Mon, 22 Aug 2011 14:24:47 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750863Ab1HVOYk (ORCPT ); Mon, 22 Aug 2011 10:24:40 -0400 Received: from mail-pz0-f42.google.com ([209.85.210.42]:55393 "EHLO mail-pz0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752154Ab1HVOYi (ORCPT ); Mon, 22 Aug 2011 10:24:38 -0400 Received: by pzk37 with SMTP id 37so8732493pzk.1 for ; Mon, 22 Aug 2011 07:24:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; bh=WSfGJHfk+xHl8uB6SkErV4RehvFc1gc4WdkXhKJinJY=; b=Pjv8kioOM9mwxo2uNCw4GoCmYPfdiLSyj6/Vl3IRdBnVHeIDYoOUrjvmn6YYtPbkRW 7WZN098uzeQLwwfmhaIdAACGXCjg15floEmJT2S0Ab+YaqTqZj4/2jdnhg9h30eujTIb NFFM5ph0W0psCLni/PngMIKnY0gPi5H8T27Qg= Received: by 10.68.10.71 with SMTP id g7mr129180pbb.275.1314023078038; Mon, 22 Aug 2011 07:24:38 -0700 (PDT) Received: from localhost.localdomain ([58.240.69.74]) by mx.google.com with ESMTPS id q3sm950687pbo.23.2011.08.22.07.24.35 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 22 Aug 2011 07:24:37 -0700 (PDT) From: Wanlong Gao To: linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org Cc: chris.mason@oracle.com, Wanlong Gao Subject: [PATCH] btrfs:make btrfs_init_compress() return void Date: Mon, 22 Aug 2011 22:22:20 +0800 Message-Id: <1314022940-6717-1-git-send-email-wanlong.gao@gmail.com> X-Mailer: git-send-email 1.7.4.1 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 (demeter1.kernel.org [140.211.167.41]); Mon, 22 Aug 2011 14:24:47 +0000 (UTC) From: Wanlong Gao 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, 4 insertions(+), 8 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..31e9654 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,7 @@ free_cachep: btrfs_destroy_cachep(); free_compress: btrfs_exit_compress(); -free_sysfs: - btrfs_exit_sysfs(); + return err; }