Skip to content
Permalink
Browse files
drm_print: use _dynamic_func_call_no_desc_cls
Upgrade the current use of _dynamic_func_call_no_desc(), adding the
suffix and the category arg.  The arg has been available via the
macros implementing the drm.debug api, but dyndbg lacked a simple way
to represent it and use it until recently.

Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
  • Loading branch information
jimc committed Feb 8, 2022
1 parent f81ba21 commit 84c32d359d6fb8799fe6adafa9aac70e3417972b
Showing 1 changed file with 6 additions and 5 deletions.
@@ -31,6 +31,7 @@
#include <linux/seq_file.h>
#include <linux/device.h>
#include <linux/debugfs.h>
#include <linux/dynamic_debug.h>

#include <drm/drm.h>

@@ -416,8 +417,8 @@ void __drm_dev_dbg(const struct device *dev, enum drm_debug_category category,
__drm_dev_dbg(dev, cat, fmt, ##__VA_ARGS__)
#else
#define drm_dev_dbg(dev, cat, fmt, ...) \
_dynamic_func_call_no_desc(fmt, __drm_dev_dbg, \
dev, cat, fmt, ##__VA_ARGS__)
_dynamic_func_call_no_desc_cls(fmt, cat, __drm_dev_dbg, \
dev, cat, fmt, ##__VA_ARGS__)
#endif

/**
@@ -526,11 +527,11 @@ __printf(1, 2)
void __drm_err(const char *format, ...);

#if !defined(CONFIG_DRM_USE_DYNAMIC_DEBUG)
#define __drm_dbg(fmt, ...) ___drm_dbg(fmt, ##__VA_ARGS__)
#define __drm_dbg(fmt, ...) ___drm_dbg(NULL, fmt, ##__VA_ARGS__)
#else
#define __drm_dbg(cat, fmt, ...) \
_dynamic_func_call_no_desc(fmt, ___drm_dbg, \
cat, fmt, ##__VA_ARGS__)
_dynamic_func_call_no_desc_cls(fmt, cat, ___drm_dbg, \
cat, fmt, ##__VA_ARGS__)
#endif

/* Macros to make printk easier */

0 comments on commit 84c32d3

Please sign in to comment.