mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: James Cameron <quozl@laptop.org>
To: Joe Perches <joe@perches.com>
Cc: "Rafał Miłecki" <zajec5@gmail.com>,
	"Hauke Mehrtens" <hauke@hauke-m.de>,
	"Kalle Valo" <kvalo@codeaurora.org>,
	linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] bcma: Use bcma_debug and not pr_cont in MIPS driver
Date: Thu, 19 Oct 2017 16:35:24 +1100	[thread overview]
Message-ID: <20171019053524.GH641@us.netrek.org> (raw)
In-Reply-To: <12998e0384c614c633148ea4dee48b95822d6425.1508389862.git.joe@perches.com>

On Wed, Oct 18, 2017 at 10:12:18PM -0700, Joe Perches 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>
> ---
>  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..a929956150eb 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;

Tabs were changed to spaces.

>  
> -	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 ? '*' : ' ');

But not on this line.

> +
> +        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
> 

-- 
James Cameron
http://quozl.netrek.org/

      reply	other threads:[~2017-10-19  5:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-19  5:12 Joe Perches
2017-10-19  5:35 ` James Cameron [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171019053524.GH641@us.netrek.org \
    --to=quozl@laptop.org \
    --cc=hauke@hauke-m.de \
    --cc=joe@perches.com \
    --cc=kvalo@codeaurora.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=zajec5@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome