From: Hans-Frieder Vogt <hfvogt@gmx.net>
To: Peter Senna Tschudin <peter.senna@gmail.com>
Cc: m.chehab@samsung.com, crope@iki.fi, linux-media@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH 05/19] media: Change variable type to bool
Date: Sat, 28 Sep 2013 11:39:47 +0200 [thread overview]
Message-ID: <12218816.0kAuduDdYP@maximilian> (raw)
In-Reply-To: <1379802471-30252-5-git-send-email-peter.senna@gmail.com>
Am Sonntag, 22. September 2013, 00:27:37 schrieb Peter Senna Tschudin:
> 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 <peter.senna@gmail.com>
> ---
> 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,
Acked-by: Hans-Frieder Vogt <hfvogt@gmx.net>
Hans-Frieder Vogt e-mail: hfvogt <at> gmx .dot. net
parent reply other threads:[~2013-09-28 9:39 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <1379802471-30252-5-git-send-email-peter.senna@gmail.com>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=12218816.0kAuduDdYP@maximilian \
--to=hfvogt@gmx.net \
--cc=crope@iki.fi \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=m.chehab@samsung.com \
--cc=peter.senna@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox