diff options
author | Thomas Hellstrom <thellstrom@vmware.com> | 2018-06-20 05:38:48 -0400 |
---|---|---|
committer | Thomas Hellstrom <thellstrom@vmware.com> | 2018-07-03 14:40:10 -0400 |
commit | 3fbeccf8ceb1651b376a14bfe1005d518a4d8fa0 (patch) | |
tree | 0583b9e98a0ecd101059bdad890b88ab70366df9 | |
parent | 3e79ecdad8897dad4d311576989b6856dbcb958e (diff) |
drm/vmwgfx: Improve on host message error messages
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>
-rw-r--r-- | drivers/gpu/drm/vmwgfx/vmwgfx_msg.c | 13 |
1 files 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, | |||
234 | 234 | ||
235 | if ((HIGH_WORD(ecx) & MESSAGE_STATUS_SUCCESS) == 0 || | 235 | if ((HIGH_WORD(ecx) & MESSAGE_STATUS_SUCCESS) == 0 || |
236 | (HIGH_WORD(ecx) & MESSAGE_STATUS_HB) == 0) { | 236 | (HIGH_WORD(ecx) & MESSAGE_STATUS_HB) == 0) { |
237 | DRM_ERROR("Failed to get reply size\n"); | 237 | DRM_ERROR("Failed to get reply size for host message.\n"); |
238 | return -EINVAL; | 238 | return -EINVAL; |
239 | } | 239 | } |
240 | 240 | ||
@@ -245,7 +245,7 @@ static int vmw_recv_msg(struct rpc_channel *channel, void **msg, | |||
245 | reply_len = ebx; | 245 | reply_len = ebx; |
246 | reply = kzalloc(reply_len + 1, GFP_KERNEL); | 246 | reply = kzalloc(reply_len + 1, GFP_KERNEL); |
247 | if (!reply) { | 247 | if (!reply) { |
248 | DRM_ERROR("Cannot allocate memory for reply\n"); | 248 | DRM_ERROR("Cannot allocate memory for host message reply.\n"); |
249 | return -ENOMEM; | 249 | return -ENOMEM; |
250 | } | 250 | } |
251 | 251 | ||
@@ -338,7 +338,8 @@ int vmw_host_get_guestinfo(const char *guest_info_param, | |||
338 | 338 | ||
339 | msg = kasprintf(GFP_KERNEL, "info-get %s", guest_info_param); | 339 | msg = kasprintf(GFP_KERNEL, "info-get %s", guest_info_param); |
340 | if (!msg) { | 340 | if (!msg) { |
341 | DRM_ERROR("Cannot allocate memory to get %s", guest_info_param); | 341 | DRM_ERROR("Cannot allocate memory to get guest info \"%s\".", |
342 | guest_info_param); | ||
342 | return -ENOMEM; | 343 | return -ENOMEM; |
343 | } | 344 | } |
344 | 345 | ||
@@ -374,7 +375,7 @@ out_msg: | |||
374 | out_open: | 375 | out_open: |
375 | *length = 0; | 376 | *length = 0; |
376 | kfree(msg); | 377 | kfree(msg); |
377 | DRM_ERROR("Failed to get %s", guest_info_param); | 378 | DRM_ERROR("Failed to get guest info \"%s\".", guest_info_param); |
378 | 379 | ||
379 | return -EINVAL; | 380 | return -EINVAL; |
380 | } | 381 | } |
@@ -403,7 +404,7 @@ int vmw_host_log(const char *log) | |||
403 | 404 | ||
404 | msg = kasprintf(GFP_KERNEL, "log %s", log); | 405 | msg = kasprintf(GFP_KERNEL, "log %s", log); |
405 | if (!msg) { | 406 | if (!msg) { |
406 | DRM_ERROR("Cannot allocate memory for log message\n"); | 407 | DRM_ERROR("Cannot allocate memory for host log message.\n"); |
407 | return -ENOMEM; | 408 | return -ENOMEM; |
408 | } | 409 | } |
409 | 410 | ||
@@ -422,7 +423,7 @@ out_msg: | |||
422 | vmw_close_channel(&channel); | 423 | vmw_close_channel(&channel); |
423 | out_open: | 424 | out_open: |
424 | kfree(msg); | 425 | kfree(msg); |
425 | DRM_ERROR("Failed to send log\n"); | 426 | DRM_ERROR("Failed to send host log message.\n"); |
426 | 427 | ||
427 | return -EINVAL; | 428 | return -EINVAL; |
428 | } | 429 | } |