[Intel-xe] [PATCH] drm/xe/pat: Use 0 instead of space on error

Gustavo Sousa gustavo.sousa at intel.com
Wed Sep 6 19:59:39 UTC 2023


Quoting Lucas De Marchi (2023-09-06 16:30:09-03:00)
>Use 0 in format string instead of space so it shows as
>
>        [drm] *ERROR* Missing PAT table for platform with graphics version 20.04!
>
>instead of
>
>        [drm] *ERROR* Missing PAT table for platform with graphics version 20. 4!
>
>Signed-off-by: Lucas De Marchi <lucas.demarchi at intel.com>
>---
> drivers/gpu/drm/xe/xe_pat.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/drivers/gpu/drm/xe/xe_pat.c b/drivers/gpu/drm/xe/xe_pat.c
>index b56a65779d26..71e0e047fff3 100644
>--- a/drivers/gpu/drm/xe/xe_pat.c
>+++ b/drivers/gpu/drm/xe/xe_pat.c
>@@ -107,7 +107,7 @@ void xe_pat_init(struct xe_gt *gt)
>                  * raise an error rather than trying to silently inherit the
>                  * most recent platform's behavior.
>                  */
>-                drm_err(&xe->drm, "Missing PAT table for platform with graphics version %d.%2d!\n",
>+                drm_err(&xe->drm, "Missing PAT table for platform with graphics version %d.%02d!\n",
>                         GRAPHICS_VER(xe), GRAPHICS_VERx100(xe) % 100);

Maybe we should have a standard way of putting versions in formatted strings?

Thinking about something like:

    drm_err(&xe->drm, "Missing PAT table for platform with graphics version " XE_IP_VER_FMT "!\n",
            XE_IP_VER_FMT_ARGS(GRAPHICS_VERx100(xe)));

The macro names are kinda long though...

Anyways,

Reviewed-by: Gustavo Sousa <gustavo.sousa at intel.com>

>         }
> }
>-- 
>2.40.1
>


More information about the Intel-xe mailing list