[PATCH 07/24] ath6kl: add debug.c
Joe Perches
joe at perches.com
Wed Jul 13 04:29:22 UTC 2011
On Wed, 2011-07-13 at 04:34 +0300, Kalle Valo wrote:
> Signed-off-by: Kalle Valo <kvalo at qca.qualcomm.com>
[]
> +int ath6kl_printk(const char *level, const char *fmt, ...)
Looks familiar.
> +#ifdef CONFIG_ATH6KL_DEBUG
> +void ath6kl_dump_registers(struct ath6kl_device *dev,
> + struct ath6kl_irq_proc_registers *irq_proc_reg,
> + struct ath6kl_irqenable_reg *irq_enable_reg)
> +{
> +
> + ath6kl_dbg(ATH6KL_DBG_ANY, ("<------- Register Table -------->\n"));
> +
> + if (irq_proc_reg != NULL) {
> + ath6kl_dbg(ATH6KL_DBG_ANY,
> + "Host Int status: 0x%x\n",
> + irq_proc_reg->host_int_status);
> + ath6kl_dbg(ATH6KL_DBG_ANY,
> + "CPU Int status: 0x%x\n",
> + irq_proc_reg->cpu_int_status);
Some text could be saved by using:
ath6kl_dbg(ATH6KL_DBG_ANY, "%-26x 0x%x\n",
"Host Int status:", inq_proc_reg->host_int_status);
ath6kl_dbg(ATH6KL_DBG_ANY, "%-26x 0x%x\n"
"CPU Int status:", irq_proc_reg->cpu_int_status);
etc.
More information about the devel
mailing list