diff mbox series

[4/8] drm/gem-fb-helper: convert to drm device based logging

Message ID 20191210123050.8799-4-jani.nikula@intel.com (mailing list archive)
State New, archived
Headers show
Series [1/8] drm/print: introduce new struct drm_device based logging macros | expand

Commit Message

Jani Nikula Dec. 10, 2019, 12:30 p.m. UTC
Prefer drm_dbg_kms() and drm_err() over all other logging.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/drm_gem_framebuffer_helper.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Comments

Sam Ravnborg Dec. 17, 2019, 6:57 p.m. UTC | #1
On Tue, Dec 10, 2019 at 02:30:46PM +0200, Jani Nikula wrote:
> Prefer drm_dbg_kms() and drm_err() over all other logging.
> 
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>

> ---
>  drivers/gpu/drm/drm_gem_framebuffer_helper.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_gem_framebuffer_helper.c b/drivers/gpu/drm/drm_gem_framebuffer_helper.c
> index b9bcd310ca2d..3a7ace19a902 100644
> --- a/drivers/gpu/drm/drm_gem_framebuffer_helper.c
> +++ b/drivers/gpu/drm/drm_gem_framebuffer_helper.c
> @@ -74,8 +74,7 @@ drm_gem_fb_alloc(struct drm_device *dev,
>  
>  	ret = drm_framebuffer_init(dev, fb, funcs);
>  	if (ret) {
> -		DRM_DEV_ERROR(dev->dev, "Failed to init framebuffer: %d\n",
> -			      ret);
> +		drm_err(dev, "Failed to init framebuffer: %d\n", ret);
>  		kfree(fb);
>  		return ERR_PTR(ret);
>  	}
> @@ -160,7 +159,7 @@ drm_gem_fb_create_with_funcs(struct drm_device *dev, struct drm_file *file,
>  
>  		objs[i] = drm_gem_object_lookup(file, mode_cmd->handles[i]);
>  		if (!objs[i]) {
> -			DRM_DEBUG_KMS("Failed to lookup GEM object\n");
> +			drm_dbg_kms(dev, "Failed to lookup GEM object\n");
>  			ret = -ENOENT;
>  			goto err_gem_object_put;
>  		}
> -- 
> 2.20.1
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
Jani Nikula Dec. 19, 2019, 2:23 p.m. UTC | #2
On Tue, 17 Dec 2019, Sam Ravnborg <sam@ravnborg.org> wrote:
> On Tue, Dec 10, 2019 at 02:30:46PM +0200, Jani Nikula wrote:
>> Prefer drm_dbg_kms() and drm_err() over all other logging.
>> 
>> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> Reviewed-by: Sam Ravnborg <sam@ravnborg.org>

Thanks for the review, pushed up to this patch.

BR,
Jani.

>
>> ---
>>  drivers/gpu/drm/drm_gem_framebuffer_helper.c | 5 ++---
>>  1 file changed, 2 insertions(+), 3 deletions(-)
>> 
>> diff --git a/drivers/gpu/drm/drm_gem_framebuffer_helper.c b/drivers/gpu/drm/drm_gem_framebuffer_helper.c
>> index b9bcd310ca2d..3a7ace19a902 100644
>> --- a/drivers/gpu/drm/drm_gem_framebuffer_helper.c
>> +++ b/drivers/gpu/drm/drm_gem_framebuffer_helper.c
>> @@ -74,8 +74,7 @@ drm_gem_fb_alloc(struct drm_device *dev,
>>  
>>  	ret = drm_framebuffer_init(dev, fb, funcs);
>>  	if (ret) {
>> -		DRM_DEV_ERROR(dev->dev, "Failed to init framebuffer: %d\n",
>> -			      ret);
>> +		drm_err(dev, "Failed to init framebuffer: %d\n", ret);
>>  		kfree(fb);
>>  		return ERR_PTR(ret);
>>  	}
>> @@ -160,7 +159,7 @@ drm_gem_fb_create_with_funcs(struct drm_device *dev, struct drm_file *file,
>>  
>>  		objs[i] = drm_gem_object_lookup(file, mode_cmd->handles[i]);
>>  		if (!objs[i]) {
>> -			DRM_DEBUG_KMS("Failed to lookup GEM object\n");
>> +			drm_dbg_kms(dev, "Failed to lookup GEM object\n");
>>  			ret = -ENOENT;
>>  			goto err_gem_object_put;
>>  		}
>> -- 
>> 2.20.1
>> 
>> _______________________________________________
>> dri-devel mailing list
>> dri-devel@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/dri-devel
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
diff mbox series

Patch

diff --git a/drivers/gpu/drm/drm_gem_framebuffer_helper.c b/drivers/gpu/drm/drm_gem_framebuffer_helper.c
index b9bcd310ca2d..3a7ace19a902 100644
--- a/drivers/gpu/drm/drm_gem_framebuffer_helper.c
+++ b/drivers/gpu/drm/drm_gem_framebuffer_helper.c
@@ -74,8 +74,7 @@  drm_gem_fb_alloc(struct drm_device *dev,
 
 	ret = drm_framebuffer_init(dev, fb, funcs);
 	if (ret) {
-		DRM_DEV_ERROR(dev->dev, "Failed to init framebuffer: %d\n",
-			      ret);
+		drm_err(dev, "Failed to init framebuffer: %d\n", ret);
 		kfree(fb);
 		return ERR_PTR(ret);
 	}
@@ -160,7 +159,7 @@  drm_gem_fb_create_with_funcs(struct drm_device *dev, struct drm_file *file,
 
 		objs[i] = drm_gem_object_lookup(file, mode_cmd->handles[i]);
 		if (!objs[i]) {
-			DRM_DEBUG_KMS("Failed to lookup GEM object\n");
+			drm_dbg_kms(dev, "Failed to lookup GEM object\n");
 			ret = -ENOENT;
 			goto err_gem_object_put;
 		}