* [PATCH] bcma: use bcma_debug and pr_cont in MIPS driver @ 2017-10-16 12:54 Rafał Miłecki 2017-10-16 21:21 ` Hauke Mehrtens 2017-10-17 14:23 ` Kalle Valo 0 siblings, 2 replies; 6+ messages in thread From: Rafał Miłecki @ 2017-10-16 12:54 UTC (permalink / raw) To: Kalle Valo, linux-wireless; +Cc: Hauke Mehrtens, Rafał Miłecki From: Rafał Miłecki <rafal@milecki.pl> Using bcma_debug gives a device-specific prefix for messages and pr_cont is a common helper for continuing a line. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> --- drivers/bcma/driver_mips.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/bcma/driver_mips.c b/drivers/bcma/driver_mips.c index 89af807cf29c..5904ef1aa624 100644 --- a/drivers/bcma/driver_mips.c +++ b/drivers/bcma/driver_mips.c @@ -184,10 +184,11 @@ 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"}; - printk(KERN_DEBUG KBUILD_MODNAME ": core 0x%04x, irq :", dev->id.id); + + bcma_debug(dev->bus, "core 0x%04x, irq :", dev->id.id); for (i = 0; i <= 6; i++) - printk(" %s%s", irq_name[i], i == irq ? "*" : " "); - printk("\n"); + pr_cont(" %s%s", irq_name[i], i == irq ? "*" : " "); + pr_cont("\n"); } static void bcma_core_mips_dump_irq(struct bcma_bus *bus) -- 2.11.0 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] bcma: use bcma_debug and pr_cont in MIPS driver 2017-10-16 12:54 [PATCH] bcma: use bcma_debug and pr_cont in MIPS driver Rafał Miłecki @ 2017-10-16 21:21 ` Hauke Mehrtens 2017-10-19 1:38 ` Joe Perches 2017-10-17 14:23 ` Kalle Valo 1 sibling, 1 reply; 6+ messages in thread From: Hauke Mehrtens @ 2017-10-16 21:21 UTC (permalink / raw) To: Rafał Miłecki, Kalle Valo, linux-wireless Cc: Rafał Miłecki On 10/16/2017 02:54 PM, Rafał Miłecki wrote: > From: Rafał Miłecki <rafal@milecki.pl> > > Using bcma_debug gives a device-specific prefix for messages and pr_cont > is a common helper for continuing a line. > > Signed-off-by: Rafał Miłecki <rafal@milecki.pl> Acked-By: Hauke Mehrtens <hauke@hauke-m.de> > --- > drivers/bcma/driver_mips.c | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/drivers/bcma/driver_mips.c b/drivers/bcma/driver_mips.c > index 89af807cf29c..5904ef1aa624 100644 > --- a/drivers/bcma/driver_mips.c > +++ b/drivers/bcma/driver_mips.c > @@ -184,10 +184,11 @@ 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"}; > - printk(KERN_DEBUG KBUILD_MODNAME ": core 0x%04x, irq :", dev->id.id); > + > + bcma_debug(dev->bus, "core 0x%04x, irq :", dev->id.id); > for (i = 0; i <= 6; i++) > - printk(" %s%s", irq_name[i], i == irq ? "*" : " "); > - printk("\n"); > + pr_cont(" %s%s", irq_name[i], i == irq ? "*" : " "); > + pr_cont("\n"); > } > > static void bcma_core_mips_dump_irq(struct bcma_bus *bus) > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] bcma: use bcma_debug and pr_cont in MIPS driver 2017-10-16 21:21 ` Hauke Mehrtens @ 2017-10-19 1:38 ` Joe Perches 2017-10-19 4:19 ` Kalle Valo 2017-10-19 6:33 ` Rafał Miłecki 0 siblings, 2 replies; 6+ messages in thread From: Joe Perches @ 2017-10-19 1:38 UTC (permalink / raw) To: Hauke Mehrtens, Rafał Miłecki, Kalle Valo, linux-wireless Cc: Rafał Miłecki On Mon, 2017-10-16 at 23:21 +0200, Hauke Mehrtens wrote: > On 10/16/2017 02:54 PM, Rafał Miłecki wrote: > > From: Rafał Miłecki <rafal@milecki.pl> > > > > Using bcma_debug gives a device-specific prefix for messages and pr_cont > > is a common helper for continuing a line. > > > > Signed-off-by: Rafał Miłecki <rafal@milecki.pl> > > Acked-By: Hauke Mehrtens <hauke@hauke-m.de> > > > --- > > drivers/bcma/driver_mips.c | 7 ++++--- > > 1 file changed, 4 insertions(+), 3 deletions(-) > > > > diff --git a/drivers/bcma/driver_mips.c b/drivers/bcma/driver_mips.c > > index 89af807cf29c..5904ef1aa624 100644 > > --- a/drivers/bcma/driver_mips.c > > +++ b/drivers/bcma/driver_mips.c > > @@ -184,10 +184,11 @@ 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"}; > > - printk(KERN_DEBUG KBUILD_MODNAME ": core 0x%04x, irq :", dev->id.id); > > + > > + bcma_debug(dev->bus, "core 0x%04x, irq :", dev->id.id); > > for (i = 0; i <= 6; i++) > > - printk(" %s%s", irq_name[i], i == irq ? "*" : " "); > > - printk("\n"); > > + pr_cont(" %s%s", irq_name[i], i == irq ? "*" : " "); > > + pr_cont("\n"); > > } > > > > static void bcma_core_mips_dump_irq(struct bcma_bus *bus) > > This isn't the same code as it depends on #define DEBUG and will not output the first line in most cases. I'd suggest a nack. Perhaps it'd be better to use a temporary and avoid the pr_cont uses like: { int i; static const char *irq_name[] = {"2(S)", "3", "4", "5", "6", "D", "I"}; char interrupts[20]; char *ints = interrupts; for (i = 0; i < ARRAY_SIZE(irq_name), i++) ints += sprintf(ints, " %s%c", irq_name[i], i == irq ? '*' : ' '); bcma_debug(dev->bus, "core 0x04x, irq: %s\n", dev->id.id, interrupts); } ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] bcma: use bcma_debug and pr_cont in MIPS driver 2017-10-19 1:38 ` Joe Perches @ 2017-10-19 4:19 ` Kalle Valo 2017-10-19 6:33 ` Rafał Miłecki 1 sibling, 0 replies; 6+ messages in thread From: Kalle Valo @ 2017-10-19 4:19 UTC (permalink / raw) To: Joe Perches Cc: Hauke Mehrtens, Rafał Miłecki, linux-wireless, Rafał Miłecki Joe Perches <joe@perches.com> writes: > On Mon, 2017-10-16 at 23:21 +0200, Hauke Mehrtens wrote: >> On 10/16/2017 02:54 PM, Rafa=C5=82 Mi=C5=82ecki wrote: >> > From: Rafa=C5=82 Mi=C5=82ecki <rafal@milecki.pl> >> >=20 >> > Using bcma_debug gives a device-specific prefix for messages and pr_co= nt >> > is a common helper for continuing a line. >> >=20 >> > Signed-off-by: Rafa=C5=82 Mi=C5=82ecki <rafal@milecki.pl> >>=20 >> Acked-By: Hauke Mehrtens <hauke@hauke-m.de> >>=20 >> > --- >> > drivers/bcma/driver_mips.c | 7 ++++--- >> > 1 file changed, 4 insertions(+), 3 deletions(-) >> >=20 >> > diff --git a/drivers/bcma/driver_mips.c b/drivers/bcma/driver_mips.c >> > index 89af807cf29c..5904ef1aa624 100644 >> > --- a/drivers/bcma/driver_mips.c >> > +++ b/drivers/bcma/driver_mips.c >> > @@ -184,10 +184,11 @@ static void bcma_core_mips_print_irq(struct bcma= _device *dev, unsigned int irq) >> > { >> > int i; >> > static const char *irq_name[] =3D {"2(S)", "3", "4", "5", "6", "D", = "I"}; >> > - printk(KERN_DEBUG KBUILD_MODNAME ": core 0x%04x, irq :", dev->id.id); >> > + >> > + bcma_debug(dev->bus, "core 0x%04x, irq :", dev->id.id); >> > for (i =3D 0; i <=3D 6; i++) >> > - printk(" %s%s", irq_name[i], i =3D=3D irq ? "*" : " "); >> > - printk("\n"); >> > + pr_cont(" %s%s", irq_name[i], i =3D=3D irq ? "*" : " "); >> > + pr_cont("\n"); >> > } >> >=20=20 >> > static void bcma_core_mips_dump_irq(struct bcma_bus *bus) >> >=20 > > This isn't the same code as it depends on #define DEBUG > and will not output the first line in most cases. > > I'd suggest a nack. Too late, I already applied this. Please submit a followup patch if something needs to be changed. --=20 Kalle Valo ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] bcma: use bcma_debug and pr_cont in MIPS driver 2017-10-19 1:38 ` Joe Perches 2017-10-19 4:19 ` Kalle Valo @ 2017-10-19 6:33 ` Rafał Miłecki 1 sibling, 0 replies; 6+ messages in thread From: Rafał Miłecki @ 2017-10-19 6:33 UTC (permalink / raw) To: Joe Perches Cc: Hauke Mehrtens, Rafał Miłecki, Kalle Valo, linux-wireless On 2017-10-19 03:38, Joe Perches wrote: > On Mon, 2017-10-16 at 23:21 +0200, Hauke Mehrtens wrote: >> On 10/16/2017 02:54 PM, Rafał Miłecki wrote: >> > From: Rafał Miłecki <rafal@milecki.pl> >> > >> > Using bcma_debug gives a device-specific prefix for messages and pr_cont >> > is a common helper for continuing a line. >> > >> > Signed-off-by: Rafał Miłecki <rafal@milecki.pl> >> >> Acked-By: Hauke Mehrtens <hauke@hauke-m.de> >> >> > --- >> > drivers/bcma/driver_mips.c | 7 ++++--- >> > 1 file changed, 4 insertions(+), 3 deletions(-) >> > >> > diff --git a/drivers/bcma/driver_mips.c b/drivers/bcma/driver_mips.c >> > index 89af807cf29c..5904ef1aa624 100644 >> > --- a/drivers/bcma/driver_mips.c >> > +++ b/drivers/bcma/driver_mips.c >> > @@ -184,10 +184,11 @@ 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"}; >> > - printk(KERN_DEBUG KBUILD_MODNAME ": core 0x%04x, irq :", dev->id.id); >> > + >> > + bcma_debug(dev->bus, "core 0x%04x, irq :", dev->id.id); >> > for (i = 0; i <= 6; i++) >> > - printk(" %s%s", irq_name[i], i == irq ? "*" : " "); >> > - printk("\n"); >> > + pr_cont(" %s%s", irq_name[i], i == irq ? "*" : " "); >> > + pr_cont("\n"); >> > } >> > >> > static void bcma_core_mips_dump_irq(struct bcma_bus *bus) >> > > > This isn't the same code as it depends on #define DEBUG > and will not output the first line in most cases. Oh, I didn't think about bcma_debug (pr_debug) being no_printk indeed. AFAIU it will indeed make pr_cont default to the KERN_DEFAULT. I'll try to test your code today or tomorrow, thanks! ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: bcma: use bcma_debug and pr_cont in MIPS driver 2017-10-16 12:54 [PATCH] bcma: use bcma_debug and pr_cont in MIPS driver Rafał Miłecki 2017-10-16 21:21 ` Hauke Mehrtens @ 2017-10-17 14:23 ` Kalle Valo 1 sibling, 0 replies; 6+ messages in thread From: Kalle Valo @ 2017-10-17 14:23 UTC (permalink / raw) To: Rafał Miłecki Cc: linux-wireless, Hauke Mehrtens, Rafał Miłecki Rafał Miłecki wrote: > From: Rafał Miłecki <rafal@milecki.pl> > > Using bcma_debug gives a device-specific prefix for messages and pr_cont > is a common helper for continuing a line. > > Signed-off-by: Rafał Miłecki <rafal@milecki.pl> > Acked-By: Hauke Mehrtens <hauke@hauke-m.de> Patch applied to wireless-drivers-next.git, thanks. 66cc04424960 bcma: use bcma_debug and pr_cont in MIPS driver -- https://patchwork.kernel.org/patch/10008245/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-10-19 11:23 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2017-10-16 12:54 [PATCH] bcma: use bcma_debug and pr_cont in MIPS driver Rafał Miłecki 2017-10-16 21:21 ` Hauke Mehrtens 2017-10-19 1:38 ` Joe Perches 2017-10-19 4:19 ` Kalle Valo 2017-10-19 6:33 ` Rafał Miłecki 2017-10-17 14:23 ` 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).