Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754424Ab2KEPjf (ORCPT ); Mon, 5 Nov 2012 10:39:35 -0500 Received: from twin.jikos.cz ([89.185.236.188]:54387 "EHLO twin.jikos.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751138Ab2KEPjc (ORCPT ); Mon, 5 Nov 2012 10:39:32 -0500 Date: Mon, 5 Nov 2012 16:39:02 +0100 From: David Sterba To: Julia Lawall Cc: Chris Mason , kernel-janitors@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/8] fs/btrfs: drop if around WARN_ON Message-ID: <20121105153902.GK3102@twin.jikos.cz> Reply-To: dave@jikos.cz Mail-Followup-To: Julia Lawall , Chris Mason , kernel-janitors@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org References: <1351974625-10282-1-git-send-email-Julia.Lawall@lip6.fr> <1351974625-10282-2-git-send-email-Julia.Lawall@lip6.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1351974625-10282-2-git-send-email-Julia.Lawall@lip6.fr> User-Agent: Mutt/1.5.21 (2011-07-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 737 Lines: 23 On Sat, Nov 03, 2012 at 09:30:18PM +0100, Julia Lawall wrote: > From: Julia Lawall > > Just use WARN_ON rather than an if containing only WARN_ON(1). > > A simplified version of the semantic patch that makes this transformation > is as follows: (http://coccinelle.lip6.fr/) > > // > @@ > expression e; > @@ > - if (e) WARN_ON(1); > + WARN_ON(e); > // > > Signed-off-by: Julia Lawall Reviewed-by: David Sterba -- 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/