All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Trivial kernel-doc fixes
@ 2016-11-14 21:30 Takashi Iwai
  2016-11-14 21:30 ` [PATCH 1/3] ALSA: ac97: Fix kernel-doc error with sphinx formatter Takashi Iwai
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Takashi Iwai @ 2016-11-14 21:30 UTC (permalink / raw)
  To: alsa-devel

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(-)

-- 
2.10.2

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/3] ALSA: ac97: Fix kernel-doc error with sphinx formatter
  2016-11-14 21:30 [PATCH 0/3] Trivial kernel-doc fixes Takashi Iwai
@ 2016-11-14 21:30 ` Takashi Iwai
  2016-11-14 21:30 ` [PATCH 2/3] ALSA: compress: Fix kernel-doc warnings Takashi Iwai
  2016-11-14 21:30 ` [PATCH 3/3] ALSA: core: " Takashi Iwai
  2 siblings, 0 replies; 5+ messages in thread
From: Takashi Iwai @ 2016-11-14 21:30 UTC (permalink / raw)
  To: alsa-devel

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.
-- 
2.10.2

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/3] ALSA: compress: Fix kernel-doc warnings
  2016-11-14 21:30 [PATCH 0/3] Trivial kernel-doc fixes Takashi Iwai
  2016-11-14 21:30 ` [PATCH 1/3] ALSA: ac97: Fix kernel-doc error with sphinx formatter Takashi Iwai
@ 2016-11-14 21:30 ` Takashi Iwai
  2016-11-15  3:21   ` Vinod Koul
  2016-11-14 21:30 ` [PATCH 3/3] ALSA: core: " Takashi Iwai
  2 siblings, 1 reply; 5+ messages in thread
From: Takashi Iwai @ 2016-11-14 21:30 UTC (permalink / raw)
  To: alsa-devel

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;
-- 
2.10.2

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 3/3] ALSA: core: Fix kernel-doc warnings
  2016-11-14 21:30 [PATCH 0/3] Trivial kernel-doc fixes Takashi Iwai
  2016-11-14 21:30 ` [PATCH 1/3] ALSA: ac97: Fix kernel-doc error with sphinx formatter Takashi Iwai
  2016-11-14 21:30 ` [PATCH 2/3] ALSA: compress: Fix kernel-doc warnings Takashi Iwai
@ 2016-11-14 21:30 ` Takashi Iwai
  2 siblings, 0 replies; 5+ messages in thread
From: Takashi Iwai @ 2016-11-14 21:30 UTC (permalink / raw)
  To: alsa-devel

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, ...) {}
-- 
2.10.2

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/3] ALSA: compress: Fix kernel-doc warnings
  2016-11-14 21:30 ` [PATCH 2/3] ALSA: compress: Fix kernel-doc warnings Takashi Iwai
@ 2016-11-15  3:21   ` Vinod Koul
  0 siblings, 0 replies; 5+ messages in thread
From: Vinod Koul @ 2016-11-15  3:21 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel

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>

-- 
~Vinod

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-11-15  3:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-14 21:30 [PATCH 0/3] Trivial kernel-doc fixes Takashi Iwai
2016-11-14 21:30 ` [PATCH 1/3] ALSA: ac97: Fix kernel-doc error with sphinx formatter Takashi Iwai
2016-11-14 21:30 ` [PATCH 2/3] ALSA: compress: Fix kernel-doc warnings Takashi Iwai
2016-11-15  3:21   ` Vinod Koul
2016-11-14 21:30 ` [PATCH 3/3] ALSA: core: " Takashi Iwai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.