From patchwork Sat Nov 3 20:30:23 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 1692971 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 15F36DFB7B for ; Sat, 3 Nov 2012 20:40:59 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TUkU4-00054r-Vf; Sat, 03 Nov 2012 20:38:25 +0000 Received: from mail4-relais-sop.national.inria.fr ([192.134.164.105]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TUkU0-00054Y-P0 for linux-arm-kernel@lists.infradead.org; Sat, 03 Nov 2012 20:38:21 +0000 X-IronPort-AV: E=Sophos;i="4.80,705,1344204000"; d="scan'208";a="161264929" Received: from palace.lip6.fr (HELO localhost.localdomain) ([132.227.105.202]) by mail4-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 03 Nov 2012 21:30:31 +0100 From: Julia Lawall To: Tony Lindgren Subject: [PATCH 6/8] arch/arm/mach-omap2/dpll3xxx.c: drop if around WARN_ON Date: Sat, 3 Nov 2012 21:30:23 +0100 Message-Id: <1351974625-10282-7-git-send-email-Julia.Lawall@lip6.fr> X-Mailer: git-send-email 1.7.8.6 In-Reply-To: <1351974625-10282-1-git-send-email-Julia.Lawall@lip6.fr> References: <1351974625-10282-1-git-send-email-Julia.Lawall@lip6.fr> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20121103_163821_094550_A5CC4DD3 X-CRM114-Status: GOOD ( 10.06 ) X-Spam-Score: -6.1 (------) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-6.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [192.134.164.105 listed in list.dnswl.org] 0.8 SPF_NEUTRAL SPF: sender does not match SPF record (neutral) -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Russell King , linux-omap@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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 --- arch/arm/mach-omap2/dpll3xxx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/arm/mach-omap2/dpll3xxx.c b/arch/arm/mach-omap2/dpll3xxx.c index eacf51f..ed855b0 100644 --- a/arch/arm/mach-omap2/dpll3xxx.c +++ b/arch/arm/mach-omap2/dpll3xxx.c @@ -478,8 +478,7 @@ int omap3_noncore_dpll_set_rate(struct clk *clk, unsigned long rate) if (!soc_is_am33xx() && !cpu_is_omap44xx() && !cpu_is_omap3630()) { freqsel = _omap3_dpll_compute_freqsel(clk, dd->last_rounded_n); - if (!freqsel) - WARN_ON(1); + WARN_ON(!freqsel); } pr_debug("clock: %s: set rate: locking rate to %lu.\n",