Re: [PATCH v1 4/8] drm/print: add kernel-doc for drm_debug_enabled

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 21 Dec 2019, Sam Ravnborg <sam@xxxxxxxxxxxx> wrote:
> Signed-off-by: Sam Ravnborg <sam@xxxxxxxxxxxx>
> Cc: Jani Nikula <jani.nikula@xxxxxxxxx>
> Cc: Sean Paul <sean@xxxxxxxxxx>
> Cc: Daniel Vetter <daniel@xxxxxxxx>
> ---
>  include/drm/drm_print.h | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
>
> diff --git a/include/drm/drm_print.h b/include/drm/drm_print.h
> index c1d333bb7534..c9fa06b517cc 100644
> --- a/include/drm/drm_print.h
> +++ b/include/drm/drm_print.h
> @@ -392,6 +392,21 @@ enum drm_debug_category {
>  	DRM_UT_DP		= 0x100,
>  };
>  
> +/**
> + * drm_debug_enabled - check if debug logging is enabled for the
> + * specified category
> + * @category: the category that is checked
> + *
> + * The category specified can be either one &drm_debug_category value or several
> + * &drm_debug_category values ORed together.

It can implementation wise, but I'd prefer to advertize it as a plain
enum for just one category in the interface.

BR,
Jani.

> + * drm_debug_enabled() can be used to avoid expensive logging functionality
> + * when logging is not enabled.
> + * Use with care.
> + *
> + * RETURNS:
> + * true if debug logging for the specified category is enabled.
> + * false otherwise
> + */
>  static inline bool drm_debug_enabled(enum drm_debug_category category)
>  {
>  	return unlikely(__drm_debug & category);

-- 
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux