From patchwork Sat Sep 21 22:27:37 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: 2923241 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 455489F1BF for ; Sat, 21 Sep 2013 22:33:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8048520439 for ; Sat, 21 Sep 2013 22:33:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AA4D020319 for ; Sat, 21 Sep 2013 22:33:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752339Ab3IUW25 (ORCPT ); Sat, 21 Sep 2013 18:28:57 -0400 Received: from mail-wg0-f48.google.com ([74.125.82.48]:60461 "EHLO mail-wg0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752077Ab3IUW2k (ORCPT ); Sat, 21 Sep 2013 18:28:40 -0400 Received: by mail-wg0-f48.google.com with SMTP id n12so1786288wgh.15 for ; Sat, 21 Sep 2013 15:28:38 -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=lppnJiiDm4qaLxpTPr592LoLTtHZU6AfwFgTMWIJfDg=; b=08135c+xCS8WRp02K0y8v1OcdO7yQM66GpQv9QvLJpcRi2pboYcVrAcnMt22Q2VdXy voTyoDnn0SX5/eMjJYFDlHnoyC+HW1iEQp6+wiK9ss6RtztK7F1qWj+OEiUZvpO8UEi4 Go56xWOMGFF2WkS/te0ZmuV9Vh3bZhpKaHhNs84OvT+qvmO8KrHiLYwFHTndpWezj5PL 4vEYeD7jJUajBeZiqbXPeJU4n75shn02+US6n+gGeoEqSfLOWHR8WAOq8KU4lRD70odM /IyoCaf5UupB88NQcOOvjv6Iafjz/HoziDJ6ut6dM1uQFprzYzhTwCs7ETjS2LcwnUXi nR5Q== X-Received: by 10.180.20.163 with SMTP id o3mr8284967wie.1.1379802518712; Sat, 21 Sep 2013 15:28:38 -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 iz19sm14891990wic.9.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sat, 21 Sep 2013 15:28:38 -0700 (PDT) From: Peter Senna Tschudin To: m.chehab@samsung.com Cc: hfvogt@gmx.net, crope@iki.fi, peter.senna@gmail.com, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH 05/19] media: Change variable type to bool Date: Sun, 22 Sep 2013 00:27:37 +0200 Message-Id: <1379802471-30252-5-git-send-email-peter.senna@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1379802471-30252-1-git-send-email-peter.senna@gmail.com> References: <1379802471-30252-1-git-send-email-peter.senna@gmail.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-7.4 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 The variable vco_select is only assigned the values true and false. Change its type to bool. The simplified semantic patch that find this problem is as follows (http://coccinelle.lip6.fr/): @exists@ type T; identifier b; @@ - T + bool b = ...; ... when any b = \(true\|false\) Signed-off-by: Peter Senna Tschudin Acked-by: Hans-Frieder Vogt --- drivers/media/tuners/fc0012.c | 2 +- drivers/media/tuners/fc0013.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/tuners/fc0012.c b/drivers/media/tuners/fc0012.c index f4d0e79..d74e920 100644 --- a/drivers/media/tuners/fc0012.c +++ b/drivers/media/tuners/fc0012.c @@ -139,7 +139,7 @@ static int fc0012_set_params(struct dvb_frontend *fe) unsigned char reg[7], am, pm, multi, tmp; unsigned long f_vco; unsigned short xtal_freq_khz_2, xin, xdiv; - int vco_select = false; + bool vco_select = false; if (fe->callback) { ret = fe->callback(priv->i2c, DVB_FRONTEND_COMPONENT_TUNER, diff --git a/drivers/media/tuners/fc0013.c b/drivers/media/tuners/fc0013.c index bd8f0f1..b416231 100644 --- a/drivers/media/tuners/fc0013.c +++ b/drivers/media/tuners/fc0013.c @@ -233,7 +233,7 @@ static int fc0013_set_params(struct dvb_frontend *fe) unsigned char reg[7], am, pm, multi, tmp; unsigned long f_vco; unsigned short xtal_freq_khz_2, xin, xdiv; - int vco_select = false; + bool vco_select = false; if (fe->callback) { ret = fe->callback(priv->i2c, DVB_FRONTEND_COMPONENT_TUNER,