From: Randy Dunlap <rdunlap@xenotime.net>
To: Paul Bolle <pebolle@tiscali.nl>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] [RESEND] media: tea5764: reconcile Kconfig symbol and macro
Date: Sun, 30 Oct 2011 10:24:02 -0700 [thread overview]
Message-ID: <4EAD8832.9090509@xenotime.net> (raw)
In-Reply-To: <1319994738.14409.37.camel@x61.thuisdomein>
On 10/30/11 10:12, Paul Bolle wrote:
> On Sun, 2011-10-30 at 09:43 -0700, Randy Dunlap wrote:
>> On 10/30/11 05:08, Paul Bolle wrote:
>>> The Kconfig symbol RADIO_TEA5764_XTAL is unused. The code does use a
>>> RADIO_TEA5764_XTAL macro, but does that rather peculiar. But there seems
>>> to be a way to keep both. (The easiest way out would be to rip out both
>>> the Kconfig symbol and the macro.)
>>>
>>> Note there's also a module parameter 'use_xtal' to influence all this.
>>
>> It's curious that the module parameter is only available when the driver
>> is builtin (=y) but not built as a loadable module (=m):
>
> As far as I can see the module parameter is available in both cases but
> defaults to different values when builtin and when loadable.
Ah, you are correct. Thanks.
>> config RADIO_TEA5764_XTAL
>> bool "TEA5764 crystal reference"
>> depends on RADIO_TEA5764=y
>> default y
>
> 0) I've noticed similar dependencies (while doing some other Kconfig
> related clean up) with a number of other config entries in that same
> Kconfig file:
> $ git grep -n "depends on.*=y" drivers/media/radio/
> drivers/media/radio/Kconfig:60: depends on RADIO_RTRACK=y
> drivers/media/radio/Kconfig:83: depends on RADIO_RTRACK2=y
> drivers/media/radio/Kconfig:106: depends on RADIO_AZTECH=y
> drivers/media/radio/Kconfig:135: depends on RADIO_GEMTEK=y
> drivers/media/radio/Kconfig:147: depends on RADIO_GEMTEK=y
> drivers/media/radio/Kconfig:239: depends on RADIO_TERRATEC=y
> drivers/media/radio/Kconfig:257: depends on RADIO_TRUST=y
> drivers/media/radio/Kconfig:280: depends on RADIO_TYPHOON=y
> drivers/media/radio/Kconfig:287: depends on RADIO_TYPHOON=y
> drivers/media/radio/Kconfig:314: depends on RADIO_ZOLTRIX=y
> drivers/media/radio/Kconfig:385: depends on RADIO_TEA5764=y
>
> 1) It seems the logic behind those config symbols is mostly like this:
> - if the driver for a radio is builtin: default some setting for that
> radio to a sane value, but allow overriding of that setting on the
> kernel commandline (through a module parameter)
> - if the driver for a radio is a module: default that same setting to
> something invalid and _force_ the use of module parameters to get a
> sane value
>
> This logic isn't implemented flawless but it does look to me that this
> is intentional.
>
> 2) I'm not sure why things are done that way. Why can't builtin drivers
> and loadable drivers default to identical values? But perhaps I'm just
> misunderstanding the code.
They could default to identical values. Maybe someone thinks that
it's more difficult to pass parameters to builtin drivers so they
just try to use some sane defaults for them instead, whereas it's
easy (easier) to pass parameters to loadable modules. ??
--
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
next prev parent reply other threads:[~2011-10-30 17:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-30 12:08 [PATCH] [RESEND] media: tea5764: reconcile Kconfig symbol and macro Paul Bolle
2011-10-30 16:43 ` Randy Dunlap
2011-10-30 17:12 ` Paul Bolle
2011-10-30 17:24 ` Randy Dunlap [this message]
[not found] ` <1319995903.14409.42.camel@x61.thuisdomein>
2011-11-03 18:34 ` Mauro Carvalho Chehab
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=4EAD8832.9090509@xenotime.net \
--to=rdunlap@xenotime.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@infradead.org \
--cc=pebolle@tiscali.nl \
/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