//1
DRM_DEBUG("%lu %d %p\n", map->size, drm_order(map->size), map->handle);
//2
#define DRM_UT_CORE 0x01
#define DRM_NAME "drm" /**< Name in kernel, /dev, and /proc */
#define DRM_DEBUG(fmt, args...) \
do { \
drm_ut_debug_printk(DRM_UT_CORE, DRM_NAME, \
__func__, fmt, ##args); \
} while (0)
#define DRM_DEBUG_DRIVER(fmt, args...) \
do { \
drm_ut_debug_printk(DRM_UT_DRIVER, DRM_NAME, \
__func__, fmt, ##args); \
} while (0)
//4
module_param_named(debug, drm_debug, int, 0600);
unsigned int drm_debug = 0; /* 1 to enable debug output */
EXPORT_SYMBOL(drm_debug);
//3
void drm_ut_debug_printk(unsigned int request_level,
const char *prefix,
const char *function_name,
const char *format, ...)
{
va_list args;
if (drm_debug & request_level) {
if (function_name)
printk(KERN_DEBUG "[%s:%s], ", prefix, function_name);
va_start(args, format);
vprintk(format, args);
va_end(args);
}
}
EXPORT_SYMBOL(drm_ut_debug_printk);文章来源:https://www.toymoban.com/news/detail-679868.html
log_error(ls, "dlm_posix_lock: op on list %llx", (unsigned long long)number);
log_print("plock device version mismatch: "
"kernel (%u.%u.%u), user (%u.%u.%u)",
DLM_PLOCK_VERSION_MAJOR,
DLM_PLOCK_VERSION_MINOR,
DLM_PLOCK_VERSION_PATCH,
info->version[0],
info->version[1],
info->version[2]);
#define log_print(fmt, args...) \
printk(KERN_ERR "dlm: "fmt"\n" , ##args)
#define log_error(ls, fmt, args...) \
printk(KERN_ERR "dlm: %s: " fmt "\n", (ls)->ls_name , ##args)文章来源地址https://www.toymoban.com/news/detail-679868.html
到了这里,关于fmt, ##__VA_ARGS__的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!