From patchwork Sun Sep 22 18:44:11 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Senna Tschudin X-Patchwork-Id: 2924891 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 3BD7EBFF05 for ; Sun, 22 Sep 2013 18:46:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 767CA2012E for ; Sun, 22 Sep 2013 18:46:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5423B201B5 for ; Sun, 22 Sep 2013 18:46:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752884Ab3IVSpS (ORCPT ); Sun, 22 Sep 2013 14:45:18 -0400 Received: from mail-wi0-f182.google.com ([209.85.212.182]:53836 "EHLO mail-wi0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752662Ab3IVSox (ORCPT ); Sun, 22 Sep 2013 14:44:53 -0400 Received: by mail-wi0-f182.google.com with SMTP id ez12so1427895wid.9 for ; Sun, 22 Sep 2013 11:44:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=HL09a9IQqvRZwXVUyHQe5uxhDkjmBCXzyZ4J+f3/fmo=; b=C6hSL1qiUXZXRA5rNouFr7wxZvkHV7FdzLFECVCu4j2AXzMvpIM2zdTLRsXnZwaXmQ EoVfkSaKKjjFT2mlXN+JlKO4CEvCgac/xgd2AgL0CaLXhtHIjNCL3x8oNh46JiZYHIF7 WeKdaDFbj8NyOhDy9ZgehkKTSyGjyEdpwdZMYQy4L5o3AwQOxs5uVjgFeq2lx6fdtU0T doHDavKvYR4YHKvvNez+tMO4viM45YMSMExmKjWmStyiHxELfEnDONqfTKckWqSuHPcz eTXIaisJvSZ57F1vzwMIj4Ax0f1Z+t08jH4sk9DPg2Dmvg+JT4XBZ2xV1rLQ6zskpKhH RJoQ== X-Received: by 10.194.77.167 with SMTP id t7mr14161277wjw.27.1379875491961; Sun, 22 Sep 2013 11:44:51 -0700 (PDT) Received: from notepeter.home (210-232.80-90.static-ip.oleane.fr. [90.80.232.210]) by mx.google.com with ESMTPSA id fz8sm20018299wic.0.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 22 Sep 2013 11:44:51 -0700 (PDT) From: Peter Senna Tschudin To: tomi.valkeinen@ti.com Cc: plagnioj@jcrosoft.com, archit@ti.com, linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Peter Senna Tschudin Subject: [PATCH 3/5] OMAPDSS: DISPC: Fix assignment of 0/1 to bool variables Date: Sun, 22 Sep 2013 20:44:11 +0200 Message-Id: <1379875453-20083-3-git-send-email-peter.senna@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1379875453-20083-1-git-send-email-peter.senna@gmail.com> References: <1379875453-20083-1-git-send-email-peter.senna@gmail.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-9.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Convert 0 to false and 1 to true when assigning values to bool variables. Inspired by commit 3db1cd5c05f35fb43eb134df6f321de4e63141f2. The simplified semantic patch that find this problem is as follows (http://coccinelle.lip6.fr/): @@ bool b; @@ ( -b = 0 +b = false | -b = 1 +b = true ) Signed-off-by: Peter Senna Tschudin --- drivers/video/omap2/dss/dispc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff -u -p a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c --- a/drivers/video/omap2/dss/dispc.c +++ b/drivers/video/omap2/dss/dispc.c @@ -2352,7 +2352,7 @@ int dispc_ovl_check(enum omap_plane plan { enum omap_overlay_caps caps = dss_feat_get_overlay_caps(plane); bool five_taps = true; - bool fieldmode = 0; + bool fieldmode = false; u16 in_height = oi->height; u16 in_width = oi->width; bool ilace = timings->interlace; @@ -2365,7 +2365,7 @@ int dispc_ovl_check(enum omap_plane plan out_height = oi->out_height == 0 ? oi->height : oi->out_height; if (ilace && oi->height == out_height) - fieldmode = 1; + fieldmode = true; if (ilace) { if (fieldmode) @@ -2396,7 +2396,7 @@ static int dispc_ovl_setup_common(enum o bool mem_to_mem) { bool five_taps = true; - bool fieldmode = 0; + bool fieldmode = false; int r, cconv = 0; unsigned offset0, offset1; s32 row_inc; @@ -2417,7 +2417,7 @@ static int dispc_ovl_setup_common(enum o out_height = out_height == 0 ? height : out_height; if (ilace && height == out_height) - fieldmode = 1; + fieldmode = true; if (ilace) { if (fieldmode)