Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1458628 > unrolled thread
| Started by | Wolfram Sang <wsa-dev@sang-engineering.com> |
|---|---|
| First post | 2016-08-09 13:40 +0200 |
| Last post | 2016-08-10 23:30 +0200 |
| Articles | 5 — 3 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 1/4] media: pci: netup_unidvb: don't print error when adding adapter fails Wolfram Sang <wsa-dev@sang-engineering.com> - 2016-08-09 13:40 +0200
Re: [PATCH 1/4] media: pci: netup_unidvb: don't print error when adding adapter fails Wolfram Sang <wsa@the-dreams.de> - 2016-08-09 17:00 +0200
Re: [PATCH 1/4] media: pci: netup_unidvb: don't print error when adding adapter fails Abylay Ospan <aospan@netup.ru> - 2016-08-10 20:20 +0200
Re: [PATCH 1/4] media: pci: netup_unidvb: don't print error when adding adapter fails Abylay Ospan <aospan@netup.ru> - 2016-08-10 20:50 +0200
Re: [PATCH 1/4] media: pci: netup_unidvb: don't print error when adding adapter fails Wolfram Sang <wsa@the-dreams.de> - 2016-08-10 23:30 +0200
| From | Wolfram Sang <wsa-dev@sang-engineering.com> |
|---|---|
| Date | 2016-08-09 13:40 +0200 |
| Subject | [PATCH 1/4] media: pci: netup_unidvb: don't print error when adding adapter fails |
| Message-ID | <s4dy2-6VH-39@gated-at.bofh.it> |
The core will do this for us now.
Signed-off-by: Wolfram Sang <wsa-dev@sang-engineering.com>
---
drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c b/drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c
index c09c52bc6eabef..b49e4f9788e869 100644
--- a/drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c
+++ b/drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c
@@ -327,11 +327,8 @@ static int netup_i2c_init(struct netup_unidvb_dev *ndev, int bus_num)
i2c->adap.dev.parent = &ndev->pci_dev->dev;
i2c_set_adapdata(&i2c->adap, i2c);
ret = i2c_add_adapter(&i2c->adap);
- if (ret) {
- dev_err(&ndev->pci_dev->dev,
- "%s(): failed to add I2C adapter\n", __func__);
+ if (ret)
return ret;
- }
dev_info(&ndev->pci_dev->dev,
"%s(): registered I2C bus %d at 0x%x\n",
__func__,
--
2.8.1
[toc] | [next] | [standalone]
| From | Wolfram Sang <wsa@the-dreams.de> |
|---|---|
| Date | 2016-08-09 17:00 +0200 |
| Subject | Re: [PATCH 1/4] media: pci: netup_unidvb: don't print error when adding adapter fails |
| Message-ID | <s4gFA-ve-17@gated-at.bofh.it> |
| In reply to | #1458628 |
[Multipart message — attachments visible in raw view] — view raw
> Sometimes it better to show more message - especially in error conditions :)
Sure, if they contain additional information.
> btw, do you make sanity check for "duplicate" log messages ?
I checked all error messages if they contain additional information.
> ret = i2c_add_adapter(&i2c->adap);
> - if (ret) {
> - dev_err(&ndev->pci_dev->dev,
> - "%s(): failed to add I2C adapter\n", __func__);
> + if (ret)
> return ret;
> - }
IMHO, this one doesn't. __func__ is not helpful to users. And the error
messages in the core will make sure that a developer knows where to
start looking.
[toc] | [prev] | [next] | [standalone]
| From | Abylay Ospan <aospan@netup.ru> |
|---|---|
| Date | 2016-08-10 20:20 +0200 |
| Subject | Re: [PATCH 1/4] media: pci: netup_unidvb: don't print error when adding adapter fails |
| Message-ID | <s4GgG-79-11@gated-at.bofh.it> |
| In reply to | #1458813 |
yes, you right. If we remove this message there is no big problem. But
if we do not remove this it's also ok, right ? What the big deal to
remove this type of messages (i'm just interested) ?
For me it's ok to remove:
Acked-by: Abylay Ospan <aospan@netup.ru>
2016-08-09 10:58 GMT-04:00 Wolfram Sang <wsa@the-dreams.de>:
>
>> Sometimes it better to show more message - especially in error conditions :)
>
> Sure, if they contain additional information.
>
>> btw, do you make sanity check for "duplicate" log messages ?
>
> I checked all error messages if they contain additional information.
>
>> ret = i2c_add_adapter(&i2c->adap);
>> - if (ret) {
>> - dev_err(&ndev->pci_dev->dev,
>> - "%s(): failed to add I2C adapter\n", __func__);
>> + if (ret)
>> return ret;
>> - }
>
> IMHO, this one doesn't. __func__ is not helpful to users. And the error
> messages in the core will make sure that a developer knows where to
> start looking.
>
--
Abylay Ospan,
NetUP Inc.
http://www.netup.tv
[toc] | [prev] | [next] | [standalone]
| From | Abylay Ospan <aospan@netup.ru> |
|---|---|
| Date | 2016-08-10 20:50 +0200 |
| Subject | Re: [PATCH 1/4] media: pci: netup_unidvb: don't print error when adding adapter fails |
| Message-ID | <s4GJI-j6-37@gated-at.bofh.it> |
| In reply to | #1459348 |
make sense. thanks for explaining and for patch ! 2016-08-10 10:56 GMT-04:00 Wolfram Sang <wsa@the-dreams.de>: > >> if we do not remove this it's also ok, right ? What the big deal to >> remove this type of messages (i'm just interested) ? > > * Saving memory, especially at runtime. > * Giving consistent and precise error messages > > This series is a first step of trying to move generic error messages > from drivers to subsystem cores. > -- Abylay Ospan, NetUP Inc. http://www.netup.tv
[toc] | [prev] | [next] | [standalone]
| From | Wolfram Sang <wsa@the-dreams.de> |
|---|---|
| Date | 2016-08-10 23:30 +0200 |
| Subject | Re: [PATCH 1/4] media: pci: netup_unidvb: don't print error when adding adapter fails |
| Message-ID | <s4GJI-j6-39@gated-at.bofh.it> |
| In reply to | #1459348 |
[Multipart message — attachments visible in raw view] — view raw
> if we do not remove this it's also ok, right ? What the big deal to > remove this type of messages (i'm just interested) ? * Saving memory, especially at runtime. * Giving consistent and precise error messages This series is a first step of trying to move generic error messages from drivers to subsystem cores.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web