提交 e8406ebc 编写于 作者: T Takashi Iwai

ALSA: control: Fix missing return value comments for kernel docs

Each kernel doc comment expects the definition of the return value in
proper format.  This patch adds or fixes the missing entries for
control API.

Link: https://lore.kernel.org/r/20220713104759.4365-6-tiwai@suse.deSigned-off-by: NTakashi Iwai <tiwai@suse.de>
上级 b05d834e
...@@ -2054,6 +2054,8 @@ static int _snd_ctl_register_ioctl(snd_kctl_ioctl_func_t fcn, struct list_head * ...@@ -2054,6 +2054,8 @@ static int _snd_ctl_register_ioctl(snd_kctl_ioctl_func_t fcn, struct list_head *
* @fcn: ioctl callback function * @fcn: ioctl callback function
* *
* called from each device manager like pcm.c, hwdep.c, etc. * called from each device manager like pcm.c, hwdep.c, etc.
*
* Return: zero if successful, or a negative error code
*/ */
int snd_ctl_register_ioctl(snd_kctl_ioctl_func_t fcn) int snd_ctl_register_ioctl(snd_kctl_ioctl_func_t fcn)
{ {
...@@ -2066,6 +2068,8 @@ EXPORT_SYMBOL(snd_ctl_register_ioctl); ...@@ -2066,6 +2068,8 @@ EXPORT_SYMBOL(snd_ctl_register_ioctl);
* snd_ctl_register_ioctl_compat - register the device-specific 32bit compat * snd_ctl_register_ioctl_compat - register the device-specific 32bit compat
* control-ioctls * control-ioctls
* @fcn: ioctl callback function * @fcn: ioctl callback function
*
* Return: zero if successful, or a negative error code
*/ */
int snd_ctl_register_ioctl_compat(snd_kctl_ioctl_func_t fcn) int snd_ctl_register_ioctl_compat(snd_kctl_ioctl_func_t fcn)
{ {
...@@ -2101,6 +2105,8 @@ static int _snd_ctl_unregister_ioctl(snd_kctl_ioctl_func_t fcn, ...@@ -2101,6 +2105,8 @@ static int _snd_ctl_unregister_ioctl(snd_kctl_ioctl_func_t fcn,
/** /**
* snd_ctl_unregister_ioctl - de-register the device-specific control-ioctls * snd_ctl_unregister_ioctl - de-register the device-specific control-ioctls
* @fcn: ioctl callback function to unregister * @fcn: ioctl callback function to unregister
*
* Return: zero if successful, or a negative error code
*/ */
int snd_ctl_unregister_ioctl(snd_kctl_ioctl_func_t fcn) int snd_ctl_unregister_ioctl(snd_kctl_ioctl_func_t fcn)
{ {
...@@ -2113,6 +2119,8 @@ EXPORT_SYMBOL(snd_ctl_unregister_ioctl); ...@@ -2113,6 +2119,8 @@ EXPORT_SYMBOL(snd_ctl_unregister_ioctl);
* snd_ctl_unregister_ioctl_compat - de-register the device-specific compat * snd_ctl_unregister_ioctl_compat - de-register the device-specific compat
* 32bit control-ioctls * 32bit control-ioctls
* @fcn: ioctl callback function to unregister * @fcn: ioctl callback function to unregister
*
* Return: zero if successful, or a negative error code
*/ */
int snd_ctl_unregister_ioctl_compat(snd_kctl_ioctl_func_t fcn) int snd_ctl_unregister_ioctl_compat(snd_kctl_ioctl_func_t fcn)
{ {
...@@ -2168,7 +2176,7 @@ EXPORT_SYMBOL_GPL(snd_ctl_get_preferred_subdevice); ...@@ -2168,7 +2176,7 @@ EXPORT_SYMBOL_GPL(snd_ctl_get_preferred_subdevice);
* snd_ctl_request_layer - request to use the layer * snd_ctl_request_layer - request to use the layer
* @module_name: Name of the kernel module (NULL == build-in) * @module_name: Name of the kernel module (NULL == build-in)
* *
* Return an error code when the module cannot be loaded. * Return: zero if successful, or an error code when the module cannot be loaded
*/ */
int snd_ctl_request_layer(const char *module_name) int snd_ctl_request_layer(const char *module_name)
{ {
...@@ -2370,6 +2378,8 @@ int snd_ctl_create(struct snd_card *card) ...@@ -2370,6 +2378,8 @@ int snd_ctl_create(struct snd_card *card)
* *
* This is a function that can be used as info callback for a standard * This is a function that can be used as info callback for a standard
* boolean control with a single mono channel. * boolean control with a single mono channel.
*
* Return: Zero (always successful)
*/ */
int snd_ctl_boolean_mono_info(struct snd_kcontrol *kcontrol, int snd_ctl_boolean_mono_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo) struct snd_ctl_elem_info *uinfo)
...@@ -2390,6 +2400,8 @@ EXPORT_SYMBOL(snd_ctl_boolean_mono_info); ...@@ -2390,6 +2400,8 @@ EXPORT_SYMBOL(snd_ctl_boolean_mono_info);
* *
* This is a function that can be used as info callback for a standard * This is a function that can be used as info callback for a standard
* boolean control with stereo two channels. * boolean control with stereo two channels.
*
* Return: Zero (always successful)
*/ */
int snd_ctl_boolean_stereo_info(struct snd_kcontrol *kcontrol, int snd_ctl_boolean_stereo_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo) struct snd_ctl_elem_info *uinfo)
...@@ -2413,7 +2425,7 @@ EXPORT_SYMBOL(snd_ctl_boolean_stereo_info); ...@@ -2413,7 +2425,7 @@ EXPORT_SYMBOL(snd_ctl_boolean_stereo_info);
* If the control's accessibility is not the default (readable and writable), * If the control's accessibility is not the default (readable and writable),
* the caller has to fill @info->access. * the caller has to fill @info->access.
* *
* Return: Zero. * Return: Zero (always successful)
*/ */
int snd_ctl_enum_info(struct snd_ctl_elem_info *info, unsigned int channels, int snd_ctl_enum_info(struct snd_ctl_elem_info *info, unsigned int channels,
unsigned int items, const char *const names[]) unsigned int items, const char *const names[])
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册