Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932243Ab2KCLDW (ORCPT ); Sat, 3 Nov 2012 07:03:22 -0400 Received: from mail4-relais-sop.national.inria.fr ([192.134.164.105]:11958 "EHLO mail4-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751154Ab2KCK6r (ORCPT ); Sat, 3 Nov 2012 06:58:47 -0400 X-IronPort-AV: E=Sophos;i="4.80,705,1344204000"; d="scan'208";a="161245663" From: Julia Lawall To: linux-kernel@vger.kernel.org Cc: kernel-janitors@vger.kernel.org Subject: [PATCH 2/16] fs/hfsplus/bnode.c: use WARN Date: Sat, 3 Nov 2012 11:58:23 +0100 Message-Id: <1351940317-14812-3-git-send-email-Julia.Lawall@lip6.fr> X-Mailer: git-send-email 1.7.8.6 In-Reply-To: <1351940317-14812-1-git-send-email-Julia.Lawall@lip6.fr> References: <1351940317-14812-1-git-send-email-Julia.Lawall@lip6.fr> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1203 Lines: 44 From: Julia Lawall Use WARN rather than printk followed by WARN_ON(1), for conciseness. A simplified version of the semantic patch that makes this transformation is as follows: (http://coccinelle.lip6.fr/) // @@ expression list es; @@ -printk( +WARN(1, es); -WARN_ON(1); // Signed-off-by: Julia Lawall --- fs/hfsplus/bnode.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/hfsplus/bnode.c b/fs/hfsplus/bnode.c index 5c125ce..7a92c2c 100644 --- a/fs/hfsplus/bnode.c +++ b/fs/hfsplus/bnode.c @@ -588,8 +588,7 @@ struct hfs_bnode *hfs_bnode_create(struct hfs_btree *tree, u32 num) node = hfs_bnode_findhash(tree, num); spin_unlock(&tree->hash_lock); if (node) { - printk(KERN_CRIT "new node %u already hashed?\n", num); - WARN_ON(1); + WARN(1, KERN_CRIT "new node %u already hashed?\n", num); return node; } node = __hfs_bnode_create(tree, num); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/