From: Hank Janssen <hjanssen@microsoft.com>
To: hjanssen@microsoft.com, haiyangz@microsoft.com, gregkh@suse.de,
linux-kernel@vger.kernel.org, devel@linuxdriverproject.org,
virtualization@lists.osdl.org
Cc: "K. Y. Srinivasan" <kys@microsoft.com>
Subject: [PATCH 5/6] Staging: hv: ring_buffer.c Removed DPRINT replaced with pr_XX
Date: Tue, 22 Feb 2011 15:32:44 -0800 [thread overview]
Message-ID: <1298417565-12356-5-git-send-email-hjanssen@microsoft.com> (raw)
In-Reply-To: <1298417565-12356-4-git-send-email-hjanssen@microsoft.com>
This group of patches removes all DPRINT from hv_vmbus.ko.
It is divided in several patches due to size.
All DPRINT calls have been removed, and where needed have been
replaced with pr_XX native calls. Many debug DPRINT calls have
been removed outright.
The amount of clutter this driver prints has been
significantly reduced.
Several DPRINT calls remain in this file, they will be removed
in a subsequent patch. They are designed to print out a common
debug stream that will be implemented differently.
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>
---
drivers/staging/hv/ring_buffer.c | 25 ++++++++++---------------
1 files changed, 10 insertions(+), 15 deletions(-)
diff --git a/drivers/staging/hv/ring_buffer.c b/drivers/staging/hv/ring_buffer.c
index 66688fb..95dd75c 100644
--- a/drivers/staging/hv/ring_buffer.c
+++ b/drivers/staging/hv/ring_buffer.c
@@ -372,19 +372,16 @@ int ringbuffer_write(struct hv_ring_buffer_info *outring_info,
&bytes_avail_toread,
&bytes_avail_towrite);
- DPRINT_DBG(VMBUS, "Writing %u bytes...", totalbytes_towrite);
-
/* Dumpring_info(Outring_info, "BEFORE "); */
/* If there is only room for the packet, assume it is full. */
/* Otherwise, the next time around, we think the ring buffer */
/* is empty since the read index == write index */
if (bytes_avail_towrite <= totalbytes_towrite) {
- DPRINT_DBG(VMBUS,
- "No more space left on outbound ring buffer "
+ pr_debug("%s: %s No more space left on outbound ring buffer "
"(needed %u, avail %u)",
- totalbytes_towrite,
- bytes_avail_towrite);
+ VMBUS_MOD, __func__, totalbytes_towrite,
+ bytes_avail_towrite);
spin_unlock_irqrestore(&outring_info->ring_lock, flags);
return -1;
@@ -499,17 +496,13 @@ int ringbuffer_read(struct hv_ring_buffer_info *inring_info, void *buffer,
&bytes_avail_toread,
&bytes_avail_towrite);
- DPRINT_DBG(VMBUS, "Reading %u bytes...", buflen);
-
/* Dumpring_info(Inring_info, "BEFORE "); */
/* Make sure there is something to read */
if (bytes_avail_toread < buflen) {
- DPRINT_DBG(VMBUS,
- "got callback but not enough to read "
- "<avail to read %d read size %d>!!",
- bytes_avail_toread,
- buflen);
+ pr_debug("%s: %s got callback but not enough to read "
+ "<avail to read %d read size %d>",
+ VMBUS_MOD, __func__, bytes_avail_toread, buflen);
spin_unlock_irqrestore(&inring_info->ring_lock, flags);
@@ -568,7 +561,8 @@ copyto_ringbuffer(
/* wrap-around detected! */
if (srclen > ring_buffer_size - start_write_offset) {
- DPRINT_DBG(VMBUS, "wrap-around detected!");
+ pr_debug("%s: %s destination wrap-around detected!",
+ VMBUS_MOD, __func__);
frag_len = ring_buffer_size - start_write_offset;
memcpy(ring_buffer + start_write_offset, src, frag_len);
@@ -607,7 +601,8 @@ copyfrom_ringbuffer(
/* wrap-around detected at the src */
if (destlen > ring_buffer_size - start_read_offset) {
- DPRINT_DBG(VMBUS, "src wrap-around detected!");
+ pr_debug("%s: %s source wrap-around detected!",
+ VMBUS_MOD, __func__);
frag_len = ring_buffer_size - start_read_offset;
--
1.6.0.2
next prev parent reply other threads:[~2011-02-22 23:32 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-22 23:32 [PATCH 1/6] Staging: hv: vmbus_drv.c Replaced DPRINT with native pr_XXX Hank Janssen
2011-02-22 23:32 ` [PATCH 2/6] Staging: hv: hv.c Removed all DPRINT and debug - using pr_err now Hank Janssen
2011-02-22 23:32 ` [PATCH 3/6] Staging: hv: channel.c Removed debug DPRINTS use pr_err for errors Hank Janssen
2011-02-22 23:32 ` [PATCH 4/6] Staging: hv: channel_mgmt.c Removed DPRINT and implemented pr_XX Hank Janssen
2011-02-22 23:32 ` Hank Janssen [this message]
2011-02-22 23:32 ` [PATCH 6/6] Staging: hv: connection.c Removed DPRINT replaced with pr_XX Hank Janssen
2011-02-23 19:15 ` [PATCH 2/6] Staging: hv: hv.c Removed all DPRINT and debug - using pr_err now Greg KH
2011-02-23 19:41 ` Hank Janssen
2011-02-23 21:56 ` Greg KH
2011-02-23 23:17 ` Hank Janssen
2011-02-23 23:48 ` Greg KH
2011-02-24 0:57 ` Joe Perches
2011-02-24 1:29 ` Greg KH
2011-02-23 4:51 ` [PATCH 1/6] Staging: hv: vmbus_drv.c Replaced DPRINT with native pr_XXX Joe Perches
2011-02-23 16:58 ` Hank Janssen
2011-02-23 17:09 ` Joe Perches
2011-02-23 17:53 ` Hank Janssen
2011-02-23 17:10 ` Dan Carpenter
2011-02-23 19:11 ` Greg KH
2011-02-23 20:20 ` Hank Janssen
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=1298417565-12356-5-git-send-email-hjanssen@microsoft.com \
--to=hjanssen@microsoft.com \
--cc=devel@linuxdriverproject.org \
--cc=gregkh@suse.de \
--cc=haiyangz@microsoft.com \
--cc=kys@microsoft.com \
--cc=linux-kernel@vger.kernel.org \
--cc=virtualization@lists.osdl.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox