[alsa-devel] [PATCH 1/2] ALSA: core: add snd_pcm_format_by_name()
Daniel Mack
daniel at zonque.org
Thu Dec 5 10:21:19 CET 2019
On 12/5/19 9:25 AM, Takashi Iwai wrote:
>> +snd_pcm_format_t snd_pcm_format_by_name(const char *name)
>> +{
>
> Could you give the proper document in kernel-doc style?
> We try to provide some documentation at least for public API
> functions.
>
>> + int i;
>> +
>> + for (i = 0; i < ARRAY_SIZE(snd_pcm_format_names); i++)
>> + if (strcasecmp(name, snd_pcm_format_names[i]) == 0)
>> + return i;
>> +
>> + return -ENOENT;
>
> snd_pcm_format_t is with __bitwise, hence this would lead to some
> warning for sparse, I guess.
Ah, right. Thanks for the review!
v2 coming up.
Thanks,
Daniel
More information about the Alsa-devel
mailing list