From: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
To: "Michael Büsch" <m@bues.ch>
Cc: Linux Media Mailing List <linux-media@vger.kernel.org>,
Mauro Carvalho Chehab <mchehab@infradead.org>,
Katsuhiro Suzuki <suzuki.katsuhiro@socionext.com>,
Antti Palosaari <crope@iki.fi>, Sergey Kozlov <serjk@netup.ru>,
Abylay Ospan <aospan@netup.ru>,
Malcolm Priestley <tvboxspy@gmail.com>,
Daniel Scheller <d.scheller.oss@gmail.com>,
Olli Salonen <olli.salonen@iki.fi>,
Michael Krufky <mkrufky@linuxtv.org>
Subject: Re: [PATCH 1/2] media: dvb: convert tuner_info frequencies to Hz
Date: Thu, 5 Jul 2018 18:31:04 -0300 [thread overview]
Message-ID: <20180705183056.7ce1bf6c@coco.lan> (raw)
In-Reply-To: <20180705211606.79a96d22@wiggum>
Em Thu, 5 Jul 2018 21:16:06 +0200
Michael Büsch <m@bues.ch> escreveu:
> On Wed, 4 Jul 2018 23:46:56 -0300
> Mauro Carvalho Chehab <mchehab+samsung@kernel.org> wrote:
>
> > diff --git a/drivers/media/tuners/fc0011.c b/drivers/media/tuners/fc0011.c
> > index 145407dee3db..a983899c6b0b 100644
> > --- a/drivers/media/tuners/fc0011.c
> > +++ b/drivers/media/tuners/fc0011.c
> > @@ -472,10 +472,10 @@ static int fc0011_get_bandwidth(struct dvb_frontend *fe, u32 *bandwidth)
> >
> > static const struct dvb_tuner_ops fc0011_tuner_ops = {
> > .info = {
> > - .name = "Fitipower FC0011",
> > + .name = "Fitipower FC0011",
> >
> > - .frequency_min = 45000000,
> > - .frequency_max = 1000000000,
> > + .frequency_min_hz = 45 * MHz,
> > + .frequency_max_hz = 1000 * MHz,
> > },
> >
> > .release = fc0011_release,
>
> Acked-by: Michael Büsch <m@bues.ch>
>
> What about a GHz definition for 1000 * MHz?
Not sure if it would be worth. The main goal of using the multiplier
macros it so make easier to recognize values. Reading up to 4-5
digits is usually easy for humans.
In particular, my main goal is to make it easier to check if the
values for each driver is OK for me, while writing the patch,
and for reviewers to check if the values make sense.
Also, almost all DVB-T and DVB-C drivers use a max frequency around
850 MHz, and almost all DVB-S uses 2150 MHz. On both cases, it
is better to write the values in MHz.
So, the only case where GHZ would be used, in practice would be
on two drivers:
$ git grep "1000 \* MHz"
drivers/media/tuners/fc0011.c: .frequency_max_hz = 1000 * MHz,
drivers/media/tuners/mc44s803.c: .frequency_max_hz = 1000 * MHz,
Thanks,
Mauro
next prev parent reply other threads:[~2018-07-05 21:31 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-05 2:46 [PATCH 0/2] DVB: represent frequencies at tuner/frontend .info in Hz Mauro Carvalho Chehab
2018-07-05 2:46 ` [PATCH 1/2] media: dvb: convert tuner_info frequencies to Hz Mauro Carvalho Chehab
2018-07-05 12:35 ` Michael Ira Krufky
2018-07-05 13:13 ` Mauro Carvalho Chehab
2018-07-05 19:16 ` Michael Büsch
2018-07-05 21:31 ` Mauro Carvalho Chehab [this message]
2018-07-05 2:46 ` [PATCH 2/2] media: dvb: represent min/max/step/tolerance freqs in Hz Mauro Carvalho Chehab
2018-07-05 5:31 ` kbuild test robot
2018-07-05 5:31 ` kbuild test robot
2018-07-05 5:49 ` kbuild test robot
2018-07-05 5:49 ` [PATCH] media: dvb: fix noderef.cocci warnings kbuild test robot
2018-07-05 11:56 ` Michael Ira Krufky
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=20180705183056.7ce1bf6c@coco.lan \
--to=mchehab+samsung@kernel.org \
--cc=aospan@netup.ru \
--cc=crope@iki.fi \
--cc=d.scheller.oss@gmail.com \
--cc=linux-media@vger.kernel.org \
--cc=m@bues.ch \
--cc=mchehab@infradead.org \
--cc=mkrufky@linuxtv.org \
--cc=olli.salonen@iki.fi \
--cc=serjk@netup.ru \
--cc=suzuki.katsuhiro@socionext.com \
--cc=tvboxspy@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;
as well as URLs for NNTP newsgroup(s).