On Mon, 2017-09-18 at 12:14 -0500, Pierre-Louis Bossart wrote: > On 9/18/17 2:17 AM, Andy Shevchenko wrote: > > On Fri, 2017-09-08 at 00:13 -0500, Pierre-Louis Bossart wrote: > > > > > > +static inline struct snd_soc_dai *cht_get_codec_dai(struct > > > snd_soc_card *card) > > > +{ > > > + struct snd_soc_pcm_runtime *rtd; > > > + > > > + list_for_each_entry(rtd, &card->rtd_list, list) { > > > + if (!strncmp(rtd->codec_dai->name, CHT_CODEC_DAI, > > > + strlen(CHT_CODEC_DAI))) > > > > Same comments as per another patch series wrt str_n_cmp() use. > > Yes, if that's alright with you I'll clean this up in all Intel > machine > drivers in one patch since this is all copy-paste. Yep, I agree on your other comment to clean up all Intel ASoC drivers at once. > I just need a clear > indication on what the preferred means of string comparisons is... Here just a rule of common sense. No need to use str_n_* variants on top of constant literals especially followed by strlen(). -- Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> Intel Finland Oy _______________________________________________ Alsa-devel mailing list Alsa-devel@xxxxxxxxxxxxxxxx http://mailman.alsa-project.org/mailman/listinfo/alsa-devel