Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/sched: Define pr_fmt() for DRM using pr_*()

Define pr_fmt() as "[drm] " for DRM code using pr_*() facilities, especially
when no devices are available. This makes it easier to browse kernel logs.

Signed-off-by: Luben Tuikov <ltuikov89@gmail.com>
Acked-by: Danilo Krummrich <dakr@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231110002659.113208-2-ltuikov89@gmail.com

+14
+14
include/drm/drm_print.h
··· 26 26 #ifndef DRM_PRINT_H_ 27 27 #define DRM_PRINT_H_ 28 28 29 + /* Define this before including linux/printk.h, so that the format 30 + * string in pr_*() macros is correctly set for DRM. If a file wants 31 + * to define this to something else, it should do so before including 32 + * this header file. 33 + * 34 + * It is encouraged code using pr_err() to prefix their format with 35 + * the string "*ERROR* ", to make it easier to scan kernel logs. For 36 + * instance, 37 + * pr_err("*ERROR* <the rest of your format string here>", args). 38 + */ 39 + #ifndef pr_fmt 40 + #define pr_fmt(fmt) "[drm] " fmt 41 + #endif 42 + 29 43 #include <linux/compiler.h> 30 44 #include <linux/printk.h> 31 45 #include <linux/seq_file.h>