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

Kalvala, Haridhar haridhar.kalvala at intel.com
Fri May 26 09:49:56 UTC 2023


On 5/26/2023 6:12 AM, Gustavo Sousa wrote:
> The former has been deprecated in favor of the latter.

Hi Gustavo,

looks good to me.

Just a thought instead of using term former & latter,

can we use DRM_ERROR & pr_err.

Reviewed-by: Haridhar Kalvala <haridhar.kalvala at intel.com>

Regards,

Haridhar Kalvala

> Signed-off-by: Gustavo Sousa <gustavo.sousa at intel.com>
> ---
>   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;
>   	}

-- 
Regards,
Haridhar Kalvala



More information about the Intel-xe mailing list