diff options
author | Lyude Paul <lyude@redhat.com> | 2019-09-03 16:45:43 -0400 |
---|---|---|
committer | Lyude Paul <lyude@redhat.com> | 2019-09-03 19:29:02 -0400 |
commit | 0de54fb2d02b1f1d604db57b12341c53f07cbaf4 (patch) | |
tree | 82691002045145fe5a52c1b5fd97176027677eea /drivers/gpu/drm/drm_print.c | |
parent | 7cbce45d6243225914b5c967b4ee927a2327842a (diff) | |
download | linux-0de54fb2d02b1f1d604db57b12341c53f07cbaf4.tar.gz linux-0de54fb2d02b1f1d604db57b12341c53f07cbaf4.tar.bz2 linux-0de54fb2d02b1f1d604db57b12341c53f07cbaf4.zip |
drm/print: Add drm_err_printer()
A simple convienence function that returns a drm_printer which prints
using pr_err()
Changes since v1:
* Make __drm_printfn_err() more consistent with DRM_ERROR() - danvet
Cc: Juston Li <juston.li@intel.com>
Cc: Imre Deak <imre.deak@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Harry Wentland <hwentlan@amd.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Lyude Paul <lyude@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190903204645.25487-6-lyude@redhat.com
Diffstat (limited to 'drivers/gpu/drm/drm_print.c')
-rw-r--r-- | drivers/gpu/drm/drm_print.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_print.c b/drivers/gpu/drm/drm_print.c index a17c8a14dba4..ad302d71eeee 100644 --- a/drivers/gpu/drm/drm_print.c +++ b/drivers/gpu/drm/drm_print.c @@ -147,6 +147,12 @@ void __drm_printfn_debug(struct drm_printer *p, struct va_format *vaf) } 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); +} +EXPORT_SYMBOL(__drm_printfn_err); + /** * drm_puts - print a const string to a &drm_printer stream * @p: the &drm printer |