mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-02 10:43:57 +08:00
drm: Remove the prefix argument of drm_ut_debug_printk()
This is always DRM_NAME, so we can just make it part of the format string instead of asking prink to do it for us. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
1288c19fbe
commit
1287aa903f
@ -97,9 +97,7 @@ int drm_err(const char *func, const char *format, ...)
|
|||||||
}
|
}
|
||||||
EXPORT_SYMBOL(drm_err);
|
EXPORT_SYMBOL(drm_err);
|
||||||
|
|
||||||
void drm_ut_debug_printk(const char *prefix,
|
void drm_ut_debug_printk(const char *function_name, const char *format, ...)
|
||||||
const char *function_name,
|
|
||||||
const char *format, ...)
|
|
||||||
{
|
{
|
||||||
struct va_format vaf;
|
struct va_format vaf;
|
||||||
va_list args;
|
va_list args;
|
||||||
@ -108,7 +106,7 @@ void drm_ut_debug_printk(const char *prefix,
|
|||||||
vaf.fmt = format;
|
vaf.fmt = format;
|
||||||
vaf.va = &args;
|
vaf.va = &args;
|
||||||
|
|
||||||
printk(KERN_DEBUG "[%s:%s], %pV", prefix, function_name, &vaf);
|
printk(KERN_DEBUG "[" DRM_NAME ":%s], %pV", function_name, &vaf);
|
||||||
|
|
||||||
va_end(args);
|
va_end(args);
|
||||||
}
|
}
|
||||||
|
@ -121,9 +121,8 @@ struct videomode;
|
|||||||
#define DRM_UT_KMS 0x04
|
#define DRM_UT_KMS 0x04
|
||||||
#define DRM_UT_PRIME 0x08
|
#define DRM_UT_PRIME 0x08
|
||||||
|
|
||||||
extern __printf(3, 4)
|
extern __printf(2, 3)
|
||||||
void drm_ut_debug_printk(const char *prefix,
|
void drm_ut_debug_printk(const char *function_name,
|
||||||
const char *function_name,
|
|
||||||
const char *format, ...);
|
const char *format, ...);
|
||||||
extern __printf(2, 3)
|
extern __printf(2, 3)
|
||||||
int drm_err(const char *func, const char *format, ...);
|
int drm_err(const char *func, const char *format, ...);
|
||||||
@ -209,27 +208,23 @@ int drm_err(const char *func, const char *format, ...);
|
|||||||
#define DRM_DEBUG(fmt, args...) \
|
#define DRM_DEBUG(fmt, args...) \
|
||||||
do { \
|
do { \
|
||||||
if (unlikely(drm_debug & DRM_UT_CORE)) \
|
if (unlikely(drm_debug & DRM_UT_CORE)) \
|
||||||
drm_ut_debug_printk(DRM_NAME, __func__, \
|
drm_ut_debug_printk(__func__, fmt, ##args); \
|
||||||
fmt, ##args); \
|
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
#define DRM_DEBUG_DRIVER(fmt, args...) \
|
#define DRM_DEBUG_DRIVER(fmt, args...) \
|
||||||
do { \
|
do { \
|
||||||
if (unlikely(drm_debug & DRM_UT_DRIVER)) \
|
if (unlikely(drm_debug & DRM_UT_DRIVER)) \
|
||||||
drm_ut_debug_printk(DRM_NAME, __func__, \
|
drm_ut_debug_printk(__func__, fmt, ##args); \
|
||||||
fmt, ##args); \
|
|
||||||
} while (0)
|
} while (0)
|
||||||
#define DRM_DEBUG_KMS(fmt, args...) \
|
#define DRM_DEBUG_KMS(fmt, args...) \
|
||||||
do { \
|
do { \
|
||||||
if (unlikely(drm_debug & DRM_UT_KMS)) \
|
if (unlikely(drm_debug & DRM_UT_KMS)) \
|
||||||
drm_ut_debug_printk(DRM_NAME, __func__, \
|
drm_ut_debug_printk(__func__, fmt, ##args); \
|
||||||
fmt, ##args); \
|
|
||||||
} while (0)
|
} while (0)
|
||||||
#define DRM_DEBUG_PRIME(fmt, args...) \
|
#define DRM_DEBUG_PRIME(fmt, args...) \
|
||||||
do { \
|
do { \
|
||||||
if (unlikely(drm_debug & DRM_UT_PRIME)) \
|
if (unlikely(drm_debug & DRM_UT_PRIME)) \
|
||||||
drm_ut_debug_printk(DRM_NAME, __func__, \
|
drm_ut_debug_printk(__func__, fmt, ##args); \
|
||||||
fmt, ##args); \
|
|
||||||
} while (0)
|
} while (0)
|
||||||
#else
|
#else
|
||||||
#define DRM_DEBUG_DRIVER(fmt, args...) do { } while (0)
|
#define DRM_DEBUG_DRIVER(fmt, args...) do { } while (0)
|
||||||
|
Loading…
Reference in New Issue
Block a user