summaryrefslogtreecommitdiffstats
path: root/drivers/staging/hv/channel_mgmt.c
diff options
context:
space:
mode:
authorHank Janssen <hjanssen@microsoft.com>2011-03-29 13:58:47 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2011-04-04 22:03:07 -0700
commit0a46618d58c90f93e8b8e9a18062d1691b70297e (patch)
tree4b12c2c36b4db6da668a2751ade5031d161ede22 /drivers/staging/hv/channel_mgmt.c
parent8de61e31466a87cf77231db52ff9c94ddb1f758b (diff)
downloadop-kernel-dev-0a46618d58c90f93e8b8e9a18062d1691b70297e.zip
op-kernel-dev-0a46618d58c90f93e8b8e9a18062d1691b70297e.tar.gz
staging: hv: Replace DPRINT with natives in hv_vmbus
Replace all remaining DPRINT calls (excluding the ringbuffer debug which is going to be done in a next set of patches) with their native pr_ calls. And also changed some of the printouts to be more useful. Signed-off-by: Hank Janssen <hjanssen@microsoft.com> Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/hv/channel_mgmt.c')
-rw-r--r--drivers/staging/hv/channel_mgmt.c25
1 files changed, 12 insertions, 13 deletions
diff --git a/drivers/staging/hv/channel_mgmt.c b/drivers/staging/hv/channel_mgmt.c
index e82a4bb..d084070 100644
--- a/drivers/staging/hv/channel_mgmt.c
+++ b/drivers/staging/hv/channel_mgmt.c
@@ -18,6 +18,8 @@
* Haiyang Zhang <haiyangz@microsoft.com>
* Hank Janssen <hjanssen@microsoft.com>
*/
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/wait.h>
@@ -403,8 +405,7 @@ static void vmbus_process_offer(struct work_struct *work)
*/
ret = vmbus_child_device_register(newchannel->device_obj);
if (ret != 0) {
- DPRINT_ERR(VMBUS,
- "unable to add child device object (relid %d)",
+ pr_err("unable to add child device object (relid %d)\n",
newchannel->offermsg.child_relid);
spin_lock_irqsave(&vmbus_connection.channel_lock, flags);
@@ -430,8 +431,9 @@ static void vmbus_process_offer(struct work_struct *work)
hv_cb_utils[cnt].callback,
newchannel) == 0) {
hv_cb_utils[cnt].channel = newchannel;
- DPRINT_INFO(VMBUS, "%s",
- hv_cb_utils[cnt].log_msg);
+
+ pr_info("%s\n", hv_cb_utils[cnt].log_msg);
+
count_hv_channel();
}
}
@@ -472,7 +474,7 @@ static void vmbus_onoffer(struct vmbus_channel_message_header *hdr)
/* Allocate the channel object and save this offer. */
newchannel = alloc_channel();
if (!newchannel) {
- DPRINT_ERR(VMBUS, "unable to allocate channel object");
+ pr_err("Unable to allocate channel object\n");
return;
}
@@ -730,8 +732,7 @@ void vmbus_onmessage(void *context)
size = msg->header.payload_size;
if (hdr->msgtype >= CHANNELMSG_COUNT) {
- DPRINT_ERR(VMBUS,
- "Received invalid channel message type %d size %d",
+ pr_err("Received invalid channel message type %d size %d\n",
hdr->msgtype, size);
print_hex_dump_bytes("", DUMP_PREFIX_NONE,
(unsigned char *)msg->u.payload, size);
@@ -741,8 +742,7 @@ void vmbus_onmessage(void *context)
if (gChannelMessageTable[hdr->msgtype].messageHandler)
gChannelMessageTable[hdr->msgtype].messageHandler(hdr);
else
- DPRINT_ERR(VMBUS, "Unhandled channel message type %d",
- hdr->msgtype);
+ pr_err("Unhandled channel message type %d\n", hdr->msgtype);
}
/*
@@ -770,7 +770,7 @@ int vmbus_request_offers(void)
ret = vmbus_post_msg(msg,
sizeof(struct vmbus_channel_message_header));
if (ret != 0) {
- DPRINT_ERR(VMBUS, "Unable to request offers - %d", ret);
+ pr_err("Unable to request offers - %d\n", ret);
goto cleanup;
}
@@ -810,9 +810,8 @@ void vmbus_release_unattached_channels(void)
if (!channel->device_obj->drv) {
list_del(&channel->listentry);
- DPRINT_INFO(VMBUS,
- "Releasing unattached device object %p",
- channel->device_obj);
+
+ pr_err("Releasing unattached device object\n");
vmbus_child_device_unregister(channel->device_obj);
free_channel(channel);
OpenPOWER on IntegriCloud