All of lore.kernel.org
 help / color / mirror / Atom feed
From: Antti Palosaari <crope@iki.fi>
To: "Michael Büsch" <m@bues.ch>
Cc: linux-media <linux-media@vger.kernel.org>
Subject: Re: [PATCH] Add fc0011 tuner driver
Date: Mon, 07 May 2012 22:02:18 +0300	[thread overview]
Message-ID: <4FA81C3A.1020108@iki.fi> (raw)
In-Reply-To: <20120402181432.74e8bd50@milhouse>

On 02.04.2012 19:14, Michael Büsch wrote:
> This adds support for the Fitipower fc0011 DVB-t tuner.
>
> Signed-off-by: Michael Buesch<m@bues.ch>

> +	unsigned int i, vco_retries;
> +	u32 freq = p->frequency / 1000;
> +	u32 bandwidth = p->bandwidth_hz / 1000;
> +	u32 fvco, xin, xdiv, xdivr;
> +	u16 frac;
> +	u8 fa, fp, vco_sel, vco_cal;
> +	u8 regs[FC11_NR_REGS] = { };

> +
> +	dev_dbg(&priv->i2c->dev, "Tuned to "
> +		"fa=%02X fp=%02X xin=%02X%02X vco=%02X vcosel=%02X "
> +		"vcocal=%02X(%u) bw=%u\n",
> +		(unsigned int)regs[FC11_REG_FA],
> +		(unsigned int)regs[FC11_REG_FP],
> +		(unsigned int)regs[FC11_REG_XINHI],
> +		(unsigned int)regs[FC11_REG_XINLO],
> +		(unsigned int)regs[FC11_REG_VCO],
> +		(unsigned int)regs[FC11_REG_VCOSEL],
> +		(unsigned int)vco_cal, vco_retries,
> +		(unsigned int)bandwidth);

Just for the interest, is there any reason you use so much casting or is 
that only your style?

I removed some similar castings from the AF9035 log writings you added 
as I did not see need for those. I even think casting should be avoided 
as it can hide possible meaningful compiler warnings on bad case.

regards
Antti
-- 
http://palosaari.fi/

  parent reply	other threads:[~2012-05-07 19:02 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-02 16:14 [PATCH] Add fc0011 tuner driver Michael Büsch
2012-04-02 16:56 ` Antti Palosaari
2012-04-02 17:20   ` Michael Büsch
2012-04-02 17:40     ` Antti Palosaari
2012-04-02 17:51       ` Michael Büsch
2012-04-02 21:52         ` Antti Palosaari
2012-04-03  6:36           ` Michael Büsch
2012-05-07 19:02 ` Antti Palosaari [this message]
2012-05-07 21:00   ` Michael Büsch
2012-05-07 21:13     ` Rémi Denis-Courmont

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=4FA81C3A.1020108@iki.fi \
    --to=crope@iki.fi \
    --cc=linux-media@vger.kernel.org \
    --cc=m@bues.ch \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.