* [PATCH 1/2] can: mcp251x: Move diagnostic messages to dev_dbg()
@ 2014-02-22 5:51 Alexander Shiyan
2014-02-22 5:51 ` [PATCH 2/2] can: mcp251x: Remove #ifdef CONFIG_PM_SLEEP Alexander Shiyan
2014-02-23 19:13 ` [PATCH 1/2] can: mcp251x: Move diagnostic messages to dev_dbg() Wolfgang Grandegger
0 siblings, 2 replies; 7+ messages in thread
From: Alexander Shiyan @ 2014-02-22 5:51 UTC (permalink / raw)
To: linux-can
Cc: Wolfgang Grandegger, Marc Kleine-Budde, Christian Pellegrin,
Chris Elston, Alexander Shiyan
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;
}
@@ -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");
return ret;
--
1.8.3.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/2] can: mcp251x: Remove #ifdef CONFIG_PM_SLEEP
2014-02-22 5:51 [PATCH 1/2] can: mcp251x: Move diagnostic messages to dev_dbg() Alexander Shiyan
@ 2014-02-22 5:51 ` Alexander Shiyan
2014-02-25 20:37 ` Marc Kleine-Budde
2014-02-23 19:13 ` [PATCH 1/2] can: mcp251x: Move diagnostic messages to dev_dbg() Wolfgang Grandegger
1 sibling, 1 reply; 7+ messages in thread
From: Alexander Shiyan @ 2014-02-22 5:51 UTC (permalink / raw)
To: linux-can
Cc: Wolfgang Grandegger, Marc Kleine-Budde, Christian Pellegrin,
Chris Elston, Alexander Shiyan
This patch removes #ifdef CONFIG_PM_SLEEP to improve compile
coverage.
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
---
drivers/net/can/mcp251x.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/net/can/mcp251x.c b/drivers/net/can/mcp251x.c
index 56e38a6..2ac02c7 100644
--- a/drivers/net/can/mcp251x.c
+++ b/drivers/net/can/mcp251x.c
@@ -1197,9 +1197,7 @@ static int mcp251x_can_remove(struct spi_device *spi)
return 0;
}
-#ifdef CONFIG_PM_SLEEP
-
-static int mcp251x_can_suspend(struct device *dev)
+static int __maybe_unused mcp251x_can_suspend(struct device *dev)
{
struct spi_device *spi = to_spi_device(dev);
struct mcp251x_priv *priv = spi_get_drvdata(spi);
@@ -1229,7 +1227,7 @@ static int mcp251x_can_suspend(struct device *dev)
return 0;
}
-static int mcp251x_can_resume(struct device *dev)
+static int __maybe_unused mcp251x_can_resume(struct device *dev)
{
struct spi_device *spi = to_spi_device(dev);
struct mcp251x_priv *priv = spi_get_drvdata(spi);
@@ -1249,7 +1247,6 @@ static int mcp251x_can_resume(struct device *dev)
enable_irq(spi->irq);
return 0;
}
-#endif
static SIMPLE_DEV_PM_OPS(mcp251x_can_pm_ops, mcp251x_can_suspend,
mcp251x_can_resume);
--
1.8.3.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] can: mcp251x: Move diagnostic messages to dev_dbg()
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-23 19:13 ` Wolfgang Grandegger
2014-02-25 20:41 ` Marc Kleine-Budde
1 sibling, 1 reply; 7+ messages in thread
From: Wolfgang Grandegger @ 2014-02-23 19:13 UTC (permalink / raw)
To: Alexander Shiyan, linux-can
Cc: Marc Kleine-Budde, Christian Pellegrin, Chris Elston
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.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] can: mcp251x: Remove #ifdef CONFIG_PM_SLEEP
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
0 siblings, 0 replies; 7+ messages in thread
From: Marc Kleine-Budde @ 2014-02-25 20:37 UTC (permalink / raw)
To: Alexander Shiyan, linux-can
Cc: Wolfgang Grandegger, Christian Pellegrin, Chris Elston
[-- Attachment #1: Type: text/plain, Size: 499 bytes --]
On 02/22/2014 06:51 AM, Alexander Shiyan wrote:
> This patch removes #ifdef CONFIG_PM_SLEEP to improve compile
> coverage.
>
> Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Applied to can-next.
Tnx,
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Industrial Linux Solutions | Phone: +49-231-2826-924 |
Vertretung West/Dortmund | Fax: +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 242 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] can: mcp251x: Move diagnostic messages to dev_dbg()
2014-02-23 19:13 ` [PATCH 1/2] can: mcp251x: Move diagnostic messages to dev_dbg() Wolfgang Grandegger
@ 2014-02-25 20:41 ` Marc Kleine-Budde
2014-02-26 4:20 ` Alexander Shiyan
0 siblings, 1 reply; 7+ messages in thread
From: Marc Kleine-Budde @ 2014-02-25 20:41 UTC (permalink / raw)
To: Wolfgang Grandegger, Alexander Shiyan, linux-can
Cc: Christian Pellegrin, Chris Elston
[-- Attachment #1: Type: text/plain, Size: 1968 bytes --]
On 02/23/2014 08:13 PM, Wolfgang Grandegger wrote:
> 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.
I'm not sure if the output is needed. The bit timing algorithm seems to
work so I think it's okay to make the driver more quiet.
>> @@ -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.
+1
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Industrial Linux Solutions | Phone: +49-231-2826-924 |
Vertretung West/Dortmund | Fax: +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 242 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] can: mcp251x: Move diagnostic messages to dev_dbg()
2014-02-25 20:41 ` Marc Kleine-Budde
@ 2014-02-26 4:20 ` Alexander Shiyan
2014-02-26 8:23 ` Marc Kleine-Budde
0 siblings, 1 reply; 7+ messages in thread
From: Alexander Shiyan @ 2014-02-26 4:20 UTC (permalink / raw)
To: Marc Kleine-Budde
Cc: Wolfgang Grandegger, linux-can, Christian Pellegrin, Chris Elston
Вторник, 25 февраля 2014, 21:41 +01:00 от Marc Kleine-Budde <mkl@pengutronix.de>:
> On 02/23/2014 08:13 PM, Wolfgang Grandegger wrote:
> > On 02/22/2014 06:51 AM, Alexander Shiyan wrote:
> >> This patch moves diagnostic messages used for debugging purposes
> >> to dev_dbg().
...
> >> @@ -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.
>
> +1
Resend this one modified patch?
---
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] can: mcp251x: Move diagnostic messages to dev_dbg()
2014-02-26 4:20 ` Alexander Shiyan
@ 2014-02-26 8:23 ` Marc Kleine-Budde
0 siblings, 0 replies; 7+ messages in thread
From: Marc Kleine-Budde @ 2014-02-26 8:23 UTC (permalink / raw)
To: Alexander Shiyan
Cc: Wolfgang Grandegger, linux-can, Christian Pellegrin, Chris Elston
[-- Attachment #1: Type: text/plain, Size: 963 bytes --]
On 02/26/2014 05:20 AM, Alexander Shiyan wrote:
> Вторник, 25 февраля 2014, 21:41 +01:00 от Marc Kleine-Budde <mkl@pengutronix.de>:
>> On 02/23/2014 08:13 PM, Wolfgang Grandegger wrote:
>>> On 02/22/2014 06:51 AM, Alexander Shiyan wrote:
>>>> This patch moves diagnostic messages used for debugging purposes
>>>> to dev_dbg().
> ...
>>>> @@ -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.
>>
>> +1
>
> Resend this one modified patch?
yes, please
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Industrial Linux Solutions | Phone: +49-231-2826-924 |
Vertretung West/Dortmund | Fax: +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 242 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-02-26 8:23 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [PATCH 1/2] can: mcp251x: Move diagnostic messages to dev_dbg() Wolfgang Grandegger
2014-02-25 20:41 ` Marc Kleine-Budde
2014-02-26 4:20 ` Alexander Shiyan
2014-02-26 8:23 ` Marc Kleine-Budde
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.