From patchwork Sat Oct 30 13:14:25 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Samuel X-Patchwork-Id: 291872 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o9UDF31Y026151 for ; Sat, 30 Oct 2010 13:15:04 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753708Ab0J3NO6 (ORCPT ); Sat, 30 Oct 2010 09:14:58 -0400 Received: from csamuel.org ([74.50.50.137]:47780 "EHLO csamuel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751049Ab0J3NO6 (ORCPT ); Sat, 30 Oct 2010 09:14:58 -0400 Received: from localhost (localhost [127.0.0.1]) by csamuel.org (Postfix) with ESMTP id 26A0C40715; Sun, 31 Oct 2010 00:14:57 +1100 (EST) Received: from csamuel.org ([127.0.0.1]) by localhost (csamuel.org [127.0.0.1]) (amavisd-maia, port 10024) with LMTP id 32705-01; Sun, 31 Oct 2010 00:14:33 +1100 (EST) Received: from quad.localnet (ppp59-167-127-196.static.internode.on.net [59.167.127.196]) by csamuel.org (Postfix) with ESMTPS id EB39840713; Sun, 31 Oct 2010 00:14:32 +1100 (EST) From: Chris Samuel To: linux-btrfs@vger.kernel.org, Chris Mason Subject: [PATCH] Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...)) - generated by Coccinelle Date: Sun, 31 Oct 2010 00:14:25 +1100 User-Agent: KMail/1.13.5 (Linux/2.6.35-22-generic; KDE/4.5.2; x86_64; ; ) X-Face: Wcb;^Ll1x`\6);#5&v=2":47)c~M=K)9_=0mp[Ob~p==:85h/k)fj6nBf@ =?utf-8?q?=5ESdaXtmdYGRq=0A=09=5B?=>N&^2m#i\v9ZHe:G-e=OR}-sEf`CdEL2/\).SeCBSC"Cn[(:./c*I|/3KCDO$< =?utf-8?q?=7Bn8m=3BX=5F=0A=09g=5CY9LQ=3Dv/b5=60?=)L,WOQdI*?SqUCgiw/9`KxgdU5; z8L.3) =?utf-8?q?F!1M3=3Dw=3Ai9MsWp=26v=3B=25usOXL=3Bw=0A=096kF=3FwAZjss=2E+y?=(78'qBu"; bx]>"2dZd/S$^K)nU^N0HM\^^; s#q MIME-Version: 1.0 Message-Id: <201010310014.30428.chris@csamuel.org> 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.3 (demeter1.kernel.org [140.211.167.41]); Sat, 30 Oct 2010 13:15:04 +0000 (UTC) diff --git a/fs/btrfs/extent_map.c b/fs/btrfs/extent_map.c index 454ca52..23cb8da 100644 --- a/fs/btrfs/extent_map.c +++ b/fs/btrfs/extent_map.c @@ -335,7 +335,7 @@ struct extent_map *lookup_extent_mapping(struct extent_map_tree *tree, goto out; } if (IS_ERR(rb_node)) { - em = ERR_PTR(PTR_ERR(rb_node)); + em = ERR_CAST(rb_node); goto out; } em = rb_entry(rb_node, struct extent_map, rb_node); @@ -384,7 +384,7 @@ struct extent_map *search_extent_mapping(struct extent_map_tree *tree, goto out; } if (IS_ERR(rb_node)) { - em = ERR_PTR(PTR_ERR(rb_node)); + em = ERR_CAST(rb_node); goto out; } em = rb_entry(rb_node, struct extent_map, rb_node); diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index ebe46c6..1bc7a0a 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c @@ -380,7 +380,7 @@ static struct dentry *get_default_root(struct super_block *sb, find_root: new_root = btrfs_read_fs_root_no_name(root->fs_info, &location); if (IS_ERR(new_root)) - return ERR_PTR(PTR_ERR(new_root)); + return ERR_CAST(new_root); if (btrfs_root_refs(&new_root->root_item) == 0) return ERR_PTR(-ENOENT);