All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Hellstrom <thellstrom@vmware.com>
To: dri-devel@lists.freedesktop.org
Cc: Thomas Hellstrom <thellstrom@vmware.com>,
	linux-graphics-maintainer@vmware.com
Subject: [PATCH -next 12/15] drm/vmwgfx: Improve on host message error messages
Date: Tue,  3 Jul 2018 21:14:57 +0200	[thread overview]
Message-ID: <20180703191500.2374-13-thellstrom@vmware.com> (raw)
In-Reply-To: <20180703191500.2374-1-thellstrom@vmware.com>

Make sure the error messages are a bit more descriptive, so that
a log reader may understand what's gone wrong.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Sinclair Yeh <syeh@vmware.com>
---
 drivers/gpu/drm/vmwgfx/vmwgfx_msg.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_msg.c b/drivers/gpu/drm/vmwgfx/vmwgfx_msg.c
index 21d746bdc922..a72268e97042 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_msg.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_msg.c
@@ -234,7 +234,7 @@ static int vmw_recv_msg(struct rpc_channel *channel, void **msg,
 
 		if ((HIGH_WORD(ecx) & MESSAGE_STATUS_SUCCESS) == 0 ||
 		    (HIGH_WORD(ecx) & MESSAGE_STATUS_HB) == 0) {
-			DRM_ERROR("Failed to get reply size\n");
+			DRM_ERROR("Failed to get reply size for host message.\n");
 			return -EINVAL;
 		}
 
@@ -245,7 +245,7 @@ static int vmw_recv_msg(struct rpc_channel *channel, void **msg,
 		reply_len = ebx;
 		reply     = kzalloc(reply_len + 1, GFP_KERNEL);
 		if (!reply) {
-			DRM_ERROR("Cannot allocate memory for reply\n");
+			DRM_ERROR("Cannot allocate memory for host message reply.\n");
 			return -ENOMEM;
 		}
 
@@ -338,7 +338,8 @@ int vmw_host_get_guestinfo(const char *guest_info_param,
 
 	msg = kasprintf(GFP_KERNEL, "info-get %s", guest_info_param);
 	if (!msg) {
-		DRM_ERROR("Cannot allocate memory to get %s", guest_info_param);
+		DRM_ERROR("Cannot allocate memory to get guest info \"%s\".",
+			  guest_info_param);
 		return -ENOMEM;
 	}
 
@@ -374,7 +375,7 @@ int vmw_host_get_guestinfo(const char *guest_info_param,
 out_open:
 	*length = 0;
 	kfree(msg);
-	DRM_ERROR("Failed to get %s", guest_info_param);
+	DRM_ERROR("Failed to get guest info \"%s\".", guest_info_param);
 
 	return -EINVAL;
 }
@@ -403,7 +404,7 @@ int vmw_host_log(const char *log)
 
 	msg = kasprintf(GFP_KERNEL, "log %s", log);
 	if (!msg) {
-		DRM_ERROR("Cannot allocate memory for log message\n");
+		DRM_ERROR("Cannot allocate memory for host log message.\n");
 		return -ENOMEM;
 	}
 
@@ -422,7 +423,7 @@ int vmw_host_log(const char *log)
 	vmw_close_channel(&channel);
 out_open:
 	kfree(msg);
-	DRM_ERROR("Failed to send log\n");
+	DRM_ERROR("Failed to send host log message.\n");
 
 	return -EINVAL;
 }
-- 
2.18.0.rc1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2018-07-03 19:16 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-03 19:14 [PATCH -next 00/15] vmwgfx cleanups and modesetting changes Thomas Hellstrom
2018-07-03 19:14 ` [PATCH -next 01/15] drm/vmwgfx: Replace vmw_dma_buffer with vmw_buffer_object Thomas Hellstrom
2018-07-03 19:14 ` [PATCH -next 02/15] drm/vmwgfx: Move buffer object related code to vmwgfx_bo.c Thomas Hellstrom
2018-07-03 19:14 ` [PATCH -next 03/15] drm/vmwgfx: Optimize the buffer object swap_notify callback somewhat Thomas Hellstrom
2018-07-03 19:14 ` [PATCH -next 04/15] drm/vmwgfx: Use blocking buffer object reserves when evicting resources Thomas Hellstrom
2018-07-03 19:14 ` [PATCH -next 05/15] drm/vmwgfx: Fix atomic mode set check Thomas Hellstrom
2018-07-04  8:35   ` Daniel Vetter
2018-07-04  9:35     ` Thomas Hellstrom
2018-07-03 19:14 ` [PATCH -next 06/15] drm/vmwgfx: Perform topology validation during atomic modeset Thomas Hellstrom
2018-07-03 19:14 ` [PATCH -next 07/15] drm/vmwgfx: Use modeset display memory validation for layout ioctl Thomas Hellstrom
2018-07-03 19:14 ` [PATCH -next 08/15] drm/vmwgfx: Perform memory validations only when need full modeset Thomas Hellstrom
2018-07-03 19:14 ` [PATCH -next 09/15] drm/vmwgfx: Remove primary memory validation against mode while creating fb Thomas Hellstrom
2018-07-03 19:14 ` [PATCH -next 10/15] drm/vmwgfx: Use a mutex to protect gui positioning in vmw_display_unit Thomas Hellstrom
2018-07-03 19:14 ` [PATCH -next 11/15] drm/vmwgfx: Add gui_x/y to vmw_connector_state Thomas Hellstrom
2018-07-03 19:14 ` Thomas Hellstrom [this message]
2018-07-03 19:14 ` [PATCH -next 13/15] drm/vmwgfx: Reorganize the fence wait loop Thomas Hellstrom
2018-07-03 19:14 ` [PATCH -next 14/15] drm/vmwgfx: Fix host message module function declarations Thomas Hellstrom
2018-07-03 19:15 ` [PATCH -next 15/15] drm/vmwgfx: Remove an obsolete __le32 conversion Thomas Hellstrom

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180703191500.2374-13-thellstrom@vmware.com \
    --to=thellstrom@vmware.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-graphics-maintainer@vmware.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.