[PATCH 1/3] staging: line6: replace DEBUG_MESSAGES() with dev_dbg()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The dyndbg feature allows dev_dbg() calls to be enabled/disabled at
runtime and is therefore more convenient than static debug log messages.
Use dev_dbg() instead of the line6-specific DEBUG_MESSAGES() macro.

Signed-off-by: Stefan Hajnoczi <stefanha@xxxxxxxxx>
---
 drivers/staging/line6/driver.c |  6 ++---
 drivers/staging/line6/pod.c    | 57 ++++++++++++++++--------------------------
 drivers/staging/line6/variax.c | 12 ++++-----
 3 files changed, 28 insertions(+), 47 deletions(-)

diff --git a/drivers/staging/line6/driver.c b/drivers/staging/line6/driver.c
index ac11a3b..571f2ce 100644
--- a/drivers/staging/line6/driver.c
+++ b/drivers/staging/line6/driver.c
@@ -412,10 +412,8 @@ static void line6_data_received(struct urb *urb)
 
 	if (done < urb->actual_length) {
 		line6_midibuf_ignore(mb, done);
-		DEBUG_MESSAGES(dev_err
-			       (line6->ifcdev,
-				"%d %d buffer overflow - message skipped\n",
-				done, urb->actual_length));
+		dev_dbg(line6->ifcdev, "%d %d buffer overflow - message skipped\n",
+			done, urb->actual_length);
 	}
 
 	for (;;) {
diff --git a/drivers/staging/line6/pod.c b/drivers/staging/line6/pod.c
index 9edd053..4a86f7a 100644
--- a/drivers/staging/line6/pod.c
+++ b/drivers/staging/line6/pod.c
@@ -252,25 +252,19 @@ void line6_pod_process_message(struct usb_line6_pod *pod)
 						break;
 
 					default:
-						DEBUG_MESSAGES(dev_err
-							       (pod->
-								line6.ifcdev,
-								"unknown dump code %02X\n",
-								pod->
-								dumpreq.in_progress));
+						dev_dbg(pod->line6.ifcdev,
+							"unknown dump code %02X\n",
+							pod->dumpreq.in_progress);
 					}
 
 					line6_dump_finished(&pod->dumpreq);
 					pod_startup3(pod);
 				} else
-					DEBUG_MESSAGES(dev_err
-						       (pod->line6.ifcdev,
-							"wrong size of channel dump message (%d instead of %d)\n",
-							pod->
-							line6.message_length,
-							(int)
-							sizeof(pod->prog_data) +
-							7));
+					dev_dbg(pod->line6.ifcdev,
+						"wrong size of channel dump message (%d instead of %d)\n",
+						pod->line6.message_length,
+						(int)sizeof(pod->prog_data) +
+						7);
 
 				break;
 
@@ -302,11 +296,9 @@ void line6_pod_process_message(struct usb_line6_pod *pod)
 #undef PROCESS_SYSTEM_PARAM
 
 					default:
-						DEBUG_MESSAGES(dev_err
-							       (pod->
-								line6.ifcdev,
-								"unknown tuner/system response %02X\n",
-								buf[6]));
+						dev_dbg(pod->line6.ifcdev,
+							"unknown tuner/system response %02X\n",
+							buf[6]);
 					}
 
 					break;
@@ -321,25 +313,21 @@ void line6_pod_process_message(struct usb_line6_pod *pod)
 				break;
 
 			case POD_SYSEX_CLIP:
-				DEBUG_MESSAGES(dev_err
-					       (pod->line6.ifcdev,
-						"audio clipped\n"));
+				dev_dbg(pod->line6.ifcdev, "audio clipped\n");
 				pod->clipping.value = 1;
 				wake_up(&pod->clipping.wait);
 				break;
 
 			case POD_SYSEX_STORE:
-				DEBUG_MESSAGES(dev_err
-					       (pod->line6.ifcdev,
-						"message %02X not yet implemented\n",
-						buf[5]));
+				dev_dbg(pod->line6.ifcdev,
+					"message %02X not yet implemented\n",
+					buf[5]);
 				break;
 
 			default:
-				DEBUG_MESSAGES(dev_err
-					       (pod->line6.ifcdev,
-						"unknown sysex message %02X\n",
-						buf[5]));
+				dev_dbg(pod->line6.ifcdev,
+					"unknown sysex message %02X\n",
+					buf[5]);
 			}
 		} else
 		    if (memcmp
@@ -352,9 +340,7 @@ void line6_pod_process_message(struct usb_line6_pod *pod)
 			    buf[10];
 			pod_startup4(pod);
 		} else
-			DEBUG_MESSAGES(dev_err
-				       (pod->line6.ifcdev,
-					"unknown sysex header\n"));
+			dev_dbg(pod->line6.ifcdev, "unknown sysex header\n");
 
 		break;
 
@@ -362,9 +348,8 @@ void line6_pod_process_message(struct usb_line6_pod *pod)
 		break;
 
 	default:
-		DEBUG_MESSAGES(dev_err
-			       (pod->line6.ifcdev,
-				"POD: unknown message %02X\n", buf[0]));
+		dev_dbg(pod->line6.ifcdev, "POD: unknown message %02X\n",
+			buf[0]);
 	}
 }
 
diff --git a/drivers/staging/line6/variax.c b/drivers/staging/line6/variax.c
index 1b85ecc..8df529f 100644
--- a/drivers/staging/line6/variax.c
+++ b/drivers/staging/line6/variax.c
@@ -262,10 +262,9 @@ void line6_variax_process_message(struct usb_line6_variax *variax)
 					     2, VARIAX_DUMP_PASS3);
 				}
 			} else {
-				DEBUG_MESSAGES(dev_err
-					       (variax->line6.ifcdev,
-						"illegal length %d of model data\n",
-						variax->line6.message_length));
+				dev_dbg(variax->line6.ifcdev,
+					"illegal length %d of model data\n",
+					variax->line6.message_length);
 				line6_dump_finished(&variax->dumpreq);
 			}
 		} else if (memcmp(buf + 1, variax_request_bank + 1,
@@ -295,9 +294,8 @@ void line6_variax_process_message(struct usb_line6_variax *variax)
 		break;
 
 	default:
-		DEBUG_MESSAGES(dev_err
-			       (variax->line6.ifcdev,
-				"Variax: unknown message %02X\n", buf[0]));
+		dev_dbg(variax->line6.ifcdev,
+			"Variax: unknown message %02X\n", buf[0]);
 	}
 }
 
-- 
1.7.12.1

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux