Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(230)

Unified Diff: drivers/net/usb/gobi/qmidevice.c

Issue 6731002: CHROMIUM: Hide packet dumps behind a flag. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/kernel.git@master
Patch Set: Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: drivers/net/usb/gobi/qmidevice.c
diff --git a/drivers/net/usb/gobi/qmidevice.c b/drivers/net/usb/gobi/qmidevice.c
index 6abf7c4fcefa6126c53bf65ca0c031497876a7e4..268120dd080d8411049b3d3d92a1bcedec5cb777 100644
--- a/drivers/net/usb/gobi/qmidevice.c
+++ b/drivers/net/usb/gobi/qmidevice.c
@@ -166,8 +166,9 @@ static void read_callback(struct urb *urb)
data = urb->transfer_buffer;
size = urb->actual_length;
- print_hex_dump(KERN_INFO, "gobi-read: ", DUMP_PREFIX_OFFSET,
- 16, 1, data, size, true);
+ if (qcusbnet_debug)
+ print_hex_dump(KERN_INFO, "gobi-read: ", DUMP_PREFIX_OFFSET,
+ 16, 1, data, size, true);
result = qmux_parse(&cid, data, size);
if (result < 0) {
@@ -255,10 +256,11 @@ static void int_callback(struct urb *urb)
}
} else {
DBG("ignoring invalid interrupt in packet\n");
- print_hex_dump(KERN_INFO, "gobi-int: ",
- DUMP_PREFIX_OFFSET, 16, 1,
- urb->transfer_buffer,
- urb->actual_length, true);
+ if (qcusbnet_debug)
+ print_hex_dump(KERN_INFO, "gobi-int: ",
+ DUMP_PREFIX_OFFSET, 16, 1,
+ urb->transfer_buffer,
+ urb->actual_length, true);
}
}
@@ -523,8 +525,9 @@ static int write_sync(struct qcusbnet *dev, char *buf, int size, u16 cid)
NULL, dev);
DBG("Actual Write:\n");
- print_hex_dump(KERN_INFO, "gobi-write: ", DUMP_PREFIX_OFFSET,
- 16, 1, buf, size, true);
+ if (qcusbnet_debug)
+ print_hex_dump(KERN_INFO, "gobi-write: ", DUMP_PREFIX_OFFSET,
+ 16, 1, buf, size, true);
sema_init(&sem, 0);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698