[alsa-devel] [PATCH v2 3/5] ASoC: Intel: Add Geminilake Dialog Maxim machine driver support

Mark Brown broonie at kernel.org
Wed Apr 11 18:34:14 CEST 2018


On Wed, Apr 11, 2018 at 11:20:10AM -0500, Pierre-Louis Bossart wrote:

> > +static char glk_spk_dai_name[10];
> > +static char glk_hs_dai_name[10];

> Off-by-one? "SSPx-Codec" would be 11 chars if you include null termination.

Or avoid needing global statics entirely...

> >   static int broxton_audio_probe(struct platform_device *pdev)
> >   {
> >   	struct bxt_card_private *ctx;
> > +	int dai_index = 8;

> maybe better to do an explicit search that hard-code values?
> This will actually not work if you have an additional FE for headset on GLK,
> or you are assuming a dependency on a patch added later in the series - not
> good.

Definitely, this is just a recipe for fragility.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20180411/e47b1a1f/attachment-0001.sig>


More information about the Alsa-devel mailing list