diff mbox

[v2,3/3] drm/debug: Add missing kerneldoc comments to exported functions

Message ID 7fc383433d651ee4e81e2c132afdad57ad04b9dd.1507773977.git.hamohammed.sa@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Haneen Mohammed Oct. 12, 2017, 2:39 a.m. UTC
Add missing documentation for exported functions to avoid kerneldoc
warning.

Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
---
Changes in v2: 
- Include this patch to avoid kerneldoc warning

 drivers/gpu/drm/drm_debug.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

Comments

Daniel Vetter Oct. 16, 2017, 9:03 a.m. UTC | #1
On Wed, Oct 11, 2017 at 08:39:15PM -0600, Haneen Mohammed wrote:
> Add missing documentation for exported functions to avoid kerneldoc
> warning.
> 
> Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
> ---
> Changes in v2: 
> - Include this patch to avoid kerneldoc warning
> 
>  drivers/gpu/drm/drm_debug.c | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
> 
> diff --git a/drivers/gpu/drm/drm_debug.c b/drivers/gpu/drm/drm_debug.c
> index a79593f..6e66b05 100644
> --- a/drivers/gpu/drm/drm_debug.c
> +++ b/drivers/gpu/drm/drm_debug.c
> @@ -29,6 +29,16 @@
>  
>  #define DRM_PRINTK_FMT "[" DRM_NAME ":%s]%s %pV"
>  
> +/**
> + * drm_dev_printk
> + *
> + * @dev: device pointer
> + * @level: logging level
> + * @category: debug category
> + * @function_name: function name
> + * @prefix: prefix string
> + * @format: printf() like format string

This shuts up kernel-doc complaining about missing doc entries, but not
sure how useful this is. A sentence to what it does, and that drivers
should use it through the provided DRM_DEV_* macros would be more
informative. Similarly for the one below.

Thanks, Daniel

> + */
>  void drm_dev_printk(const struct device *dev, const char *level,
>  		    unsigned int category, const char *function_name,
>  		    const char *prefix, const char *format, ...)
> @@ -53,6 +63,13 @@ void drm_dev_printk(const struct device *dev, const char *level,
>  }
>  EXPORT_SYMBOL(drm_dev_printk);
>  
> +/**
> + * drm_printk
> + *
> + * @level: logging level
> + * @category: debug category
> + * @format: printf() like format string
> + */
>  void drm_printk(const char *level, unsigned int category,
>  		const char *format, ...)
>  {
> -- 
> 2.7.4
> 
> -- 
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/7fc383433d651ee4e81e2c132afdad57ad04b9dd.1507773977.git.hamohammed.sa%40gmail.com.
> For more options, visit https://groups.google.com/d/optout.
diff mbox

Patch

diff --git a/drivers/gpu/drm/drm_debug.c b/drivers/gpu/drm/drm_debug.c
index a79593f..6e66b05 100644
--- a/drivers/gpu/drm/drm_debug.c
+++ b/drivers/gpu/drm/drm_debug.c
@@ -29,6 +29,16 @@ 
 
 #define DRM_PRINTK_FMT "[" DRM_NAME ":%s]%s %pV"
 
+/**
+ * drm_dev_printk
+ *
+ * @dev: device pointer
+ * @level: logging level
+ * @category: debug category
+ * @function_name: function name
+ * @prefix: prefix string
+ * @format: printf() like format string
+ */
 void drm_dev_printk(const struct device *dev, const char *level,
 		    unsigned int category, const char *function_name,
 		    const char *prefix, const char *format, ...)
@@ -53,6 +63,13 @@  void drm_dev_printk(const struct device *dev, const char *level,
 }
 EXPORT_SYMBOL(drm_dev_printk);
 
+/**
+ * drm_printk
+ *
+ * @level: logging level
+ * @category: debug category
+ * @format: printf() like format string
+ */
 void drm_printk(const char *level, unsigned int category,
 		const char *format, ...)
 {