diff options
author | Jani Nikula <jani.nikula@intel.com> | 2024-01-16 15:07:26 +0200 |
---|---|---|
committer | Jani Nikula <jani.nikula@intel.com> | 2024-02-09 11:51:13 +0200 |
commit | 5e0c04c8c40b69ab165d52964433859d8b666376 (patch) | |
tree | 706ceedb0dbe72ffe41f174f425156c5ba56d3e7 /drivers/gpu/drm/drm_print.c | |
parent | 27b8f91c08d99d267ac6096d4733203161274cbb (diff) |
drm/print: make drm_err_printer() device specific by using drm_err()
With few users for drm_err_printer(), it's still feasible to convert it
to be device specific. Use drm_err() under the hood.
While at it, make the prefix optional.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Luca Coelho <luciano.coelho@intel.com>
Acked-by: Maxime Ripard <mripard@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/2a9cdcfc1df44568078f7c131e2e7e0f7c94e97e.1705410327.git.jani.nikula@intel.com
Diffstat (limited to 'drivers/gpu/drm/drm_print.c')
-rw-r--r-- | drivers/gpu/drm/drm_print.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_print.c b/drivers/gpu/drm/drm_print.c index 5b93c11895bb..91dbcdeaad3f 100644 --- a/drivers/gpu/drm/drm_print.c +++ b/drivers/gpu/drm/drm_print.c @@ -191,7 +191,12 @@ EXPORT_SYMBOL(__drm_printfn_debug); void __drm_printfn_err(struct drm_printer *p, struct va_format *vaf) { - pr_err("*ERROR* %s %pV", p->prefix, vaf); + struct drm_device *drm = p->arg; + + if (p->prefix) + drm_err(drm, "%s %pV", p->prefix, vaf); + else + drm_err(drm, "%pV", vaf); } EXPORT_SYMBOL(__drm_printfn_err); |