Re: [PATCH 4/5] soundwire: intel: add sdw_stream_setup helper for .startup callback

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





+	name = kzalloc(32, GFP_KERNEL);
+	if (!name)
+		return -ENOMEM;
+
+	if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+		snprintf(name, 32, "%s-Playback", dai->name);
+	else
+		snprintf(name, 32, "%s-Capture", dai->name);

How about use DAI_SIZE instead of 32 here and above few places? Lets not
code number like this please

Yes, thanks for spotting this. kasprintf seems like a better solution I guess, will send a v2.
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux