[alsa-devel] [PATCH] ASoC: rt5640: ifdef for ACPI module table

Mark Brown broonie at kernel.org
Wed Sep 18 19:28:58 CEST 2013

On Wed, Sep 18, 2013 at 09:53:34AM -0700, Olof Johansson wrote:
> On Wed, Sep 18, 2013 at 04:38:42PM +0100, Mark Brown wrote:

> > In that case you should've also CCed the maintainer address, you should
> > always CC maintainers on patches.

> Sure, will do. But you should also consider using your maintainer address
> for your maintainer work. Linaro will surely be credited for it anyway
> in the oh-so-important statistics. :-)

People like that stuff for marketing outside of the stats and I like
being able to keep personal addresses for that.  TBH it's rarely a
problem, the CC maintainers bit does the right thing.

> > We're supposed to be able to do this sort of stuff without the ifdef
> > noise and have the compiler eliminate unreferenced static symbols
> > automatically, though I can't see how of_match_ptr() actually does this
> > now.  I don't immedately seem to be able to persuade Kconfig to turn
> > off OF to verify though we do have some examples which nobody has
> > complained about...

> The problem doesn't show up when you build the driver as a module, because by
> then the MODULE_DEVICE_TABLE() reference means the table is referenced. But
> when you don't build as a module, MODULE_GENERIC_TABLE() reduces down to
> nothing, thus causing this.

I'd have expected the folks doing the allyesconfig builds to have
complained then...

> Only way to avoid is as I see it is to mark the table __maybe_unused,
> which in this case doesn't look like much of a better option.

> Most other drivers, for example those using pci or of module tables, have
> Kconfig dependencies such that there's no need to ifdef. There are plenty of
> examples of drivers ifdeffing on CONFIG_OF for those tables though.

Yes, you used to have to ifdef everything but there was a thing about
stopping bothering doing that.  The same issue applies to the PM
functions.  It's certainly annoying to have to faff around with the
ifdefs all the time.

ISTR Arnd was telling me about this stuff, CCing him.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20130918/b9be2876/attachment.sig>

More information about the Alsa-devel mailing list