diff mbox series

[2/8] drm/client: convert to drm device based logging

Message ID 20191210123050.8799-2-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 DRM_DEV_DEBUG_KMS() and
DRM_DEV_ERROR().

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

Comments

Sam Ravnborg Dec. 17, 2019, 6:51 p.m. UTC | #1
Hi Jani.

On Tue, Dec 10, 2019 at 02:30:44PM +0200, Jani Nikula wrote:
> Prefer drm_dbg_kms() and drm_err() over DRM_DEV_DEBUG_KMS() and
> DRM_DEV_ERROR().
> 
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>

> ---
>  drivers/gpu/drm/drm_client.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_client.c b/drivers/gpu/drm/drm_client.c
> index d9a2e3695525..b031b45aa8ef 100644
> --- a/drivers/gpu/drm/drm_client.c
> +++ b/drivers/gpu/drm/drm_client.c
> @@ -150,7 +150,7 @@ void drm_client_release(struct drm_client_dev *client)
>  {
>  	struct drm_device *dev = client->dev;
>  
> -	DRM_DEV_DEBUG_KMS(dev->dev, "%s\n", client->name);
> +	drm_dbg_kms(dev, "%s\n", client->name);
>  
>  	drm_client_modeset_free(client);
>  	drm_client_close(client);
> @@ -203,7 +203,7 @@ void drm_client_dev_hotplug(struct drm_device *dev)
>  			continue;
>  
>  		ret = client->funcs->hotplug(client);
> -		DRM_DEV_DEBUG_KMS(dev->dev, "%s: ret=%d\n", client->name, ret);
> +		drm_dbg_kms(dev, "%s: ret=%d\n", client->name, ret);
>  	}
>  	mutex_unlock(&dev->clientlist_mutex);
>  }
> @@ -223,7 +223,7 @@ void drm_client_dev_restore(struct drm_device *dev)
>  			continue;
>  
>  		ret = client->funcs->restore(client);
> -		DRM_DEV_DEBUG_KMS(dev->dev, "%s: ret=%d\n", client->name, ret);
> +		drm_dbg_kms(dev, "%s: ret=%d\n", client->name, ret);
>  		if (!ret) /* The first one to return zero gets the privilege to restore */
>  			break;
>  	}
> @@ -351,8 +351,8 @@ static void drm_client_buffer_rmfb(struct drm_client_buffer *buffer)
>  
>  	ret = drm_mode_rmfb(buffer->client->dev, buffer->fb->base.id, buffer->client->file);
>  	if (ret)
> -		DRM_DEV_ERROR(buffer->client->dev->dev,
> -			      "Error removing FB:%u (%d)\n", buffer->fb->base.id, ret);
> +		drm_err(buffer->client->dev,
> +			"Error removing FB:%u (%d)\n", buffer->fb->base.id, ret);
>  
>  	buffer->fb = NULL;
>  }
> -- 
> 2.20.1
> 
> _______________________________________________
> 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_client.c b/drivers/gpu/drm/drm_client.c
index d9a2e3695525..b031b45aa8ef 100644
--- a/drivers/gpu/drm/drm_client.c
+++ b/drivers/gpu/drm/drm_client.c
@@ -150,7 +150,7 @@  void drm_client_release(struct drm_client_dev *client)
 {
 	struct drm_device *dev = client->dev;
 
-	DRM_DEV_DEBUG_KMS(dev->dev, "%s\n", client->name);
+	drm_dbg_kms(dev, "%s\n", client->name);
 
 	drm_client_modeset_free(client);
 	drm_client_close(client);
@@ -203,7 +203,7 @@  void drm_client_dev_hotplug(struct drm_device *dev)
 			continue;
 
 		ret = client->funcs->hotplug(client);
-		DRM_DEV_DEBUG_KMS(dev->dev, "%s: ret=%d\n", client->name, ret);
+		drm_dbg_kms(dev, "%s: ret=%d\n", client->name, ret);
 	}
 	mutex_unlock(&dev->clientlist_mutex);
 }
@@ -223,7 +223,7 @@  void drm_client_dev_restore(struct drm_device *dev)
 			continue;
 
 		ret = client->funcs->restore(client);
-		DRM_DEV_DEBUG_KMS(dev->dev, "%s: ret=%d\n", client->name, ret);
+		drm_dbg_kms(dev, "%s: ret=%d\n", client->name, ret);
 		if (!ret) /* The first one to return zero gets the privilege to restore */
 			break;
 	}
@@ -351,8 +351,8 @@  static void drm_client_buffer_rmfb(struct drm_client_buffer *buffer)
 
 	ret = drm_mode_rmfb(buffer->client->dev, buffer->fb->base.id, buffer->client->file);
 	if (ret)
-		DRM_DEV_ERROR(buffer->client->dev->dev,
-			      "Error removing FB:%u (%d)\n", buffer->fb->base.id, ret);
+		drm_err(buffer->client->dev,
+			"Error removing FB:%u (%d)\n", buffer->fb->base.id, ret);
 
 	buffer->fb = NULL;
 }