Thread (3 messages) flat view 3 messages, 2 authors, 2014-08-26

Re: [PATCH v2] ath10k: improve logging to include dev id

From: Kalle Valo <hidden>
Date: 2014-08-26 07:01:52

Michal Kazior [off-list ref] writes:
This makes it a lot easier to log and debug
messages if there's more than 1 ath10k device on a
system.

Signed-off-by: Michal Kazior <redacted>
A comment for the future, no need to change anything in this patch:
quoted hunk ↗ jump to hunk
-int ath10k_info(const char *fmt, ...)
+int ath10k_info(struct ath10k *ar, const char *fmt, ...)
 {
 	struct va_format vaf = {
 		.fmt = fmt,
@@ -134,7 +116,7 @@ int ath10k_info(const char *fmt, ...)
 
 	va_start(args, fmt);
 	vaf.va = &args;
-	ret = ath10k_printk(KERN_INFO, "%pV", &vaf);
+	ret = dev_info(ar->dev, "%pV", &vaf);
 	trace_ath10k_log_info(&vaf);
 	va_end(args);
 
So how should we handle tracing? We would want to provide same
information through logging trace events, right?

One idea I had is that we modify the tracing logging macros to take
struct ath10k (or struct device) and use dev_driver_string() &
dev_name() to provide the same info via trace events.

-- 
Kalle Valo
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help