drm/print: Handle NULL drm device in __drm_printk()
authorLuben Tuikov <ltuikov89@gmail.com>
Fri, 17 Nov 2023 03:44:53 +0000 (22:44 -0500)
committerLuben Tuikov <ltuikov89@gmail.com>
Mon, 20 Nov 2023 03:14:25 +0000 (22:14 -0500)
commite04d24c4e8062b5ed0bee7a871423a454d24ffed
treee30d28b8c45908bd549f93cbad0912da141288a4
parent47fbee5f27ed9ef43340db03ba2b58a673a6e72b
drm/print: Handle NULL drm device in __drm_printk()

drm_{err,warn,...}() use __drm_printk() which takes a drm device pointer and
uses the embedded device pointer to print the device. This facility handles
NULL device pointer, but not NULL drm device pointer. This patch makes
__drm_printk() also handle a NULL drm device pointer. The printed output is
identical to if drm->dev had been NULL.

Signed-off-by: Luben Tuikov <ltuikov89@gmail.com>
Reviewed-by: Jani Nikula <jani.nikula@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231117035427.68125-2-ltuikov89@gmail.com
include/drm/drm_print.h