lkml.org 
[lkml]   [2020]   [Jan]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [alsa-devel] [PATCH 4/5] soundwire: intel: add sdw_stream_setup helper for .startup callback
From
Date


>> + 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.

\
 
 \ /
  Last update: 2020-01-14 20:53    [W:0.070 / U:3.548 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site