[alsa-devel] [PATCH 8/8] ALSA: control: arrange snd_ctl_new() as a local function

Takashi Sakamoto o-takashi at sakamocchi.jp
Thu Feb 12 13:45:24 CET 2015


On Feb 11 2015 22:04, Takashi Iwai wrote:
> At Wed, 11 Feb 2015 13:49:29 +0100,
> Lars-Peter Clausen wrote:
>>
>> On 02/11/2015 11:37 AM, Takashi Sakamoto wrote:
>> [...]
>>> -/**
>>> - * snd_ctl_new - create a control instance from the template
>>> - * @control: the control template
>>> - * @access: the default control access
>>> - *
>>> - * Allocates a new struct snd_kcontrol instance and copies the given template
>>> - * to the new instance. It does not copy volatile data (access).
>>> - *
>>> - * Return: The pointer of the new instance, or %NULL on failure.
>>> - */
>>> -static struct snd_kcontrol *snd_ctl_new(struct snd_kcontrol *control,
>>> -					unsigned int access)
>>> +static struct snd_kcontrol *ctl_new(struct snd_kcontrol *control,
>>
>> I'd prefer to keep both the documentation as well as the 'snd_' prefix. 
>> Maybe just replace the '/**' with '/*' to prevent it from appearing in the 
>> public API documentation.
> 
> Yes, agreed.  There is no strict rule about snd_ prefix for
> non-exported objects.  We prefer not having snd_ prefix for local
> stuff in general just for readability.  But in this case, it doesn't
> improve so much.

Hm. I don't disagree with remaining these comments.

...But I have another issue. In my final patch in another series, I
change this function drastically. Then, should I spend a bit time to
revise them even if this is just a local function?
http://mailman.alsa-project.org/pipermail/alsa-devel/2015-February/087796.html


Thanks

Takashi Sakamoto


More information about the Alsa-devel mailing list