* [PATCH 0/4] media: don't print error when adding adapter fails
@ 2016-08-09 11:35 Wolfram Sang
2016-08-09 11:35 ` [PATCH 1/4] media: pci: netup_unidvb: " Wolfram Sang
` (3 more replies)
0 siblings, 4 replies; 9+ messages in thread
From: Wolfram Sang @ 2016-08-09 11:35 UTC (permalink / raw)
To: linux-kernel
Cc: linux-i2c, Wolfram Sang, linux-arm-kernel, linux-media,
linux-samsung-soc
Since v4.8-rc1, the I2C core will print detailed information when adding an I2C
adapter fails. So, drivers can skip this now.
Should go via subsystem tree, I'd think.
Wolfram Sang (4):
media: pci: netup_unidvb: don't print error when adding adapter fails
media: pci: pt3: don't print error when adding adapter fails
media: platform: exynos4-is: fimc-is-i2c: don't print error when
adding adapter fails
media: usb: dvb-usb-v2: dvb_usb_core: don't print error when adding
adapter fails
drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c | 5 +----
drivers/media/pci/pt3/pt3.c | 4 +---
drivers/media/platform/exynos4-is/fimc-is-i2c.c | 5 +----
drivers/media/usb/dvb-usb-v2/dvb_usb_core.c | 2 --
4 files changed, 3 insertions(+), 13 deletions(-)
--
2.8.1
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 1/4] media: pci: netup_unidvb: don't print error when adding adapter fails
2016-08-09 11:35 [PATCH 0/4] media: don't print error when adding adapter fails Wolfram Sang
@ 2016-08-09 11:35 ` Wolfram Sang
[not found] ` <CAK3bHNWmxQsAtefcUocoOcEwtWnpptiVxzhXR-+jVU524RmnPw@mail.gmail.com>
2016-08-09 11:35 ` [PATCH 2/4] media: pci: pt3: " Wolfram Sang
` (2 subsequent siblings)
3 siblings, 1 reply; 9+ messages in thread
From: Wolfram Sang @ 2016-08-09 11:35 UTC (permalink / raw)
To: linux-kernel
Cc: linux-i2c, Wolfram Sang, Sergey Kozlov, Abylay Ospan,
Mauro Carvalho Chehab, linux-media
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
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 2/4] media: pci: pt3: don't print error when adding adapter fails
2016-08-09 11:35 [PATCH 0/4] media: don't print error when adding adapter fails Wolfram Sang
2016-08-09 11:35 ` [PATCH 1/4] media: pci: netup_unidvb: " Wolfram Sang
@ 2016-08-09 11:35 ` Wolfram Sang
2016-08-09 11:35 ` [PATCH 3/4] media: platform: exynos4-is: fimc-is-i2c: " Wolfram Sang
2016-08-09 11:35 ` [PATCH 4/4] media: usb: dvb-usb-v2: dvb_usb_core: " Wolfram Sang
3 siblings, 0 replies; 9+ messages in thread
From: Wolfram Sang @ 2016-08-09 11:35 UTC (permalink / raw)
To: linux-kernel; +Cc: linux-i2c, Wolfram Sang, Mauro Carvalho Chehab, linux-media
The core will do this for us now.
Signed-off-by: Wolfram Sang <wsa-dev@sang-engineering.com>
---
drivers/media/pci/pt3/pt3.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/media/pci/pt3/pt3.c b/drivers/media/pci/pt3/pt3.c
index eff5e9f51ace3d..7fb649e523f46e 100644
--- a/drivers/media/pci/pt3/pt3.c
+++ b/drivers/media/pci/pt3/pt3.c
@@ -798,10 +798,8 @@ static int pt3_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
strlcpy(i2c->name, DRV_NAME, sizeof(i2c->name));
i2c_set_adapdata(i2c, pt3);
ret = i2c_add_adapter(i2c);
- if (ret < 0) {
- dev_err(&pdev->dev, "Failed to add i2c adapter\n");
+ if (ret < 0)
goto err_i2cbuf;
- }
for (i = 0; i < PT3_NUM_FE; i++) {
ret = pt3_alloc_adapter(pt3, i);
--
2.8.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 3/4] media: platform: exynos4-is: fimc-is-i2c: don't print error when adding adapter fails
2016-08-09 11:35 [PATCH 0/4] media: don't print error when adding adapter fails Wolfram Sang
2016-08-09 11:35 ` [PATCH 1/4] media: pci: netup_unidvb: " Wolfram Sang
2016-08-09 11:35 ` [PATCH 2/4] media: pci: pt3: " Wolfram Sang
@ 2016-08-09 11:35 ` Wolfram Sang
2016-08-09 11:35 ` [PATCH 4/4] media: usb: dvb-usb-v2: dvb_usb_core: " Wolfram Sang
3 siblings, 0 replies; 9+ messages in thread
From: Wolfram Sang @ 2016-08-09 11:35 UTC (permalink / raw)
To: linux-kernel
Cc: linux-i2c, Wolfram Sang, Kyungmin Park, Sylwester Nawrocki,
Mauro Carvalho Chehab, Kukjin Kim, Krzysztof Kozlowski,
linux-media, linux-arm-kernel, linux-samsung-soc
The core will do this for us now.
Signed-off-by: Wolfram Sang <wsa-dev@sang-engineering.com>
---
drivers/media/platform/exynos4-is/fimc-is-i2c.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/media/platform/exynos4-is/fimc-is-i2c.c b/drivers/media/platform/exynos4-is/fimc-is-i2c.c
index 7521aa59b0649c..fd888ef447a903 100644
--- a/drivers/media/platform/exynos4-is/fimc-is-i2c.c
+++ b/drivers/media/platform/exynos4-is/fimc-is-i2c.c
@@ -56,11 +56,8 @@ static int fimc_is_i2c_probe(struct platform_device *pdev)
i2c_adap->class = I2C_CLASS_SPD;
ret = i2c_add_adapter(i2c_adap);
- if (ret < 0) {
- dev_err(&pdev->dev, "failed to add I2C bus %s\n",
- node->full_name);
+ if (ret < 0)
return ret;
- }
platform_set_drvdata(pdev, isp_i2c);
--
2.8.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 4/4] media: usb: dvb-usb-v2: dvb_usb_core: don't print error when adding adapter fails
2016-08-09 11:35 [PATCH 0/4] media: don't print error when adding adapter fails Wolfram Sang
` (2 preceding siblings ...)
2016-08-09 11:35 ` [PATCH 3/4] media: platform: exynos4-is: fimc-is-i2c: " Wolfram Sang
@ 2016-08-09 11:35 ` Wolfram Sang
3 siblings, 0 replies; 9+ messages in thread
From: Wolfram Sang @ 2016-08-09 11:35 UTC (permalink / raw)
To: linux-kernel
Cc: linux-i2c, Wolfram Sang, Antti Palosaari, Mauro Carvalho Chehab,
linux-media
The core will do this for us now.
Signed-off-by: Wolfram Sang <wsa-dev@sang-engineering.com>
---
drivers/media/usb/dvb-usb-v2/dvb_usb_core.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/media/usb/dvb-usb-v2/dvb_usb_core.c b/drivers/media/usb/dvb-usb-v2/dvb_usb_core.c
index 3fbb2cd19f5e2a..a8e6624fbe8347 100644
--- a/drivers/media/usb/dvb-usb-v2/dvb_usb_core.c
+++ b/drivers/media/usb/dvb-usb-v2/dvb_usb_core.c
@@ -82,8 +82,6 @@ static int dvb_usbv2_i2c_init(struct dvb_usb_device *d)
ret = i2c_add_adapter(&d->i2c_adap);
if (ret < 0) {
d->i2c_adap.algo = NULL;
- dev_err(&d->udev->dev, "%s: i2c_add_adapter() failed=%d\n",
- KBUILD_MODNAME, ret);
goto err;
}
--
2.8.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 1/4] media: pci: netup_unidvb: don't print error when adding adapter fails
[not found] ` <CAK3bHNWmxQsAtefcUocoOcEwtWnpptiVxzhXR-+jVU524RmnPw@mail.gmail.com>
@ 2016-08-09 14:58 ` Wolfram Sang
2016-08-10 14:41 ` Abylay Ospan
0 siblings, 1 reply; 9+ messages in thread
From: Wolfram Sang @ 2016-08-09 14:58 UTC (permalink / raw)
To: Abylay Ospan
Cc: Wolfram Sang, linux-kernel, linux-i2c, Sergey Kozlov,
Mauro Carvalho Chehab, linux-media
[-- Attachment #1: Type: text/plain, Size: 760 bytes --]
> 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.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/4] media: pci: netup_unidvb: don't print error when adding adapter fails
2016-08-09 14:58 ` Wolfram Sang
@ 2016-08-10 14:41 ` Abylay Ospan
2016-08-10 14:56 ` Wolfram Sang
0 siblings, 1 reply; 9+ messages in thread
From: Abylay Ospan @ 2016-08-10 14:41 UTC (permalink / raw)
To: Wolfram Sang
Cc: Wolfram Sang, linux-kernel, linux-i2c, Sergey Kozlov,
Mauro Carvalho Chehab, linux-media
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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/4] media: pci: netup_unidvb: don't print error when adding adapter fails
2016-08-10 14:41 ` Abylay Ospan
@ 2016-08-10 14:56 ` Wolfram Sang
2016-08-10 15:06 ` Abylay Ospan
0 siblings, 1 reply; 9+ messages in thread
From: Wolfram Sang @ 2016-08-10 14:56 UTC (permalink / raw)
To: Abylay Ospan
Cc: Wolfram Sang, linux-kernel, linux-i2c, Sergey Kozlov,
Mauro Carvalho Chehab, linux-media
[-- Attachment #1: Type: text/plain, Size: 328 bytes --]
> 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.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/4] media: pci: netup_unidvb: don't print error when adding adapter fails
2016-08-10 14:56 ` Wolfram Sang
@ 2016-08-10 15:06 ` Abylay Ospan
0 siblings, 0 replies; 9+ messages in thread
From: Abylay Ospan @ 2016-08-10 15:06 UTC (permalink / raw)
To: Wolfram Sang
Cc: Wolfram Sang, linux-kernel, linux-i2c, Sergey Kozlov,
Mauro Carvalho Chehab, linux-media
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
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2016-08-10 21:28 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-09 11:35 [PATCH 0/4] media: don't print error when adding adapter fails Wolfram Sang
2016-08-09 11:35 ` [PATCH 1/4] media: pci: netup_unidvb: " Wolfram Sang
[not found] ` <CAK3bHNWmxQsAtefcUocoOcEwtWnpptiVxzhXR-+jVU524RmnPw@mail.gmail.com>
2016-08-09 14:58 ` Wolfram Sang
2016-08-10 14:41 ` Abylay Ospan
2016-08-10 14:56 ` Wolfram Sang
2016-08-10 15:06 ` Abylay Ospan
2016-08-09 11:35 ` [PATCH 2/4] media: pci: pt3: " Wolfram Sang
2016-08-09 11:35 ` [PATCH 3/4] media: platform: exynos4-is: fimc-is-i2c: " Wolfram Sang
2016-08-09 11:35 ` [PATCH 4/4] media: usb: dvb-usb-v2: dvb_usb_core: " Wolfram Sang
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).