Trivial kernel-doc fixes
Subsystems (2)
cover Trivial kernel-doc fixes
Hi,
this is a short series of patches to fix trivial kernel-doc warnings and errors.
Takashi
===
Takashi Iwai (3):
ALSA: ac97: Fix kernel-doc error with sphinx formatter
ALSA: compress: Fix kernel-doc warnings
ALSA: core: Fix kernel-doc warnings
include/sound/compress_driver.h | 1 + include/sound/core.h | 20 ++++++++++---------- sound/pci/ac97/ac97_codec.c | 2 +- 3 files changed, 12 insertions(+), 11 deletions(-)
Signature · 1 line
2.10.2
PATCH 1/3 ALSA: ac97: Fix kernel-doc error with sphinx formatter
Sphinx takes a word like (*foo)->bar in the kernel-doc comments as a part of the emphasized marker, and complains like
./sound/pci/ac97/ac97_codec.c:1908: WARNING: Inline emphasis start-string without end-string.
For avoiding this, wrap it with the quotes (``) in the comment.
--- sound/pci/ac97/ac97_codec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/pci/ac97/ac97_codec.c +1 -1
@@ -1907,7 +1907,7 @@ static int ac97_reset_wait(struct snd_ac97 *ac97, int timeout, int with_modem)* write). The other callbacks, wait and reset, are not mandatory. * * The clock is set to 48000. If another clock is needed, set -* (*rbus)->clock manually. +* ``(*rbus)->clock`` manually. * * The AC97 bus instance is registered as a low-level device, so you don't * have to release it manually.
Signature · 1 line
2.10.2
PATCH 2/3 ALSA: compress: Fix kernel-doc warnings
In reply to Takashi IwaiSome fields in struct snd_compr have no corresponding comments, and the kernel-doc complains like:
./include/sound/compress_driver.h:162: warning: No description found for parameter 'id[64]' ./include/sound/compress_driver.h:162: warning: No description found for parameter 'proc_root' ./include/sound/compress_driver.h:162: warning: No description found for parameter 'proc_info_entry'
Actually all these are internal elements, just put "private:" comment so that they will be ignored.
--- include/sound/compress_driver.h | 1 + 1 file changed, 1 insertion(+)
include/sound/compress_driver.h +1 -0
@@ -155,6 +155,7 @@ struct snd_compr {struct mutex lock;int device;#ifdef CONFIG_SND_VERBOSE_PROCFS +/* private: */ char id[64 ];struct snd_info_entry *proc_root;struct snd_info_entry *proc_info_entry;
Signature · 1 line
2.10.2
Re: [PATCH 2/3] ALSA: compress: Fix kernel-doc warnings
Quoted 9 lines · Takashi Iwai
Some fields in struct
snd_comprhave no corresponding comments, and the kernel-doc complains like:
./include/sound/compress_driver.h:162: warning: No description found for parameter 'id[64]'./include/sound/compress_driver.h:162: warning: No description found for parameter 'proc_root'./include/sound/compress_driver.h:162: warning: No description found for parameter 'proc_info_entry'Actually all these are internal elements, just put "private:" comment so that they will be ignored.
Signature · 1 line
~Vinod
PATCH 3/3 ALSA: core: Fix kernel-doc warnings
In reply to Takashi IwaiSeveral lines in sound/core.h get the kernel-doc warnings like
./include/sound/core.h:323: warning: No description found for parameter '...'
where we use define like foo(x, args...) and "args" isn't mentioned in the comments. As an easy workaround, use simple __VA_ARGS__ for VLA in macros.
--- include/sound/core.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-)
include/sound/core.h +10 -10
@@ -308,8 +308,8 @@ __printf(4, 5)void __snd_printk (unsigned int level,const char *file,int line,const char *format, ...);#else -#define __snd_printk(level, file, line, format, args...) \ - printk(format, ##args) +#define __snd_printk (level, file, line, format, ...) \ + printk(format, ##__VA_ARGS__)#endif /**
@@ -319,8 +319,8 @@ void __snd_printk(unsigned int level, const char *file, int line,* Works like printk() but prints the file and the line of the caller * when configured with CONFIG_SND_VERBOSE_PRINTK. */ -#define snd_printk(fmt, args...) \ - __snd_printk(0, __FILE__, __LINE__, fmt, ##args) +#define snd_printk (fmt, ...) \ + __snd_printk(0, __FILE__, __LINE__, fmt, ##__VA_ARGS__)#ifdef CONFIG_SND_DEBUG /**
@@ -330,10 +330,10 @@ void __snd_printk(unsigned int level, const char *file, int line,* Works like snd_printk() for debugging purposes. * Ignored when CONFIG_SND_DEBUG is not set. */ -#define snd_printd(fmt, args...) \ - __snd_printk(1, __FILE__, __LINE__, fmt, ##args) -#define _snd_printd(level, fmt, args...) \ - __snd_printk(level, __FILE__, __LINE__, fmt, ##args) +#define snd_printd (fmt, ...) \ + __snd_printk(1, __FILE__, __LINE__, fmt, ##__VA_ARGS__) +#define _snd_printd (level, fmt, ...) \ + __snd_printk(level, __FILE__, __LINE__, fmt, ##__VA_ARGS__)/** * snd_BUG - give a BUG warning message and stack trace
@@ -383,8 +383,8 @@ static inline bool snd_printd_ratelimit(void) { return false; }* Works like snd_printk() for debugging purposes. * Ignored when CONFIG_SND_DEBUG_VERBOSE is not set. */ -#define snd_printdd(format, args...) \ - __snd_printk(2, __FILE__, __LINE__, format, ##args) +#define snd_printdd (format, ...) \ + __snd_printk(2, __FILE__, __LINE__, format, ##__VA_ARGS__)#else __printf(1, 2)static inline void snd_printdd (const char *format, ...) {}
Signature · 1 line
2.10.2