linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Antti Palosaari <crope@iki.fi>
To: Gianluca Gennari <gennarone@gmail.com>
Cc: linux-media@vger.kernel.org, mchehab@redhat.com
Subject: Re: [PATCH 2/3] fc2580: silence uninitialized variable warning
Date: Mon, 24 Sep 2012 14:55:03 +0300	[thread overview]
Message-ID: <50604A17.5060108@iki.fi> (raw)
In-Reply-To: <1348486638-31169-3-git-send-email-gennarone@gmail.com>

On 09/24/2012 02:37 PM, Gianluca Gennari wrote:
> fc2580.c: In function 'fc2580_set_params':
> fc2580.c:118: warning: 'ret' may be used uninitialized in this function
>
> Signed-off-by: Gianluca Gennari <gennarone@gmail.com>
> ---
>   drivers/media/tuners/fc2580.c |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/media/tuners/fc2580.c b/drivers/media/tuners/fc2580.c
> index 036e94b..3ad68e9 100644
> --- a/drivers/media/tuners/fc2580.c
> +++ b/drivers/media/tuners/fc2580.c
> @@ -115,7 +115,7 @@ static int fc2580_set_params(struct dvb_frontend *fe)
>   {
>   	struct fc2580_priv *priv = fe->tuner_priv;
>   	struct dtv_frontend_properties *c = &fe->dtv_property_cache;
> -	int ret, i;
> +	int ret=0, i;

Nack. This is Codingstyle violation. See rules around line 206 from 
Documentation/CodingStyle

That replace warning with Codingstyle mistake. Change it to meet 
CodingStyle and resend.


>   	unsigned int r_val, n_val, k_val, k_val_reg, f_ref;
>   	u8 tmp_val, r18_val;
>   	u64 f_vco;
>

Antti
-- 
http://palosaari.fi/

  reply	other threads:[~2012-09-24 11:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-24 11:37 [PATCH 0/3] Fix several warnings on new fc2580 tuner driver Gianluca Gennari
2012-09-24 11:37 ` [PATCH 1/3] fc2580: define const as UL to silence a warning Gianluca Gennari
2012-09-24 11:52   ` Antti Palosaari
2012-09-24 11:37 ` [PATCH 2/3] fc2580: silence uninitialized variable warning Gianluca Gennari
2012-09-24 11:55   ` Antti Palosaari [this message]
2012-09-24 11:37 ` [PATCH 3/3] fc2580: use macro for 64 bit division and reminder Gianluca Gennari
2012-09-24 11:55   ` Antti Palosaari

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=50604A17.5060108@iki.fi \
    --to=crope@iki.fi \
    --cc=gennarone@gmail.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@redhat.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;
as well as URLs for NNTP newsgroup(s).