Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1678366 > unrolled thread
| Started by | Chris Packham <chris.packham@alliedtelesis.co.nz> |
|---|---|
| First post | 2017-06-30 03:00 +0200 |
| Last post | 2017-07-02 23:40 +0200 |
| Articles | 4 — 4 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 3/6] i2c: pca-platform: propagate error from i2c_pca_add_numbered_bus Chris Packham <chris.packham@alliedtelesis.co.nz> - 2017-06-30 03:00 +0200
Re: [PATCH 3/6] i2c: pca-platform: propagate error from i2c_pca_add_numbered_bus Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-06-30 10:50 +0200
Re: [PATCH 3/6] i2c: pca-platform: propagate error from i2c_pca_add_numbered_bus Wolfram Sang <wsa@the-dreams.de> - 2017-06-30 11:10 +0200
Re: [PATCH 3/6] i2c: pca-platform: propagate error from i2c_pca_add_numbered_bus Chris Packham <Chris.Packham@alliedtelesis.co.nz> - 2017-07-02 23:40 +0200
| From | Chris Packham <chris.packham@alliedtelesis.co.nz> |
|---|---|
| Date | 2017-06-30 03:00 +0200 |
| Subject | [PATCH 3/6] i2c: pca-platform: propagate error from i2c_pca_add_numbered_bus |
| Message-ID | <tXSrT-6F8-21@gated-at.bofh.it> |
Rather than returning -ENODEV if i2c_pca_add_numbered_bus() fails,
propagate the error to aid debugging.
Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
---
drivers/i2c/busses/i2c-pca-platform.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/i2c/busses/i2c-pca-platform.c b/drivers/i2c/busses/i2c-pca-platform.c
index daccef6865e8..853a2abedb05 100644
--- a/drivers/i2c/busses/i2c-pca-platform.c
+++ b/drivers/i2c/busses/i2c-pca-platform.c
@@ -232,9 +232,9 @@ static int i2c_pca_pf_probe(struct platform_device *pdev)
return ret;
}
- if (i2c_pca_add_numbered_bus(&i2c->adap) < 0) {
- return -ENODEV;
- }
+ ret = i2c_pca_add_numbered_bus(&i2c->adap);
+ if (ret)
+ return ret;
platform_set_drvdata(pdev, i2c);
--
2.13.0
[toc] | [next] | [standalone]
| From | Andy Shevchenko <andy.shevchenko@gmail.com> |
|---|---|
| Date | 2017-06-30 10:50 +0200 |
| Message-ID | <tXZMJ-39Q-1@gated-at.bofh.it> |
| In reply to | #1678366 |
On Fri, Jun 30, 2017 at 3:54 AM, Chris Packham
<chris.packham@alliedtelesis.co.nz> wrote:
> Rather than returning -ENODEV if i2c_pca_add_numbered_bus() fails,
> propagate the error to aid debugging.
>
+ Suggested-by ?
You or Wolfram can use below if you agree on it (I'm fine either way):
Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com>
> Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
> ---
> drivers/i2c/busses/i2c-pca-platform.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-pca-platform.c b/drivers/i2c/busses/i2c-pca-platform.c
> index daccef6865e8..853a2abedb05 100644
> --- a/drivers/i2c/busses/i2c-pca-platform.c
> +++ b/drivers/i2c/busses/i2c-pca-platform.c
> @@ -232,9 +232,9 @@ static int i2c_pca_pf_probe(struct platform_device *pdev)
> return ret;
> }
>
> - if (i2c_pca_add_numbered_bus(&i2c->adap) < 0) {
> - return -ENODEV;
> - }
> + ret = i2c_pca_add_numbered_bus(&i2c->adap);
> + if (ret)
> + return ret;
>
> platform_set_drvdata(pdev, i2c);
>
> --
> 2.13.0
>
--
With Best Regards,
Andy Shevchenko
[toc] | [prev] | [next] | [standalone]
| From | Wolfram Sang <wsa@the-dreams.de> |
|---|---|
| Date | 2017-06-30 11:10 +0200 |
| Subject | Re: [PATCH 3/6] i2c: pca-platform: propagate error from i2c_pca_add_numbered_bus |
| Message-ID | <tY066-3v8-19@gated-at.bofh.it> |
| In reply to | #1678599 |
[Multipart message — attachments visible in raw view] — view raw
On Fri, Jun 30, 2017 at 11:40:51AM +0300, Andy Shevchenko wrote: > On Fri, Jun 30, 2017 at 3:54 AM, Chris Packham > <chris.packham@alliedtelesis.co.nz> wrote: > > Rather than returning -ENODEV if i2c_pca_add_numbered_bus() fails, > > propagate the error to aid debugging. > > > > + Suggested-by ? > > You or Wolfram can use below if you agree on it (I'm fine either way): > > Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com> I'll pick it.
[toc] | [prev] | [next] | [standalone]
| From | Chris Packham <Chris.Packham@alliedtelesis.co.nz> |
|---|---|
| Date | 2017-07-02 23:40 +0200 |
| Subject | Re: [PATCH 3/6] i2c: pca-platform: propagate error from i2c_pca_add_numbered_bus |
| Message-ID | <tYUL0-81f-13@gated-at.bofh.it> |
| In reply to | #1678599 |
On 30/06/17 20:40, Andy Shevchenko wrote:
> On Fri, Jun 30, 2017 at 3:54 AM, Chris Packham
> <chris.packham@alliedtelesis.co.nz> wrote:
>> Rather than returning -ENODEV if i2c_pca_add_numbered_bus() fails,
>> propagate the error to aid debugging.
>>
>
> + Suggested-by ?
>
> You or Wolfram can use below if you agree on it (I'm fine either way):
>
> Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com>
>
I'll include it (and the Reviewed-by) in v2 if there is one.
>> Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
>
>> ---
>> drivers/i2c/busses/i2c-pca-platform.c | 6 +++---
>> 1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/i2c/busses/i2c-pca-platform.c b/drivers/i2c/busses/i2c-pca-platform.c
>> index daccef6865e8..853a2abedb05 100644
>> --- a/drivers/i2c/busses/i2c-pca-platform.c
>> +++ b/drivers/i2c/busses/i2c-pca-platform.c
>> @@ -232,9 +232,9 @@ static int i2c_pca_pf_probe(struct platform_device *pdev)
>> return ret;
>> }
>>
>> - if (i2c_pca_add_numbered_bus(&i2c->adap) < 0) {
>> - return -ENODEV;
>> - }
>> + ret = i2c_pca_add_numbered_bus(&i2c->adap);
>> + if (ret)
>> + return ret;
>>
>> platform_set_drvdata(pdev, i2c);
>>
>> --
>> 2.13.0
>>
>
>
>
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web