[PATCH v2] ath10k: improve logging to include dev id
Kalle Valo
kvalo at qca.qualcomm.com
Tue Aug 26 00:01:45 PDT 2014
Michal Kazior <michal.kazior at tieto.com> 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 <michal.kazior at tieto.com>
A comment for the future, no need to change anything in this patch:
> -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
More information about the ath10k
mailing list