[Outreachy kernel] [PATCH v2 3/3] drm/debug: Add missing kerneldoc comments to exported functions

Daniel Vetter daniel at ffwll.ch
Mon Oct 16 09:03:30 UTC 2017


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 at 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 at googlegroups.com.
> To post to this group, send email to outreachy-kernel at 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.

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


More information about the dri-devel mailing list