* [PATCH V2] bcma: Use bcma_debug and not pr_cont in MIPS driver
@ 2017-10-19 5:45 Joe Perches
2017-10-27 8:01 ` [V2] " Kalle Valo
0 siblings, 1 reply; 2+ messages in thread
From: Joe Perches @ 2017-10-19 5:45 UTC (permalink / raw)
To: Rafał Miłecki
Cc: Hauke Mehrtens, Kalle Valo, linux-wireless, linux-kernel
Commit 66cc04424960 ("bcma: use bcma_debug and pr_cont in MIPS driver")
converted a printk(KERN_DEBUG to bcma_debug.
bcma_debug is guarded by a #define DEBUG via pr_debug.
This means that the bcma_debug will generally not be emitted
but any pr_cont following the bcma_debug will be emitted.
Correct this by removing the uses of pr_cont by using a temporary.
Signed-off-by: Joe Perches <joe@perches.com>
---
v2: Fix whitespace damage
I hear there's this checkpatch tool...
drivers/bcma/driver_mips.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/drivers/bcma/driver_mips.c b/drivers/bcma/driver_mips.c
index 5904ef1aa624..f040aba48d50 100644
--- a/drivers/bcma/driver_mips.c
+++ b/drivers/bcma/driver_mips.c
@@ -184,11 +184,14 @@ static void bcma_core_mips_print_irq(struct bcma_device *dev, unsigned int irq)
{
int i;
static const char *irq_name[] = {"2(S)", "3", "4", "5", "6", "D", "I"};
+ char interrupts[20];
+ char *ints = interrupts;
- bcma_debug(dev->bus, "core 0x%04x, irq :", dev->id.id);
- for (i = 0; i <= 6; i++)
- pr_cont(" %s%s", irq_name[i], i == irq ? "*" : " ");
- pr_cont("\n");
+ for (i = 0; i < ARRAY_SIZE(irq_name); i++)
+ ints += sprintf(ints, " %s%c",
+ irq_name[i], i == irq ? '*' : ' ');
+
+ bcma_debug(dev->bus, "core 0x%04x, irq:%s\n", dev->id.id, interrupts);
}
static void bcma_core_mips_dump_irq(struct bcma_bus *bus)
--
2.10.0.rc2.1.g053435c
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [V2] bcma: Use bcma_debug and not pr_cont in MIPS driver
2017-10-19 5:45 [PATCH V2] bcma: Use bcma_debug and not pr_cont in MIPS driver Joe Perches
@ 2017-10-27 8:01 ` Kalle Valo
0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2017-10-27 8:01 UTC (permalink / raw)
To: Joe Perches
Cc: Rafał Miłecki, Hauke Mehrtens, linux-wireless,
linux-kernel
Joe Perches <joe@perches.com> wrote:
> Commit 66cc04424960 ("bcma: use bcma_debug and pr_cont in MIPS driver")
> converted a printk(KERN_DEBUG to bcma_debug.
>
> bcma_debug is guarded by a #define DEBUG via pr_debug.
>
> This means that the bcma_debug will generally not be emitted
> but any pr_cont following the bcma_debug will be emitted.
>
> Correct this by removing the uses of pr_cont by using a temporary.
>
> Signed-off-by: Joe Perches <joe@perches.com>
Patch applied to wireless-drivers-next.git, thanks.
758f7e06063a bcma: Use bcma_debug and not pr_cont in MIPS driver
--
https://patchwork.kernel.org/patch/10016013/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-10-27 8:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-19 5:45 [PATCH V2] bcma: Use bcma_debug and not pr_cont in MIPS driver Joe Perches
2017-10-27 8:01 ` [V2] " Kalle Valo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).