All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ryan Mallon <rmallon@gmail.com>
To: Ravishankar <ravishankarkm32@gmail.com>
Cc: gregkh@suse.de, wfp5p@virginia.edu, devel@driverdev.osuosl.org,
	linux-kernel@vger.kernel.org,
	Ravishankar <ravi.shankar@greenturtles.in>
Subject: Re: [PATCH 1/1 v2] Staging: comedi: fix printk issue in c6xdigio.c
Date: Tue, 26 Jul 2011 16:41:29 +1000	[thread overview]
Message-ID: <4E2E6199.5010409@gmail.com> (raw)
In-Reply-To: <1311662734-22064-1-git-send-email-ravishankarkm32@gmail.com>

On 26/07/11 16:45, Ravishankar wrote:
> From: Ravishankar<ravi.shankar@greenturtles.in>
>
> This is a patch to the c6xdigio.c file that fixes up a printk warning found by the checkpatch.pl tool
>
> Signed-off-by: Ravishankr<ravishankarkm32@gmail.com>
> ---
>
>   drivers/staging/comedi/drivers/c6xdigio.c |   12 ++++++------
>   1 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/staging/comedi/drivers/c6xdigio.c b/drivers/staging/comedi/drivers/c6xdigio.c
> index e0ac825..b0b578c 100644
> --- a/drivers/staging/comedi/drivers/c6xdigio.c
> +++ b/drivers/staging/comedi/drivers/c6xdigio.c
> @@ -343,7 +343,7 @@ static int c6xdigio_pwmo_insn_read(struct comedi_device *dev,
>   				   struct comedi_subdevice *s,
>   				   struct comedi_insn *insn, unsigned int *data)
>   {
> -	printk("c6xdigio_pwmo_insn_read %x\n", insn->n);
> +	pr_info("%s %x\n", __func__, insn->n);
>   	return insn->n;
>   }
>
> @@ -439,9 +439,9 @@ static int c6xdigio_attach(struct comedi_device *dev,
>   	struct comedi_subdevice *s;
>
>   	iobase = it->options[0];
> -	printk("comedi%d: c6xdigio: 0x%04lx\n", dev->minor, iobase);
> +	pr_info("comedi%d: c6xdigio: 0x%04lx\n", dev->minor, iobase);
>   	if (!request_region(iobase, C6XDIGIO_SIZE, "c6xdigio")) {
> -		printk("comedi%d: I/O port conflict\n", dev->minor);
> +		pr_err("comedi%d: I/O port conflict\n", dev->minor);
>   		return -EIO;
>   	}
>   	dev->iobase = iobase;
> @@ -456,9 +456,9 @@ static int c6xdigio_attach(struct comedi_device *dev,
>
>   	irq = it->options[1];
>   	if (irq>  0)
> -		printk("comedi%d: irq = %u ignored\n", dev->minor, irq);
> +		pr_debug("%s: %x\n", __func__, insn->n);
>   	else if (irq == 0)
> -		printk("comedi%d: no irq\n", dev->minor);
> +		pr_debug("%s: %x\n", __func__, insn->n);

You are doing this without any thought at all. Not only does this 
replace a useful message with a completely useless one, but it also 
won't even compile if DEBUG is defined. It is not confidence inspiring.

~Ryan


      reply	other threads:[~2011-07-26  6:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <[PATCH]Staging: comedi: fix printk issue in c6xdigio.c>
2011-07-26  5:27 ` [PATCH 1/1] Staging: comedi: fix printk issue in c6xdigio.c Ravishankar
2011-07-26  5:27   ` Joe Perches
2011-07-26  6:45 ` [PATCH 1/1 v2] " Ravishankar
2011-07-26  6:41   ` Ryan Mallon [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=4E2E6199.5010409@gmail.com \
    --to=rmallon@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ravi.shankar@greenturtles.in \
    --cc=ravishankarkm32@gmail.com \
    --cc=wfp5p@virginia.edu \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.