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

Mark Brown broonie at kernel.org
Wed Sep 18 17:38:42 CEST 2013


On Wed, Sep 18, 2013 at 08:13:14AM -0700, Olof Johansson wrote:
> On Wed, Sep 18, 2013 at 2:41 AM, Mark Brown <broonie at kernel.org> wrote:
> > On Tue, Sep 17, 2013 at 11:10:24PM -0700, Olof Johansson wrote:

> > Please send things to the advertised maintainer addresses.

> I sent it to the person signing off on the patch that this fixes up,
> you should probably use your maintainer address for that.

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

> > Shouldn't the fix for this be to do the same as we're doing for the OF
> > tables and have an acpi_match_ptr()?  It seems like we're doing the same
> > thing so we should be handling it in a similar fashion.

> There's already ACPI_PTR(), which is exactly why this warning shows
> up. of_match_ptr() and ACPI_PTR() will evaluate to NULL if
> CONFIG_OF/ACPI aren't set, which is the case here -- which in turn is
> why there's a warning that the match table is defined but never used.

> So, the solution is either to not define the table, i.e. ifdef, or to
> not use the ACPI_PTR() macro. It makes sense to not advertise the
> driver as capable of probing on ACPI if ACPI is not enabled in the
> kernel config, which in turn means ifdef.

> Unless I'm missing something here, of course. :)

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...
-------------- 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/226bd5eb/attachment.sig>


More information about the Alsa-devel mailing list