linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wolfgang Grandegger <wg@grandegger.com>
To: Alexander Shiyan <shc_work@mail.ru>, linux-can@vger.kernel.org
Cc: Marc Kleine-Budde <mkl@pengutronix.de>,
	Christian Pellegrin <chripell@evolware.org>,
	Chris Elston <celston@katalix.com>
Subject: Re: [PATCH 1/2] can: mcp251x: Move diagnostic messages to dev_dbg()
Date: Sun, 23 Feb 2014 20:13:47 +0100	[thread overview]
Message-ID: <530A486B.3040005@grandegger.com> (raw)
In-Reply-To: <1393048274-7949-1-git-send-email-shc_work@mail.ru>

On 02/22/2014 06:51 AM, Alexander Shiyan wrote:
> This patch moves diagnostic messages used for debugging purposes
> to dev_dbg().
> 
> Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
> ---
>  drivers/net/can/mcp251x.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/net/can/mcp251x.c b/drivers/net/can/mcp251x.c
> index cdb9808..56e38a6 100644
> --- a/drivers/net/can/mcp251x.c
> +++ b/drivers/net/can/mcp251x.c
> @@ -601,10 +601,10 @@ static int mcp251x_do_set_bittiming(struct net_device *net)
>  			  (bt->prop_seg - 1));
>  	mcp251x_write_bits(spi, CNF3, CNF3_PHSEG2_MASK,
>  			   (bt->phase_seg2 - 1));
> -	dev_info(&spi->dev, "CNF: 0x%02x 0x%02x 0x%02x\n",
> -		 mcp251x_read_reg(spi, CNF1),
> -		 mcp251x_read_reg(spi, CNF2),
> -		 mcp251x_read_reg(spi, CNF3));
> +	dev_dbg(&spi->dev, "CNF: 0x%02x 0x%02x 0x%02x\n",
> +		mcp251x_read_reg(spi, CNF1),
> +		mcp251x_read_reg(spi, CNF2),
> +		mcp251x_read_reg(spi, CNF3));
>  
>  	return 0;
>  }

It's common practice to show the bit-timing settings in the kernel log.
Therefore I prefer to keep this useful dev_info. If we change it, we
should update all other drivers as well.

> @@ -1155,7 +1155,7 @@ static int mcp251x_can_probe(struct spi_device *spi)
>  

>  	devm_can_led_init(net);
>  
> -	dev_info(&spi->dev, "probed\n");
> +	dev_dbg(&spi->dev, "probed\n");

This one could even be removed.

Wolfgang.


  parent reply	other threads:[~2014-02-23 19:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-22  5:51 [PATCH 1/2] can: mcp251x: Move diagnostic messages to dev_dbg() Alexander Shiyan
2014-02-22  5:51 ` [PATCH 2/2] can: mcp251x: Remove #ifdef CONFIG_PM_SLEEP Alexander Shiyan
2014-02-25 20:37   ` Marc Kleine-Budde
2014-02-23 19:13 ` Wolfgang Grandegger [this message]
2014-02-25 20:41   ` [PATCH 1/2] can: mcp251x: Move diagnostic messages to dev_dbg() Marc Kleine-Budde
2014-02-26  4:20     ` Alexander Shiyan
2014-02-26  8:23       ` Marc Kleine-Budde

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=530A486B.3040005@grandegger.com \
    --to=wg@grandegger.com \
    --cc=celston@katalix.com \
    --cc=chripell@evolware.org \
    --cc=linux-can@vger.kernel.org \
    --cc=mkl@pengutronix.de \
    --cc=shc_work@mail.ru \
    /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;
as well as URLs for NNTP newsgroup(s).