Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ALSA: add/change some comments describing function return values

script/kernel-doc reports the following type of warnings (when run in verbose
mode):

Warning(sound/core/init.c:152): No description found for return value of
'snd_card_create'

To fix that:
- add missing descriptions of function return values
- use "Return:" sections to describe those return values

Along the way:
- complete some descriptions
- fix some typos

Signed-off-by: Yacine Belkadi <yacine.belkadi.1@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>

authored by

Yacine Belkadi and committed by
Takashi Iwai
eb7c06e8 a817650e

+221 -126
+4 -1
include/sound/control.h
··· 189 189 * 190 190 * Add a virtual slave control to the given master element created via 191 191 * snd_ctl_create_virtual_master() beforehand. 192 - * Returns zero if successful or a negative error code. 193 192 * 194 193 * All slaves must be the same type (returning the same information 195 194 * via info callback). The function doesn't check it, so it's your ··· 198 199 * at most two channels, 199 200 * logarithmic volume control (dB level) thus no linear volume, 200 201 * master can only attenuate the volume without gain 202 + * 203 + * Return: Zero if successful or a negative error code. 201 204 */ 202 205 static inline int 203 206 snd_ctl_add_slave(struct snd_kcontrol *master, struct snd_kcontrol *slave) ··· 220 219 * When the control peeks the hardware values directly and the value 221 220 * can be changed by other means than the put callback of the element, 222 221 * this function should be used to keep the value always up-to-date. 222 + * 223 + * Return: Zero if successful or a negative error code. 223 224 */ 224 225 static inline int 225 226 snd_ctl_add_slave_uncached(struct snd_kcontrol *master,
+1 -1
include/sound/core.h
··· 229 229 * This function uses the card's device pointer to link to the 230 230 * correct &struct device. 231 231 * 232 - * Returns zero if successful, or a negative error code on failure. 232 + * Return: Zero if successful, or a negative error code on failure. 233 233 */ 234 234 static inline int snd_register_device(int type, struct snd_card *card, int dev, 235 235 const struct file_operations *f_ops,
+14 -9
include/sound/pcm.h
··· 659 659 * 660 660 * Checks whether enough free space is available on the playback buffer. 661 661 * 662 - * Returns non-zero if available, or zero if not. 662 + * Return: Non-zero if available, or zero if not. 663 663 */ 664 664 static inline int snd_pcm_playback_ready(struct snd_pcm_substream *substream) 665 665 { ··· 673 673 * 674 674 * Checks whether enough capture data is available on the capture buffer. 675 675 * 676 - * Returns non-zero if available, or zero if not. 676 + * Return: Non-zero if available, or zero if not. 677 677 */ 678 678 static inline int snd_pcm_capture_ready(struct snd_pcm_substream *substream) 679 679 { ··· 685 685 * snd_pcm_playback_data - check whether any data exists on the playback buffer 686 686 * @substream: the pcm substream instance 687 687 * 688 - * Checks whether any data exists on the playback buffer. If stop_threshold 689 - * is bigger or equal to boundary, then this function returns always non-zero. 688 + * Checks whether any data exists on the playback buffer. 690 689 * 691 - * Returns non-zero if exists, or zero if not. 690 + * Return: Non-zero if any data exists, or zero if not. If stop_threshold 691 + * is bigger or equal to boundary, then this function returns always non-zero. 692 692 */ 693 693 static inline int snd_pcm_playback_data(struct snd_pcm_substream *substream) 694 694 { ··· 705 705 * 706 706 * Checks whether the playback buffer is empty. 707 707 * 708 - * Returns non-zero if empty, or zero if not. 708 + * Return: Non-zero if empty, or zero if not. 709 709 */ 710 710 static inline int snd_pcm_playback_empty(struct snd_pcm_substream *substream) 711 711 { ··· 719 719 * 720 720 * Checks whether the capture buffer is empty. 721 721 * 722 - * Returns non-zero if empty, or zero if not. 722 + * Return: Non-zero if empty, or zero if not. 723 723 */ 724 724 static inline int snd_pcm_capture_empty(struct snd_pcm_substream *substream) 725 725 { ··· 852 852 * snd_pcm_format_cpu_endian - Check the PCM format is CPU-endian 853 853 * @format: the format to check 854 854 * 855 - * Returns 1 if the given PCM format is CPU-endian, 0 if 855 + * Return: 1 if the given PCM format is CPU-endian, 0 if 856 856 * opposite, or a negative error code if endian not specified. 857 857 */ 858 858 int snd_pcm_format_cpu_endian(snd_pcm_format_t format); ··· 963 963 * contiguous in kernel virtual space, but not in physical memory. Use this 964 964 * if the buffer is accessed by kernel code but not by device DMA. 965 965 * 966 - * Returns 1 if the buffer was changed, 0 if not changed, or a negative error 966 + * Return: 1 if the buffer was changed, 0 if not changed, or a negative error 967 967 * code. 968 968 */ 969 969 static int snd_pcm_lib_alloc_vmalloc_buffer ··· 975 975 * 976 976 * This function works like snd_pcm_lib_alloc_vmalloc_buffer(), but uses 977 977 * vmalloc_32(), i.e., the pages are allocated from 32-bit-addressable memory. 978 + * 979 + * Return: 1 if the buffer was changed, 0 if not changed, or a negative error 980 + * code. 978 981 */ 979 982 static int snd_pcm_lib_alloc_vmalloc_32_buffer 980 983 (struct snd_pcm_substream *substream, size_t size); ··· 1073 1070 /** 1074 1071 * snd_pcm_stream_str - Get a string naming the direction of a stream 1075 1072 * @substream: the pcm substream instance 1073 + * 1074 + * Return: A string naming the direction of the stream. 1076 1075 */ 1077 1076 static inline const char *snd_pcm_stream_str(struct snd_pcm_substream *substream) 1078 1077 {
+23 -18
sound/core/control.c
··· 190 190 * Allocates a new struct snd_kcontrol instance and copies the given template 191 191 * to the new instance. It does not copy volatile data (access). 192 192 * 193 - * Returns the pointer of the new instance, or NULL on failure. 193 + * Return: The pointer of the new instance, or %NULL on failure. 194 194 */ 195 195 static struct snd_kcontrol *snd_ctl_new(struct snd_kcontrol *control, 196 196 unsigned int access) ··· 224 224 * template. When the access field of ncontrol is 0, it's assumed as 225 225 * READWRITE access. When the count field is 0, it's assumes as one. 226 226 * 227 - * Returns the pointer of the newly generated instance, or NULL on failure. 227 + * Return: The pointer of the newly generated instance, or %NULL on failure. 228 228 */ 229 229 struct snd_kcontrol *snd_ctl_new1(const struct snd_kcontrol_new *ncontrol, 230 230 void *private_data) ··· 322 322 * snd_ctl_new1() to the given card. Assigns also an unique 323 323 * numid used for fast search. 324 324 * 325 - * Returns zero if successful, or a negative error code on failure. 326 - * 327 325 * It frees automatically the control which cannot be added. 326 + * 327 + * Return: Zero if successful, or a negative error code on failure. 328 + * 328 329 */ 329 330 int snd_ctl_add(struct snd_card *card, struct snd_kcontrol *kcontrol) 330 331 { ··· 381 380 * and the add_on_replace flag is set, the control is added. If the 382 381 * control exists, it is destroyed first. 383 382 * 384 - * Returns zero if successful, or a negative error code on failure. 385 - * 386 383 * It frees automatically the control which cannot be added or replaced. 384 + * 385 + * Return: Zero if successful, or a negative error code on failure. 387 386 */ 388 387 int snd_ctl_replace(struct snd_card *card, struct snd_kcontrol *kcontrol, 389 388 bool add_on_replace) ··· 443 442 * Removes the control from the card and then releases the instance. 444 443 * You don't need to call snd_ctl_free_one(). You must be in 445 444 * the write lock - down_write(&card->controls_rwsem). 446 - * 447 - * Returns 0 if successful, or a negative error code on failure. 445 + * 446 + * Return: 0 if successful, or a negative error code on failure. 448 447 */ 449 448 int snd_ctl_remove(struct snd_card *card, struct snd_kcontrol *kcontrol) 450 449 { ··· 471 470 * 472 471 * Finds the control instance with the given id, removes it from the 473 472 * card list and releases it. 474 - * 475 - * Returns 0 if successful, or a negative error code on failure. 473 + * 474 + * Return: 0 if successful, or a negative error code on failure. 476 475 */ 477 476 int snd_ctl_remove_id(struct snd_card *card, struct snd_ctl_elem_id *id) 478 477 { ··· 499 498 * 500 499 * Finds the control instance with the given id, removes it from the 501 500 * card list and releases it. 502 - * 503 - * Returns 0 if successful, or a negative error code on failure. 501 + * 502 + * Return: 0 if successful, or a negative error code on failure. 504 503 */ 505 504 static int snd_ctl_remove_user_ctl(struct snd_ctl_file * file, 506 505 struct snd_ctl_elem_id *id) ··· 542 541 * Finds the control instance with the given id, and activate or 543 542 * inactivate the control together with notification, if changed. 544 543 * 545 - * Returns 0 if unchanged, 1 if changed, or a negative error code on failure. 544 + * Return: 0 if unchanged, 1 if changed, or a negative error code on failure. 546 545 */ 547 546 int snd_ctl_activate_id(struct snd_card *card, struct snd_ctl_elem_id *id, 548 547 int active) ··· 588 587 * Finds the control with the old id from the card, and replaces the 589 588 * id with the new one. 590 589 * 591 - * Returns zero if successful, or a negative error code on failure. 590 + * Return: Zero if successful, or a negative error code on failure. 592 591 */ 593 592 int snd_ctl_rename_id(struct snd_card *card, struct snd_ctl_elem_id *src_id, 594 593 struct snd_ctl_elem_id *dst_id) ··· 617 616 * 618 617 * Finds the control instance with the given number-id from the card. 619 618 * 620 - * Returns the pointer of the instance if found, or NULL if not. 621 - * 622 619 * The caller must down card->controls_rwsem before calling this function 623 620 * (if the race condition can happen). 621 + * 622 + * Return: The pointer of the instance if found, or %NULL if not. 623 + * 624 624 */ 625 625 struct snd_kcontrol *snd_ctl_find_numid(struct snd_card *card, unsigned int numid) 626 626 { ··· 645 643 * 646 644 * Finds the control instance with the given id from the card. 647 645 * 648 - * Returns the pointer of the instance if found, or NULL if not. 649 - * 650 646 * The caller must down card->controls_rwsem before calling this function 651 647 * (if the race condition can happen). 648 + * 649 + * Return: The pointer of the instance if found, or %NULL if not. 650 + * 652 651 */ 653 652 struct snd_kcontrol *snd_ctl_find_id(struct snd_card *card, 654 653 struct snd_ctl_elem_id *id) ··· 1713 1710 * Sets all required fields in @info to their appropriate values. 1714 1711 * If the control's accessibility is not the default (readable and writable), 1715 1712 * the caller has to fill @info->access. 1713 + * 1714 + * Return: Zero. 1716 1715 */ 1717 1716 int snd_ctl_enum_info(struct snd_ctl_elem_info *info, unsigned int channels, 1718 1717 unsigned int items, const char *const names[])
+4 -4
sound/core/device.c
··· 39 39 * The data pointer plays a role as the identifier, too, so the 40 40 * pointer address must be unique and unchanged. 41 41 * 42 - * Returns zero if successful, or a negative error code on failure. 42 + * Return: Zero if successful, or a negative error code on failure. 43 43 */ 44 44 int snd_device_new(struct snd_card *card, snd_device_type_t type, 45 45 void *device_data, struct snd_device_ops *ops) ··· 73 73 * callbacks, dev_disconnect and dev_free, corresponding to the state. 74 74 * Then release the device. 75 75 * 76 - * Returns zero if successful, or a negative error code on failure or if the 76 + * Return: Zero if successful, or a negative error code on failure or if the 77 77 * device not found. 78 78 */ 79 79 int snd_device_free(struct snd_card *card, void *device_data) ··· 116 116 * 117 117 * Usually called from snd_card_disconnect(). 118 118 * 119 - * Returns zero if successful, or a negative error code on failure or if the 119 + * Return: Zero if successful, or a negative error code on failure or if the 120 120 * device not found. 121 121 */ 122 122 int snd_device_disconnect(struct snd_card *card, void *device_data) ··· 151 151 * but it can be called later if any new devices are created after 152 152 * invocation of snd_card_register(). 153 153 * 154 - * Returns zero if successful, or a negative error code on failure or if the 154 + * Return: Zero if successful, or a negative error code on failure or if the 155 155 * device not found. 156 156 */ 157 157 int snd_device_register(struct snd_card *card, void *device_data)
+1 -1
sound/core/hwdep.c
··· 356 356 * The callbacks (hwdep->ops) must be set on the returned instance 357 357 * after this call manually by the caller. 358 358 * 359 - * Returns zero if successful, or a negative error code on failure. 359 + * Return: Zero if successful, or a negative error code on failure. 360 360 */ 361 361 int snd_hwdep_new(struct snd_card *card, char *id, int device, 362 362 struct snd_hwdep **rhwdep)
+8 -8
sound/core/info.c
··· 105 105 * 106 106 * Outputs the string on the procfs buffer just like printf(). 107 107 * 108 - * Returns the size of output string. 108 + * Return: The size of output string, or a negative error code. 109 109 */ 110 110 int snd_iprintf(struct snd_info_buffer *buffer, const char *fmt, ...) 111 111 { ··· 694 694 * 695 695 * Reads one line from the buffer and stores the string. 696 696 * 697 - * Returns zero if successful, or 1 if error or EOF. 697 + * Return: Zero if successful, or 1 if error or EOF. 698 698 */ 699 699 int snd_info_get_line(struct snd_info_buffer *buffer, char *line, int len) 700 700 { ··· 735 735 * Parses the original string and copy a token to the given 736 736 * string buffer. 737 737 * 738 - * Returns the updated pointer of the original string so that 738 + * Return: The updated pointer of the original string so that 739 739 * it can be used for the next call. 740 740 */ 741 741 const char *snd_info_get_str(char *dest, const char *src, int len) ··· 774 774 * Usually called from other functions such as 775 775 * snd_info_create_card_entry(). 776 776 * 777 - * Returns the pointer of the new instance, or NULL on failure. 777 + * Return: The pointer of the new instance, or %NULL on failure. 778 778 */ 779 779 static struct snd_info_entry *snd_info_create_entry(const char *name) 780 780 { ··· 803 803 * 804 804 * Creates a new info entry and assigns it to the given module. 805 805 * 806 - * Returns the pointer of the new instance, or NULL on failure. 806 + * Return: The pointer of the new instance, or %NULL on failure. 807 807 */ 808 808 struct snd_info_entry *snd_info_create_module_entry(struct module * module, 809 809 const char *name, ··· 827 827 * 828 828 * Creates a new info entry and assigns it to the given card. 829 829 * 830 - * Returns the pointer of the new instance, or NULL on failure. 830 + * Return: The pointer of the new instance, or %NULL on failure. 831 831 */ 832 832 struct snd_info_entry *snd_info_create_card_entry(struct snd_card *card, 833 833 const char *name, ··· 893 893 * For releasing this entry, use snd_device_free() instead of 894 894 * snd_info_free_entry(). 895 895 * 896 - * Returns zero if successful, or a negative error code on failure. 896 + * Return: Zero if successful, or a negative error code on failure. 897 897 */ 898 898 int snd_card_proc_new(struct snd_card *card, const char *name, 899 899 struct snd_info_entry **entryp) ··· 949 949 * 950 950 * Registers the proc info entry. 951 951 * 952 - * Returns zero if successful, or a negative error code on failure. 952 + * Return: Zero if successful, or a negative error code on failure. 953 953 */ 954 954 int snd_info_register(struct snd_info_entry * entry) 955 955 {
+9 -7
sound/core/init.c
··· 144 144 * space for the driver to use freely. The allocated struct is stored 145 145 * in the given card_ret pointer. 146 146 * 147 - * Returns zero if successful or a negative error code. 147 + * Return: Zero if successful or a negative error code. 148 148 */ 149 149 int snd_card_create(int idx, const char *xid, 150 150 struct module *module, int extra_size, ··· 337 337 * 338 338 * Disconnects all APIs from the file-operations (user space). 339 339 * 340 - * Returns zero, otherwise a negative error code. 340 + * Return: Zero, otherwise a negative error code. 341 341 * 342 342 * Note: The current implementation replaces all active file->f_op with special 343 343 * dummy file operations (they do nothing except release). ··· 415 415 * devices automatically. That is, you don't have to release the devices 416 416 * by yourself. 417 417 * 418 - * Returns zero. Frees all associated devices and frees the control 418 + * Return: Zero. Frees all associated devices and frees the control 419 419 * interface associated to given soundcard. 420 420 */ 421 421 static int snd_card_do_free(struct snd_card *card) ··· 677 677 * external accesses. Thus, you should call this function at the end 678 678 * of the initialization of the card. 679 679 * 680 - * Returns zero otherwise a negative error code if the registration failed. 680 + * Return: Zero otherwise a negative error code if the registration failed. 681 681 */ 682 682 int snd_card_register(struct snd_card *card) 683 683 { ··· 849 849 * This function adds the component id string to the supported list. 850 850 * The component can be referred from the alsa-lib. 851 851 * 852 - * Returns zero otherwise a negative error code. 852 + * Return: Zero otherwise a negative error code. 853 853 */ 854 854 855 855 int snd_component_add(struct snd_card *card, const char *component) ··· 883 883 * This linked-list is used to keep tracking the connection state, 884 884 * and to avoid the release of busy resources by hotplug. 885 885 * 886 - * Returns zero or a negative error code. 886 + * Return: zero or a negative error code. 887 887 */ 888 888 int snd_card_file_add(struct snd_card *card, struct file *file) 889 889 { ··· 920 920 * called beforehand, it processes the pending release of 921 921 * resources. 922 922 * 923 - * Returns zero or a negative error code. 923 + * Return: Zero or a negative error code. 924 924 */ 925 925 int snd_card_file_remove(struct snd_card *card, struct file *file) 926 926 { ··· 958 958 * @power_state: expected power state 959 959 * 960 960 * Waits until the power-state is changed. 961 + * 962 + * Return: Zero if successful, or a negative error code. 961 963 * 962 964 * Note: the power lock must be active before call. 963 965 */
+1 -1
sound/core/isadma.c
··· 81 81 * @dma: the dma number 82 82 * @size: the dma transfer size 83 83 * 84 - * Returns the current pointer in DMA tranfer buffer in bytes 84 + * Return: The current pointer in DMA transfer buffer in bytes. 85 85 */ 86 86 unsigned int snd_dma_pointer(unsigned long dma, unsigned int size) 87 87 {
+4 -2
sound/core/jack.c
··· 98 98 * 99 99 * Creates a new jack object. 100 100 * 101 - * Returns zero if successful, or a negative error code on failure. 102 - * On success jjack will be initialised. 101 + * Return: Zero if successful, or a negative error code on failure. 102 + * On success @jjack will be initialised. 103 103 */ 104 104 int snd_jack_new(struct snd_card *card, const char *id, int type, 105 105 struct snd_jack **jjack) ··· 189 189 * using this abstraction. 190 190 * 191 191 * This function may only be called prior to registration of the jack. 192 + * 193 + * Return: Zero if successful, or a negative error code on failure. 192 194 */ 193 195 int snd_jack_set_key(struct snd_jack *jack, enum snd_jack_types type, 194 196 int keytype)
+10 -10
sound/core/memalloc.c
··· 81 81 * 82 82 * Allocates the physically contiguous pages with the given size. 83 83 * 84 - * Returns the pointer of the buffer, or NULL if no enoguh memory. 84 + * Return: The pointer of the buffer, or %NULL if no enough memory. 85 85 */ 86 86 void *snd_malloc_pages(size_t size, gfp_t gfp_flags) 87 87 { ··· 175 175 * 176 176 * Calls the memory-allocator function for the corresponding 177 177 * buffer type. 178 - * 179 - * Returns zero if the buffer with the given size is allocated successfully, 180 - * other a negative value at error. 178 + * 179 + * Return: Zero if the buffer with the given size is allocated successfully, 180 + * otherwise a negative value on error. 181 181 */ 182 182 int snd_dma_alloc_pages(int type, struct device *device, size_t size, 183 183 struct snd_dma_buffer *dmab) ··· 229 229 * buffer type. When no space is left, this function reduces the size and 230 230 * tries to allocate again. The size actually allocated is stored in 231 231 * res_size argument. 232 - * 233 - * Returns zero if the buffer with the given size is allocated successfully, 234 - * other a negative value at error. 232 + * 233 + * Return: Zero if the buffer with the given size is allocated successfully, 234 + * otherwise a negative value on error. 235 235 */ 236 236 int snd_dma_alloc_pages_fallback(int type, struct device *device, size_t size, 237 237 struct snd_dma_buffer *dmab) ··· 292 292 * Looks for the reserved-buffer list and re-uses if the same buffer 293 293 * is found in the list. When the buffer is found, it's removed from the free list. 294 294 * 295 - * Returns the size of buffer if the buffer is found, or zero if not found. 295 + * Return: The size of buffer if the buffer is found, or zero if not found. 296 296 */ 297 297 size_t snd_dma_get_reserved_buf(struct snd_dma_buffer *dmab, unsigned int id) 298 298 { ··· 326 326 * @id: the buffer id 327 327 * 328 328 * Reserves the given buffer as a reserved buffer. 329 - * 330 - * Returns zero if successful, or a negative code at error. 329 + * 330 + * Return: Zero if successful, or a negative code on error. 331 331 */ 332 332 int snd_dma_reserve_buf(struct snd_dma_buffer *dmab, unsigned int id) 333 333 {
+2 -2
sound/core/memory.c
··· 33 33 * 34 34 * Copies the data from mmio-space to user-space. 35 35 * 36 - * Returns zero if successful, or non-zero on failure. 36 + * Return: Zero if successful, or non-zero on failure. 37 37 */ 38 38 int copy_to_user_fromio(void __user *dst, const volatile void __iomem *src, size_t count) 39 39 { ··· 66 66 * 67 67 * Copies the data from user-space to mmio-space. 68 68 * 69 - * Returns zero if successful, or non-zero on failure. 69 + * Return: Zero if successful, or non-zero on failure. 70 70 */ 71 71 int copy_from_user_toio(volatile void __iomem *dst, const void __user *src, size_t count) 72 72 {
+3 -3
sound/core/pcm.c
··· 637 637 * calling this, i.e. zero must be given to the argument of 638 638 * snd_pcm_new(). 639 639 * 640 - * Returns zero if successful, or a negative error code on failure. 640 + * Return: Zero if successful, or a negative error code on failure. 641 641 */ 642 642 int snd_pcm_new_stream(struct snd_pcm *pcm, int stream, int substream_count) 643 643 { ··· 759 759 * The pcm operators have to be set afterwards to the new instance 760 760 * via snd_pcm_set_ops(). 761 761 * 762 - * Returns zero if successful, or a negative error code on failure. 762 + * Return: Zero if successful, or a negative error code on failure. 763 763 */ 764 764 int snd_pcm_new(struct snd_card *card, const char *id, int device, 765 765 int playback_count, int capture_count, struct snd_pcm **rpcm) ··· 787 787 * The pcm operators have to be set afterwards to the new instance 788 788 * via snd_pcm_set_ops(). 789 789 * 790 - * Returns zero if successful, or a negative error code on failure. 790 + * Return: Zero if successful, or a negative error code on failure. 791 791 */ 792 792 int snd_pcm_new_internal(struct snd_card *card, const char *id, int device, 793 793 int playback_count, int capture_count,
+43 -11
sound/core/pcm_lib.c
··· 666 666 * The interval is changed to the range satisfying both intervals. 667 667 * The interval status (min, max, integer, etc.) are evaluated. 668 668 * 669 - * Returns non-zero if the value is changed, zero if not changed. 669 + * Return: Positive if the value is changed, zero if it's not changed, or a 670 + * negative error code. 670 671 */ 671 672 int snd_interval_refine(struct snd_interval *i, const struct snd_interval *v) 672 673 { ··· 866 865 * @nump: pointer to store the resultant numerator 867 866 * @denp: pointer to store the resultant denominator 868 867 * 869 - * Returns non-zero if the value is changed, zero if not changed. 868 + * Return: Positive if the value is changed, zero if it's not changed, or a 869 + * negative error code. 870 870 */ 871 871 int snd_interval_ratnum(struct snd_interval *i, 872 872 unsigned int rats_count, struct snd_ratnum *rats, ··· 985 983 * @nump: pointer to store the resultant numerator 986 984 * @denp: pointer to store the resultant denominator 987 985 * 988 - * Returns non-zero if the value is changed, zero if not changed. 986 + * Return: Positive if the value is changed, zero if it's not changed, or a 987 + * negative error code. 989 988 */ 990 989 static int snd_interval_ratden(struct snd_interval *i, 991 990 unsigned int rats_count, struct snd_ratden *rats, ··· 1085 1082 * When mask is non-zero, only the elements corresponding to bit 1 are 1086 1083 * evaluated. 1087 1084 * 1088 - * Returns non-zero if the value is changed, zero if not changed. 1085 + * Return: Positive if the value is changed, zero if it's not changed, or a 1086 + * negative error code. 1089 1087 */ 1090 1088 int snd_interval_list(struct snd_interval *i, unsigned int count, 1091 1089 const unsigned int *list, unsigned int mask) ··· 1146 1142 * @private: the private data pointer passed to function 1147 1143 * @dep: the dependent variables 1148 1144 * 1149 - * Returns zero if successful, or a negative error code on failure. 1145 + * Return: Zero if successful, or a negative error code on failure. 1150 1146 */ 1151 1147 int snd_pcm_hw_rule_add(struct snd_pcm_runtime *runtime, unsigned int cond, 1152 1148 int var, ··· 1204 1200 * @mask: the bitmap mask 1205 1201 * 1206 1202 * Apply the constraint of the given bitmap mask to a 32-bit mask parameter. 1203 + * 1204 + * Return: Zero if successful, or a negative error code on failure. 1207 1205 */ 1208 1206 int snd_pcm_hw_constraint_mask(struct snd_pcm_runtime *runtime, snd_pcm_hw_param_t var, 1209 1207 u_int32_t mask) ··· 1226 1220 * @mask: the 64bit bitmap mask 1227 1221 * 1228 1222 * Apply the constraint of the given bitmap mask to a 64-bit mask parameter. 1223 + * 1224 + * Return: Zero if successful, or a negative error code on failure. 1229 1225 */ 1230 1226 int snd_pcm_hw_constraint_mask64(struct snd_pcm_runtime *runtime, snd_pcm_hw_param_t var, 1231 1227 u_int64_t mask) ··· 1248 1240 * @var: hw_params variable to apply the integer constraint 1249 1241 * 1250 1242 * Apply the constraint of integer to an interval parameter. 1243 + * 1244 + * Return: Positive if the value is changed, zero if it's not changed, or a 1245 + * negative error code. 1251 1246 */ 1252 1247 int snd_pcm_hw_constraint_integer(struct snd_pcm_runtime *runtime, snd_pcm_hw_param_t var) 1253 1248 { ··· 1268 1257 * @max: the maximal value 1269 1258 * 1270 1259 * Apply the min/max range constraint to an interval parameter. 1260 + * 1261 + * Return: Positive if the value is changed, zero if it's not changed, or a 1262 + * negative error code. 1271 1263 */ 1272 1264 int snd_pcm_hw_constraint_minmax(struct snd_pcm_runtime *runtime, snd_pcm_hw_param_t var, 1273 1265 unsigned int min, unsigned int max) ··· 1302 1288 * @l: list 1303 1289 * 1304 1290 * Apply the list of constraints to an interval parameter. 1291 + * 1292 + * Return: Zero if successful, or a negative error code on failure. 1305 1293 */ 1306 1294 int snd_pcm_hw_constraint_list(struct snd_pcm_runtime *runtime, 1307 1295 unsigned int cond, ··· 1338 1322 * @cond: condition bits 1339 1323 * @var: hw_params variable to apply the ratnums constraint 1340 1324 * @r: struct snd_ratnums constriants 1325 + * 1326 + * Return: Zero if successful, or a negative error code on failure. 1341 1327 */ 1342 1328 int snd_pcm_hw_constraint_ratnums(struct snd_pcm_runtime *runtime, 1343 1329 unsigned int cond, ··· 1373 1355 * @cond: condition bits 1374 1356 * @var: hw_params variable to apply the ratdens constraint 1375 1357 * @r: struct snd_ratdens constriants 1358 + * 1359 + * Return: Zero if successful, or a negative error code on failure. 1376 1360 */ 1377 1361 int snd_pcm_hw_constraint_ratdens(struct snd_pcm_runtime *runtime, 1378 1362 unsigned int cond, ··· 1406 1386 * @cond: condition bits 1407 1387 * @width: sample bits width 1408 1388 * @msbits: msbits width 1389 + * 1390 + * Return: Zero if successful, or a negative error code on failure. 1409 1391 */ 1410 1392 int snd_pcm_hw_constraint_msbits(struct snd_pcm_runtime *runtime, 1411 1393 unsigned int cond, ··· 1436 1414 * @cond: condition bits 1437 1415 * @var: hw_params variable to apply the step constraint 1438 1416 * @step: step size 1417 + * 1418 + * Return: Zero if successful, or a negative error code on failure. 1439 1419 */ 1440 1420 int snd_pcm_hw_constraint_step(struct snd_pcm_runtime *runtime, 1441 1421 unsigned int cond, ··· 1468 1444 * @runtime: PCM runtime instance 1469 1445 * @cond: condition bits 1470 1446 * @var: hw_params variable to apply the power-of-2 constraint 1447 + * 1448 + * Return: Zero if successful, or a negative error code on failure. 1471 1449 */ 1472 1450 int snd_pcm_hw_constraint_pow2(struct snd_pcm_runtime *runtime, 1473 1451 unsigned int cond, ··· 1496 1470 * snd_pcm_hw_rule_noresample - add a rule to allow disabling hw resampling 1497 1471 * @runtime: PCM runtime instance 1498 1472 * @base_rate: the rate at which the hardware does not resample 1473 + * 1474 + * Return: Zero if successful, or a negative error code on failure. 1499 1475 */ 1500 1476 int snd_pcm_hw_rule_noresample(struct snd_pcm_runtime *runtime, 1501 1477 unsigned int base_rate) ··· 1547 1519 * @var: parameter to retrieve 1548 1520 * @dir: pointer to the direction (-1,0,1) or %NULL 1549 1521 * 1550 - * Return the value for field @var if it's fixed in configuration space 1551 - * defined by @params. Return -%EINVAL otherwise. 1522 + * Return: The value for field @var if it's fixed in configuration space 1523 + * defined by @params. -%EINVAL otherwise. 1552 1524 */ 1553 1525 int snd_pcm_hw_param_value(const struct snd_pcm_hw_params *params, 1554 1526 snd_pcm_hw_param_t var, int *dir) ··· 1619 1591 * 1620 1592 * Inside configuration space defined by @params remove from @var all 1621 1593 * values > minimum. Reduce configuration space accordingly. 1622 - * Return the minimum. 1594 + * 1595 + * Return: The minimum, or a negative error code on failure. 1623 1596 */ 1624 1597 int snd_pcm_hw_param_first(struct snd_pcm_substream *pcm, 1625 1598 struct snd_pcm_hw_params *params, ··· 1666 1637 * 1667 1638 * Inside configuration space defined by @params remove from @var all 1668 1639 * values < maximum. Reduce configuration space accordingly. 1669 - * Return the maximum. 1640 + * 1641 + * Return: The maximum, or a negative error code on failure. 1670 1642 */ 1671 1643 int snd_pcm_hw_param_last(struct snd_pcm_substream *pcm, 1672 1644 struct snd_pcm_hw_params *params, ··· 1695 1665 * The configuration chosen is that obtained fixing in this order: 1696 1666 * first access, first format, first subformat, min channels, 1697 1667 * min rate, min period time, max buffer size, min tick time 1668 + * 1669 + * Return: Zero if successful, or a negative error code on failure. 1698 1670 */ 1699 1671 int snd_pcm_hw_params_choose(struct snd_pcm_substream *pcm, 1700 1672 struct snd_pcm_hw_params *params) ··· 1803 1771 * Processes the generic ioctl commands for PCM. 1804 1772 * Can be passed as the ioctl callback for PCM ops. 1805 1773 * 1806 - * Returns zero if successful, or a negative error code on failure. 1774 + * Return: Zero if successful, or a negative error code on failure. 1807 1775 */ 1808 1776 int snd_pcm_lib_ioctl(struct snd_pcm_substream *substream, 1809 1777 unsigned int cmd, void *arg) ··· 2542 2510 * @info_ret: store struct snd_pcm_chmap instance if non-NULL 2543 2511 * 2544 2512 * Create channel-mapping control elements assigned to the given PCM stream(s). 2545 - * Returns zero if succeed, or a negative error value. 2513 + * Return: Zero if successful, or a negative error value. 2546 2514 */ 2547 2515 int snd_pcm_add_chmap_ctls(struct snd_pcm *pcm, int stream, 2548 2516 const struct snd_pcm_chmap_elem *chmap,
+12 -7
sound/core/pcm_memory.c
··· 95 95 * 96 96 * Releases the pre-allocated buffer of the given substream. 97 97 * 98 - * Returns zero if successful, or a negative error code on failure. 98 + * Return: Zero if successful, or a negative error code on failure. 99 99 */ 100 100 int snd_pcm_lib_preallocate_free(struct snd_pcm_substream *substream) 101 101 { ··· 115 115 * 116 116 * Releases all the pre-allocated buffers on the given pcm. 117 117 * 118 - * Returns zero if successful, or a negative error code on failure. 118 + * Return: Zero if successful, or a negative error code on failure. 119 119 */ 120 120 int snd_pcm_lib_preallocate_free_for_all(struct snd_pcm *pcm) 121 121 { ··· 265 265 * destruction time. The dma_buf_id must be unique for all systems 266 266 * (in the same DMA buffer type) e.g. using snd_dma_pci_buf_id(). 267 267 * 268 - * Returns zero if successful, or a negative error code on failure. 268 + * Return: Zero if successful, or a negative error code on failure. 269 269 */ 270 270 int snd_pcm_lib_preallocate_pages(struct snd_pcm_substream *substream, 271 271 int type, struct device *data, ··· 289 289 * Do pre-allocation to all substreams of the given pcm for the 290 290 * specified DMA type. 291 291 * 292 - * Returns zero if successful, or a negative error code on failure. 292 + * Return: Zero if successful, or a negative error code on failure. 293 293 */ 294 294 int snd_pcm_lib_preallocate_pages_for_all(struct snd_pcm *pcm, 295 295 int type, void *data, ··· 313 313 * @substream: the pcm substream instance 314 314 * @offset: the buffer offset 315 315 * 316 - * Returns the page struct at the given buffer offset. 317 316 * Used as the page callback of PCM ops. 317 + * 318 + * Return: The page struct at the given buffer offset. %NULL on failure. 318 319 */ 319 320 struct page *snd_pcm_sgbuf_ops_page(struct snd_pcm_substream *substream, unsigned long offset) 320 321 { ··· 338 337 * Allocates the DMA buffer on the BUS type given earlier to 339 338 * snd_pcm_lib_preallocate_xxx_pages(). 340 339 * 341 - * Returns 1 if the buffer is changed, 0 if not changed, or a negative 340 + * Return: 1 if the buffer is changed, 0 if not changed, or a negative 342 341 * code on failure. 343 342 */ 344 343 int snd_pcm_lib_malloc_pages(struct snd_pcm_substream *substream, size_t size) ··· 391 390 * 392 391 * Releases the DMA buffer allocated via snd_pcm_lib_malloc_pages(). 393 392 * 394 - * Returns zero if successful, or a negative error code on failure. 393 + * Return: Zero if successful, or a negative error code on failure. 395 394 */ 396 395 int snd_pcm_lib_free_pages(struct snd_pcm_substream *substream) 397 396 { ··· 438 437 * snd_pcm_lib_free_vmalloc_buffer - free vmalloc buffer 439 438 * @substream: the substream with a buffer allocated by 440 439 * snd_pcm_lib_alloc_vmalloc_buffer() 440 + * 441 + * Return: Zero if successful, or a negative error code on failure. 441 442 */ 442 443 int snd_pcm_lib_free_vmalloc_buffer(struct snd_pcm_substream *substream) 443 444 { ··· 461 458 * @offset: offset in the buffer 462 459 * 463 460 * This function is to be used as the page callback in the PCM ops. 461 + * 462 + * Return: The page struct, or %NULL on failure. 464 463 */ 465 464 struct page *snd_pcm_lib_get_vmalloc_page(struct snd_pcm_substream *substream, 466 465 unsigned long offset)
+14 -14
sound/core/pcm_misc.c
··· 213 213 * snd_pcm_format_signed - Check the PCM format is signed linear 214 214 * @format: the format to check 215 215 * 216 - * Returns 1 if the given PCM format is signed linear, 0 if unsigned 216 + * Return: 1 if the given PCM format is signed linear, 0 if unsigned 217 217 * linear, and a negative error code for non-linear formats. 218 218 */ 219 219 int snd_pcm_format_signed(snd_pcm_format_t format) ··· 232 232 * snd_pcm_format_unsigned - Check the PCM format is unsigned linear 233 233 * @format: the format to check 234 234 * 235 - * Returns 1 if the given PCM format is unsigned linear, 0 if signed 235 + * Return: 1 if the given PCM format is unsigned linear, 0 if signed 236 236 * linear, and a negative error code for non-linear formats. 237 237 */ 238 238 int snd_pcm_format_unsigned(snd_pcm_format_t format) ··· 251 251 * snd_pcm_format_linear - Check the PCM format is linear 252 252 * @format: the format to check 253 253 * 254 - * Returns 1 if the given PCM format is linear, 0 if not. 254 + * Return: 1 if the given PCM format is linear, 0 if not. 255 255 */ 256 256 int snd_pcm_format_linear(snd_pcm_format_t format) 257 257 { ··· 264 264 * snd_pcm_format_little_endian - Check the PCM format is little-endian 265 265 * @format: the format to check 266 266 * 267 - * Returns 1 if the given PCM format is little-endian, 0 if 267 + * Return: 1 if the given PCM format is little-endian, 0 if 268 268 * big-endian, or a negative error code if endian not specified. 269 269 */ 270 270 int snd_pcm_format_little_endian(snd_pcm_format_t format) ··· 283 283 * snd_pcm_format_big_endian - Check the PCM format is big-endian 284 284 * @format: the format to check 285 285 * 286 - * Returns 1 if the given PCM format is big-endian, 0 if 286 + * Return: 1 if the given PCM format is big-endian, 0 if 287 287 * little-endian, or a negative error code if endian not specified. 288 288 */ 289 289 int snd_pcm_format_big_endian(snd_pcm_format_t format) ··· 302 302 * snd_pcm_format_width - return the bit-width of the format 303 303 * @format: the format to check 304 304 * 305 - * Returns the bit-width of the format, or a negative error code 305 + * Return: The bit-width of the format, or a negative error code 306 306 * if unknown format. 307 307 */ 308 308 int snd_pcm_format_width(snd_pcm_format_t format) ··· 321 321 * snd_pcm_format_physical_width - return the physical bit-width of the format 322 322 * @format: the format to check 323 323 * 324 - * Returns the physical bit-width of the format, or a negative error code 324 + * Return: The physical bit-width of the format, or a negative error code 325 325 * if unknown format. 326 326 */ 327 327 int snd_pcm_format_physical_width(snd_pcm_format_t format) ··· 341 341 * @format: the format to check 342 342 * @samples: sampling rate 343 343 * 344 - * Returns the byte size of the given samples for the format, or a 344 + * Return: The byte size of the given samples for the format, or a 345 345 * negative error code if unknown format. 346 346 */ 347 347 ssize_t snd_pcm_format_size(snd_pcm_format_t format, size_t samples) ··· 358 358 * snd_pcm_format_silence_64 - return the silent data in 8 bytes array 359 359 * @format: the format to check 360 360 * 361 - * Returns the format pattern to fill or NULL if error. 361 + * Return: The format pattern to fill or %NULL if error. 362 362 */ 363 363 const unsigned char *snd_pcm_format_silence_64(snd_pcm_format_t format) 364 364 { ··· 379 379 * 380 380 * Sets the silence data on the buffer for the given samples. 381 381 * 382 - * Returns zero if successful, or a negative error code on failure. 382 + * Return: Zero if successful, or a negative error code on failure. 383 383 */ 384 384 int snd_pcm_format_set_silence(snd_pcm_format_t format, void *data, unsigned int samples) 385 385 { ··· 449 449 * Determines the rate_min and rate_max fields from the rates bits of 450 450 * the given runtime->hw. 451 451 * 452 - * Returns zero if successful. 452 + * Return: Zero if successful. 453 453 */ 454 454 int snd_pcm_limit_hw_rates(struct snd_pcm_runtime *runtime) 455 455 { ··· 475 475 * snd_pcm_rate_to_rate_bit - converts sample rate to SNDRV_PCM_RATE_xxx bit 476 476 * @rate: the sample rate to convert 477 477 * 478 - * Returns the SNDRV_PCM_RATE_xxx flag that corresponds to the given rate, or 478 + * Return: The SNDRV_PCM_RATE_xxx flag that corresponds to the given rate, or 479 479 * SNDRV_PCM_RATE_KNOT for an unknown rate. 480 480 */ 481 481 unsigned int snd_pcm_rate_to_rate_bit(unsigned int rate) ··· 493 493 * snd_pcm_rate_bit_to_rate - converts SNDRV_PCM_RATE_xxx bit to sample rate 494 494 * @rate_bit: the rate bit to convert 495 495 * 496 - * Returns the sample rate that corresponds to the given SNDRV_PCM_RATE_xxx flag 497 - * or 0 for an unknown rate bit 496 + * Return: The sample rate that corresponds to the given SNDRV_PCM_RATE_xxx flag 497 + * or 0 for an unknown rate bit. 498 498 */ 499 499 unsigned int snd_pcm_rate_bit_to_rate(unsigned int rate_bit) 500 500 {
+13
sound/core/pcm_native.c
··· 898 898 /** 899 899 * snd_pcm_start - start all linked streams 900 900 * @substream: the PCM substream instance 901 + * 902 + * Return: Zero if successful, or a negative error code. 901 903 */ 902 904 int snd_pcm_start(struct snd_pcm_substream *substream) 903 905 { ··· 953 951 * @state: PCM state after stopping the stream 954 952 * 955 953 * The state of each stream is then changed to the given state unconditionally. 954 + * 955 + * Return: Zero if succesful, or a negative error code. 956 956 */ 957 957 int snd_pcm_stop(struct snd_pcm_substream *substream, snd_pcm_state_t state) 958 958 { ··· 969 965 * 970 966 * After stopping, the state is changed to SETUP. 971 967 * Unlike snd_pcm_stop(), this affects only the given stream. 968 + * 969 + * Return: Zero if succesful, or a negative error code. 972 970 */ 973 971 int snd_pcm_drain_done(struct snd_pcm_substream *substream) 974 972 { ··· 1104 1098 * @substream: the PCM substream 1105 1099 * 1106 1100 * After this call, all streams are changed to SUSPENDED state. 1101 + * 1102 + * Return: Zero if successful (or @substream is %NULL), or a negative error 1103 + * code. 1107 1104 */ 1108 1105 int snd_pcm_suspend(struct snd_pcm_substream *substream) 1109 1106 { ··· 1129 1120 * @pcm: the PCM instance 1130 1121 * 1131 1122 * After this call, all streams are changed to SUSPENDED state. 1123 + * 1124 + * Return: Zero if successful (or @pcm is %NULL), or a negative error code. 1132 1125 */ 1133 1126 int snd_pcm_suspend_all(struct snd_pcm *pcm) 1134 1127 { ··· 1354 1343 * snd_pcm_prepare - prepare the PCM substream to be triggerable 1355 1344 * @substream: the PCM substream instance 1356 1345 * @file: file to refer f_flags 1346 + * 1347 + * Return: Zero if successful, or a negative error code. 1357 1348 */ 1358 1349 static int snd_pcm_prepare(struct snd_pcm_substream *substream, 1359 1350 struct file *file)
+7 -7
sound/core/rawmidi.c
··· 863 863 * 864 864 * Reads the data from the internal buffer. 865 865 * 866 - * Returns the size of read data, or a negative error code on failure. 866 + * Return: The size of read data, or a negative error code on failure. 867 867 */ 868 868 int snd_rawmidi_receive(struct snd_rawmidi_substream *substream, 869 869 const unsigned char *buffer, int count) ··· 1024 1024 /** 1025 1025 * snd_rawmidi_transmit_empty - check whether the output buffer is empty 1026 1026 * @substream: the rawmidi substream 1027 - * 1028 - * Returns 1 if the internal output buffer is empty, 0 if not. 1027 + * 1028 + * Return: 1 if the internal output buffer is empty, 0 if not. 1029 1029 */ 1030 1030 int snd_rawmidi_transmit_empty(struct snd_rawmidi_substream *substream) 1031 1031 { ··· 1055 1055 * and call snd_rawmidi_transmit_ack() after the transmission is 1056 1056 * finished. 1057 1057 * 1058 - * Returns the size of copied data, or a negative error code on failure. 1058 + * Return: The size of copied data, or a negative error code on failure. 1059 1059 */ 1060 1060 int snd_rawmidi_transmit_peek(struct snd_rawmidi_substream *substream, 1061 1061 unsigned char *buffer, int count) ··· 1107 1107 * the given size and updates the condition. 1108 1108 * Call after the transmission is finished. 1109 1109 * 1110 - * Returns the advanced size if successful, or a negative error code on failure. 1110 + * Return: The advanced size if successful, or a negative error code on failure. 1111 1111 */ 1112 1112 int snd_rawmidi_transmit_ack(struct snd_rawmidi_substream *substream, int count) 1113 1113 { ··· 1140 1140 * 1141 1141 * Copies data from the buffer to the device and advances the pointer. 1142 1142 * 1143 - * Returns the copied size if successful, or a negative error code on failure. 1143 + * Return: The copied size if successful, or a negative error code on failure. 1144 1144 */ 1145 1145 int snd_rawmidi_transmit(struct snd_rawmidi_substream *substream, 1146 1146 unsigned char *buffer, int count) ··· 1438 1438 * Creates a new rawmidi instance. 1439 1439 * Use snd_rawmidi_set_ops() to set the operators to the new instance. 1440 1440 * 1441 - * Returns zero if successful, or a negative error code on failure. 1441 + * Return: Zero if successful, or a negative error code on failure. 1442 1442 */ 1443 1443 int snd_rawmidi_new(struct snd_card *card, char *id, int device, 1444 1444 int output_count, int input_count,
+5 -2
sound/core/sound.c
··· 102 102 * This function increments the reference counter of the card instance 103 103 * if an associated instance with the given minor number and type is found. 104 104 * The caller must call snd_card_unref() appropriately later. 105 + * 106 + * Return: The user data pointer if the specified device is found. %NULL 107 + * otherwise. 105 108 */ 106 109 void *snd_lookup_minor_data(unsigned int minor, int type) 107 110 { ··· 264 261 * Registers an ALSA device file for the given card. 265 262 * The operators have to be set in reg parameter. 266 263 * 267 - * Returns zero if successful, or a negative error code on failure. 264 + * Return: Zero if successful, or a negative error code on failure. 268 265 */ 269 266 int snd_register_device_for_dev(int type, struct snd_card *card, int dev, 270 267 const struct file_operations *f_ops, ··· 342 339 * Unregisters the device file already registered via 343 340 * snd_register_device(). 344 341 * 345 - * Returns zero if sucecessful, or a negative error code on failure 342 + * Return: Zero if successful, or a negative error code on failure. 346 343 */ 347 344 int snd_unregister_device(int type, struct snd_card *card, int dev) 348 345 {
+5 -2
sound/core/vmaster.c
··· 362 362 * @name: name string of the control element to create 363 363 * @tlv: optional TLV int array for dB information 364 364 * 365 - * Creates a virtual matster control with the given name string. 366 - * Returns the created control element, or NULL for errors (ENOMEM). 365 + * Creates a virtual master control with the given name string. 367 366 * 368 367 * After creating a vmaster element, you can add the slave controls 369 368 * via snd_ctl_add_slave() or snd_ctl_add_slave_uncached(). ··· 371 372 * for dB scale of the master control. It should be a single element 372 373 * with #SNDRV_CTL_TLVT_DB_SCALE, #SNDRV_CTL_TLV_DB_MINMAX or 373 374 * #SNDRV_CTL_TLVT_DB_MINMAX_MUTE type, and should be the max 0dB. 375 + * 376 + * Return: The created control element, or %NULL for errors (ENOMEM). 374 377 */ 375 378 struct snd_kcontrol *snd_ctl_make_virtual_master(char *name, 376 379 const unsigned int *tlv) ··· 424 423 * 425 424 * Adds the given hook to the vmaster control element so that it's called 426 425 * at each time when the value is changed. 426 + * 427 + * Return: Zero. 427 428 */ 428 429 int snd_ctl_add_vmaster_hook(struct snd_kcontrol *kcontrol, 429 430 void (*hook)(void *private_data, int),
+5 -1
sound/drivers/mpu401/mpu401_uart.c
··· 129 129 * @dev_id: mpu401 instance 130 130 * 131 131 * Processes the interrupt for MPU401-UART i/o. 132 + * 133 + * Return: %IRQ_HANDLED if the interrupt was handled. %IRQ_NONE otherwise. 132 134 */ 133 135 irqreturn_t snd_mpu401_uart_interrupt(int irq, void *dev_id) 134 136 { ··· 150 148 * @dev_id: mpu401 instance 151 149 * 152 150 * Processes the interrupt for MPU401-UART output. 151 + * 152 + * Return: %IRQ_HANDLED if the interrupt was handled. %IRQ_NONE otherwise. 153 153 */ 154 154 irqreturn_t snd_mpu401_uart_interrupt_tx(int irq, void *dev_id) 155 155 { ··· 523 519 * not the mpu401 instance itself. To access to the mpu401 instance, 524 520 * cast from rawmidi->private_data (with struct snd_mpu401 magic-cast). 525 521 * 526 - * Returns zero if successful, or a negative error code. 522 + * Return: Zero if successful, or a negative error code. 527 523 */ 528 524 int snd_mpu401_uart_new(struct snd_card *card, int device, 529 525 unsigned short hardware,
+9 -7
sound/pci/ac97/ac97_codec.c
··· 299 299 * Reads a value from the given register. This will invoke the read 300 300 * callback directly after the register check. 301 301 * 302 - * Returns the read value. 302 + * Return: The read value. 303 303 */ 304 304 unsigned short snd_ac97_read(struct snd_ac97 *ac97, unsigned short reg) 305 305 { ··· 352 352 * Compares the value with the register cache and updates the value 353 353 * only when the value is changed. 354 354 * 355 - * Returns 1 if the value is changed, 0 if no change, or a negative 355 + * Return: 1 if the value is changed, 0 if no change, or a negative 356 356 * code on failure. 357 357 */ 358 358 int snd_ac97_update(struct snd_ac97 *ac97, unsigned short reg, unsigned short value) ··· 384 384 * Updates the masked-bits on the given register only when the value 385 385 * is changed. 386 386 * 387 - * Returns 1 if the bits are changed, 0 if no change, or a negative 387 + * Return: 1 if the bits are changed, 0 if no change, or a negative 388 388 * code on failure. 389 389 */ 390 390 int snd_ac97_update_bits(struct snd_ac97 *ac97, unsigned short reg, unsigned short mask, unsigned short value) ··· 1836 1836 * snd_ac97_get_short_name - retrieve codec name 1837 1837 * @ac97: the codec instance 1838 1838 * 1839 - * Returns the short identifying name of the codec. 1839 + * Return: The short identifying name of the codec. 1840 1840 */ 1841 1841 const char *snd_ac97_get_short_name(struct snd_ac97 *ac97) 1842 1842 { ··· 1910 1910 * The AC97 bus instance is registered as a low-level device, so you don't 1911 1911 * have to release it manually. 1912 1912 * 1913 - * Returns zero if successful, or a negative error code on failure. 1913 + * Return: Zero if successful, or a negative error code on failure. 1914 1914 */ 1915 1915 int snd_ac97_bus(struct snd_card *card, int num, struct snd_ac97_bus_ops *ops, 1916 1916 void *private_data, struct snd_ac97_bus **rbus) ··· 2006 2006 * The ac97 instance is registered as a low-level device, so you don't 2007 2007 * have to release it manually. 2008 2008 * 2009 - * Returns zero if successful, or a negative error code on failure. 2009 + * Return: Zero if successful, or a negative error code on failure. 2010 2010 */ 2011 2011 int snd_ac97_mixer(struct snd_ac97_bus *bus, struct snd_ac97_template *template, struct snd_ac97 **rac97) 2012 2012 { ··· 2373 2373 * @powerup: non-zero when power up the part 2374 2374 * 2375 2375 * Update the AC97 powerdown register bits of the given part. 2376 + * 2377 + * Return: Zero. 2376 2378 */ 2377 2379 int snd_ac97_update_power(struct snd_ac97 *ac97, int reg, int powerup) 2378 2380 { ··· 2887 2885 * headphone (true line-out) control as "Master". 2888 2886 * The quirk-list must be terminated with a zero-filled entry. 2889 2887 * 2890 - * Returns zero if successful, or a negative error code on failure. 2888 + * Return: Zero if successful, or a negative error code on failure. 2891 2889 */ 2892 2890 2893 2891 int snd_ac97_tune_hardware(struct snd_ac97 *ac97, struct ac97_quirk *quirk, const char *override)
+9 -1
sound/pci/ac97/ac97_pcm.c
··· 253 253 * AC97_SPDIF is accepted as a pseudo register to modify the SPDIF 254 254 * status bits. 255 255 * 256 - * Returns zero if successful, or a negative error code on failure. 256 + * Return: Zero if successful, or a negative error code on failure. 257 257 */ 258 258 int snd_ac97_set_rate(struct snd_ac97 *ac97, int reg, unsigned int rate) 259 259 { ··· 440 440 * It assigns available AC97 slots for given PCMs. If none or only 441 441 * some slots are available, pcm->xxx.slots and pcm->xxx.rslots[] members 442 442 * are reduced and might be zero. 443 + * 444 + * Return: Zero if successful, or a negative error code on failure. 443 445 */ 444 446 int snd_ac97_pcm_assign(struct snd_ac97_bus *bus, 445 447 unsigned short pcms_count, ··· 564 562 * @slots: a subset of allocated slots (snd_ac97_pcm_assign) for this pcm 565 563 * 566 564 * It locks the specified slots and sets the given rate to AC97 registers. 565 + * 566 + * Return: Zero if successful, or a negative error code on failure. 567 567 */ 568 568 int snd_ac97_pcm_open(struct ac97_pcm *pcm, unsigned int rate, 569 569 enum ac97_pcm_cfg cfg, unsigned short slots) ··· 648 644 * @pcm: the ac97 pcm instance 649 645 * 650 646 * It frees the locked AC97 slots. 647 + * 648 + * Return: Zero. 651 649 */ 652 650 int snd_ac97_pcm_close(struct ac97_pcm *pcm) 653 651 { ··· 724 718 * 725 719 * Installs the hardware constraint rules to prevent using double rates and 726 720 * more than two channels at the same time. 721 + * 722 + * Return: Zero if successful, or a negative error code on failure. 727 723 */ 728 724 int snd_ac97_pcm_double_rate_rules(struct snd_pcm_runtime *runtime) 729 725 {
+15 -7
sound/sound_core.c
··· 352 352 * @dev: device pointer 353 353 * 354 354 * Allocate a special sound device by minor number from the sound 355 - * subsystem. The allocated number is returned on success. On failure 355 + * subsystem. 356 + * 357 + * Return: The allocated number is returned on success. On failure, 356 358 * a negative error code is returned. 357 359 */ 358 360 ··· 438 436 * @dev: Unit number to allocate 439 437 * 440 438 * Allocate a mixer device. Unit is the number of the mixer requested. 441 - * Pass -1 to request the next free mixer unit. On success the allocated 442 - * number is returned, on failure a negative error code is returned. 439 + * Pass -1 to request the next free mixer unit. 440 + * 441 + * Return: On success, the allocated number is returned. On failure, 442 + * a negative error code is returned. 443 443 */ 444 444 445 445 int register_sound_mixer(const struct file_operations *fops, int dev) ··· 458 454 * @dev: Unit number to allocate 459 455 * 460 456 * Allocate a midi device. Unit is the number of the midi device requested. 461 - * Pass -1 to request the next free midi unit. On success the allocated 462 - * number is returned, on failure a negative error code is returned. 457 + * Pass -1 to request the next free midi unit. 458 + * 459 + * Return: On success, the allocated number is returned. On failure, 460 + * a negative error code is returned. 463 461 */ 464 462 465 463 int register_sound_midi(const struct file_operations *fops, int dev) ··· 483 477 * @dev: Unit number to allocate 484 478 * 485 479 * Allocate a DSP device. Unit is the number of the DSP requested. 486 - * Pass -1 to request the next free DSP unit. On success the allocated 487 - * number is returned, on failure a negative error code is returned. 480 + * Pass -1 to request the next free DSP unit. 488 481 * 489 482 * This function allocates both the audio and dsp device entries together 490 483 * and will always allocate them as a matching pair - eg dsp3/audio3 484 + * 485 + * Return: On success, the allocated number is returned. On failure, 486 + * a negative error code is returned. 491 487 */ 492 488 493 489 int register_sound_dsp(const struct file_operations *fops, int dev)