Re: [PATCH RESEND 5/8] drm/print: underscore prefix functions that should be private to print

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

 



On Mon, Oct 28, 2019 at 12:38:19PM +0200, Jani Nikula wrote:
> We don't want people calling the functions directly. No functional
> changes.
> 
> Signed-off-by: Jani Nikula <jani.nikula@xxxxxxxxx>

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@xxxxxxxxx>

> ---
>  drivers/gpu/drm/drm_print.c |  8 ++++----
>  include/drm/drm_print.h     | 22 +++++++++++-----------
>  2 files changed, 15 insertions(+), 15 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_print.c b/drivers/gpu/drm/drm_print.c
> index a0d1cde9888a..703b126dd074 100644
> --- a/drivers/gpu/drm/drm_print.c
> +++ b/drivers/gpu/drm/drm_print.c
> @@ -280,7 +280,7 @@ void drm_dev_dbg(const struct device *dev, unsigned int category,
>  }
>  EXPORT_SYMBOL(drm_dev_dbg);
>  
> -void drm_dbg(unsigned int category, const char *format, ...)
> +void __drm_dbg(unsigned int category, const char *format, ...)
>  {
>  	struct va_format vaf;
>  	va_list args;
> @@ -297,9 +297,9 @@ void drm_dbg(unsigned int category, const char *format, ...)
>  
>  	va_end(args);
>  }
> -EXPORT_SYMBOL(drm_dbg);
> +EXPORT_SYMBOL(__drm_dbg);
>  
> -void drm_err(const char *format, ...)
> +void __drm_err(const char *format, ...)
>  {
>  	struct va_format vaf;
>  	va_list args;
> @@ -313,7 +313,7 @@ void drm_err(const char *format, ...)
>  
>  	va_end(args);
>  }
> -EXPORT_SYMBOL(drm_err);
> +EXPORT_SYMBOL(__drm_err);
>  
>  /**
>   * drm_print_regset32 - print the contents of registers to a
> diff --git a/include/drm/drm_print.h b/include/drm/drm_print.h
> index 77fef2c7e312..ce45ec46202a 100644
> --- a/include/drm/drm_print.h
> +++ b/include/drm/drm_print.h
> @@ -307,9 +307,9 @@ void drm_dev_dbg(const struct device *dev, unsigned int category,
>  		 const char *format, ...);
>  
>  __printf(2, 3)
> -void drm_dbg(unsigned int category, const char *format, ...);
> +void __drm_dbg(unsigned int category, const char *format, ...);
>  __printf(1, 2)
> -void drm_err(const char *format, ...);
> +void __drm_err(const char *format, ...);
>  
>  /* Macros to make printk easier */
>  
> @@ -339,7 +339,7 @@ void drm_err(const char *format, ...);
>  #define DRM_DEV_ERROR(dev, fmt, ...)					\
>  	drm_dev_printk(dev, KERN_ERR, "*ERROR* " fmt, ##__VA_ARGS__)
>  #define DRM_ERROR(fmt, ...)						\
> -	drm_err(fmt, ##__VA_ARGS__)
> +	__drm_err(fmt, ##__VA_ARGS__)
>  
>  /**
>   * Rate limited error output.  Like DRM_ERROR() but won't flood the log.
> @@ -380,40 +380,40 @@ void drm_err(const char *format, ...);
>  #define DRM_DEV_DEBUG(dev, fmt, ...)					\
>  	drm_dev_dbg(dev, DRM_UT_CORE, fmt, ##__VA_ARGS__)
>  #define DRM_DEBUG(fmt, ...)						\
> -	drm_dbg(DRM_UT_CORE, fmt, ##__VA_ARGS__)
> +	__drm_dbg(DRM_UT_CORE, fmt, ##__VA_ARGS__)
>  
>  #define DRM_DEV_DEBUG_DRIVER(dev, fmt, ...)				\
>  	drm_dev_dbg(dev, DRM_UT_DRIVER,	fmt, ##__VA_ARGS__)
>  #define DRM_DEBUG_DRIVER(fmt, ...)					\
> -	drm_dbg(DRM_UT_DRIVER, fmt, ##__VA_ARGS__)
> +	__drm_dbg(DRM_UT_DRIVER, fmt, ##__VA_ARGS__)
>  
>  #define DRM_DEV_DEBUG_KMS(dev, fmt, ...)				\
>  	drm_dev_dbg(dev, DRM_UT_KMS, fmt, ##__VA_ARGS__)
>  #define DRM_DEBUG_KMS(fmt, ...)						\
> -	drm_dbg(DRM_UT_KMS, fmt, ##__VA_ARGS__)
> +	__drm_dbg(DRM_UT_KMS, fmt, ##__VA_ARGS__)
>  
>  #define DRM_DEV_DEBUG_PRIME(dev, fmt, ...)				\
>  	drm_dev_dbg(dev, DRM_UT_PRIME, fmt, ##__VA_ARGS__)
>  #define DRM_DEBUG_PRIME(fmt, ...)					\
> -	drm_dbg(DRM_UT_PRIME, fmt, ##__VA_ARGS__)
> +	__drm_dbg(DRM_UT_PRIME, fmt, ##__VA_ARGS__)
>  
>  #define DRM_DEV_DEBUG_ATOMIC(dev, fmt, ...)				\
>  	drm_dev_dbg(dev, DRM_UT_ATOMIC,	fmt, ##__VA_ARGS__)
>  #define DRM_DEBUG_ATOMIC(fmt, ...)					\
> -	drm_dbg(DRM_UT_ATOMIC, fmt, ##__VA_ARGS__)
> +	__drm_dbg(DRM_UT_ATOMIC, fmt, ##__VA_ARGS__)
>  
>  #define DRM_DEV_DEBUG_VBL(dev, fmt, ...)				\
>  	drm_dev_dbg(dev, DRM_UT_VBL, fmt, ##__VA_ARGS__)
>  #define DRM_DEBUG_VBL(fmt, ...)						\
> -	drm_dbg(DRM_UT_VBL, fmt, ##__VA_ARGS__)
> +	__drm_dbg(DRM_UT_VBL, fmt, ##__VA_ARGS__)
>  
>  #define DRM_DEBUG_LEASE(fmt, ...)					\
> -	drm_dbg(DRM_UT_LEASE, fmt, ##__VA_ARGS__)
> +	__drm_dbg(DRM_UT_LEASE, fmt, ##__VA_ARGS__)
>  
>  #define	DRM_DEV_DEBUG_DP(dev, fmt, ...)					\
>  	drm_dev_dbg(dev, DRM_UT_DP, fmt, ## __VA_ARGS__)
>  #define DRM_DEBUG_DP(fmt, ...)						\
> -	drm_dbg(DRM_UT_DP, fmt, ## __VA_ARGS__)
> +	__drm_dbg(DRM_UT_DP, fmt, ## __VA_ARGS__)
>  
>  #define _DRM_DEV_DEFINE_DEBUG_RATELIMITED(dev, category, fmt, ...)	\
>  ({									\
> -- 
> 2.20.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux