[alsa-devel] [PATCH 0/3] 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(-)
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.
Signed-off-by: Takashi Iwai tiwai@suse.de --- sound/pci/ac97/ac97_codec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/pci/ac97/ac97_codec.c b/sound/pci/ac97/ac97_codec.c index 82259ca61e64..1ef7cdf1d3e8 100644 --- a/sound/pci/ac97/ac97_codec.c +++ b/sound/pci/ac97/ac97_codec.c @@ -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.
Some 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.
Signed-off-by: Takashi Iwai tiwai@suse.de --- include/sound/compress_driver.h | 1 + 1 file changed, 1 insertion(+)
diff --git a/include/sound/compress_driver.h b/include/sound/compress_driver.h index cee8c00f3d3e..9924bc9cbc7c 100644 --- a/include/sound/compress_driver.h +++ b/include/sound/compress_driver.h @@ -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;
On Mon, Nov 14, 2016 at 10:30:04PM +0100, Takashi Iwai wrote:
Some 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.
Acked-by: Vinod Koul vinod.koul@intel.com
Several 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.
Signed-off-by: Takashi Iwai tiwai@suse.de --- include/sound/core.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/include/sound/core.h b/include/sound/core.h index 31079ea5e484..f7d8c10c4c45 100644 --- a/include/sound/core.h +++ b/include/sound/core.h @@ -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, ...) {}
participants (2)
-
Takashi Iwai
-
Vinod Koul