[Intel-xe] [PATCH 2/2] drm/xe: Replace DRM_ERROR() with pr_err()

Lucas De Marchi lucas.demarchi at intel.com
Fri May 26 16:33:40 UTC 2023


On Thu, May 25, 2023 at 09:42:35PM -0300, Gustavo Sousa wrote:
>The former has been deprecated in favor of the latter.
>
>Signed-off-by: Gustavo Sousa <gustavo.sousa at intel.com>


Reviewed-by: Lucas De Marchi <lucas.demarchi at intel.com>

thanks
Lucas De Marchi

>---
> drivers/gpu/drm/xe/xe_reg_sr.c | 11 ++++++-----
> drivers/gpu/drm/xe/xe_vm.c     |  3 ++-
> 2 files changed, 8 insertions(+), 6 deletions(-)
>
>diff --git a/drivers/gpu/drm/xe/xe_reg_sr.c b/drivers/gpu/drm/xe/xe_reg_sr.c
>index 24d9c73ef279..4266999cdeb6 100644
>--- a/drivers/gpu/drm/xe/xe_reg_sr.c
>+++ b/drivers/gpu/drm/xe/xe_reg_sr.c
>@@ -7,6 +7,7 @@
>
> #include <kunit/visibility.h>
> #include <linux/align.h>
>+#include <linux/printk.h>
> #include <linux/string_helpers.h>
> #include <linux/xarray.h>
>
>@@ -123,11 +124,11 @@ int xe_reg_sr_add(struct xe_reg_sr *sr,
> 	return 0;
>
> fail:
>-	DRM_ERROR("Discarding save-restore reg %04lx (clear: %08x, set: %08x, masked: %s, mcr: %s): ret=%d\n",
>-		  idx, e->clr_bits, e->set_bits,
>-		  str_yes_no(e->reg.masked),
>-		  str_yes_no(e->reg.mcr),
>-		  ret);
>+	pr_err("Discarding save-restore reg %04lx (clear: %08x, set: %08x, masked: %s, mcr: %s): ret=%d\n",
>+	       idx, e->clr_bits, e->set_bits,
>+	       str_yes_no(e->reg.masked),
>+	       str_yes_no(e->reg.mcr),
>+	       ret);
> 	reg_sr_inc_error(sr);
>
> 	return ret;
>diff --git a/drivers/gpu/drm/xe/xe_vm.c b/drivers/gpu/drm/xe/xe_vm.c
>index 4d9c8de8b348..89d8240ea6aa 100644
>--- a/drivers/gpu/drm/xe/xe_vm.c
>+++ b/drivers/gpu/drm/xe/xe_vm.c
>@@ -13,6 +13,7 @@
> #include <linux/delay.h>
> #include <linux/kthread.h>
> #include <linux/mm.h>
>+#include <linux/printk.h>
> #include <linux/swap.h>
>
> #include "xe_bo.h"
>@@ -3019,7 +3020,7 @@ int xe_vm_bind_ioctl(struct drm_device *dev, void *data, struct drm_file *file)
> 	}
>
> 	if (XE_IOCTL_ERR(xe, xe_vm_is_closed(vm))) {
>-		DRM_ERROR("VM closed while we began looking up?\n");
>+		pr_err("VM closed while we began looking up?\n");
> 		err = -ENOENT;
> 		goto put_vm;
> 	}
>-- 
>2.40.1
>


More information about the Intel-xe mailing list