* [PATCH -next v2] i2c: remove redundant dev_err_probe()
@ 2023-08-01 13:48 ` Zhu Wang
0 siblings, 0 replies; 9+ messages in thread
From: Zhu Wang @ 2023-08-01 13:48 UTC (permalink / raw)
To: brgl, andi.shyti, conor.dooley, daire.mcnamara, linux-arm-kernel,
linux-i2c, linux-riscv
Cc: wangzhu9
When platform_get_irq() is called, the error message has been printed,
so it need not to call dev_err_probe() to print error.
As the comment of platform_get_irq() says, it returned non-zero value
when it succeeded, and it returned negative value when it failed.
Signed-off-by: Zhu Wang <wangzhu9@huawei.com>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
---
Changes in v2:
- Update the comment, explain the return value of platform_get_irq().
---
drivers/i2c/busses/i2c-davinci.c | 2 +-
drivers/i2c/busses/i2c-microchip-corei2c.c | 5 ++---
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/i2c/busses/i2c-davinci.c b/drivers/i2c/busses/i2c-davinci.c
index 52527189a7bf..329c952d5062 100644
--- a/drivers/i2c/busses/i2c-davinci.c
+++ b/drivers/i2c/busses/i2c-davinci.c
@@ -765,7 +765,7 @@ static int davinci_i2c_probe(struct platform_device *pdev)
irq = platform_get_irq(pdev, 0);
if (irq < 0)
- return dev_err_probe(&pdev->dev, irq, "can't get irq resource\n");
+ return irq;
dev = devm_kzalloc(&pdev->dev, sizeof(*dev), GFP_KERNEL);
if (!dev)
diff --git a/drivers/i2c/busses/i2c-microchip-corei2c.c b/drivers/i2c/busses/i2c-microchip-corei2c.c
index 7f58f7eaabb6..0b0a1c4d17ca 100644
--- a/drivers/i2c/busses/i2c-microchip-corei2c.c
+++ b/drivers/i2c/busses/i2c-microchip-corei2c.c
@@ -378,9 +378,8 @@ static int mchp_corei2c_probe(struct platform_device *pdev)
return PTR_ERR(idev->base);
irq = platform_get_irq(pdev, 0);
- if (irq <= 0)
- return dev_err_probe(&pdev->dev, -ENXIO,
- "invalid IRQ %d for I2C controller\n", irq);
+ if (irq < 0)
+ return irq;
idev->i2c_clk = devm_clk_get(&pdev->dev, NULL);
if (IS_ERR(idev->i2c_clk))
--
2.17.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH -next v2] i2c: remove redundant dev_err_probe()
@ 2023-08-01 13:48 ` Zhu Wang
0 siblings, 0 replies; 9+ messages in thread
From: Zhu Wang @ 2023-08-01 13:48 UTC (permalink / raw)
To: brgl, andi.shyti, conor.dooley, daire.mcnamara, linux-arm-kernel,
linux-i2c, linux-riscv
Cc: wangzhu9
When platform_get_irq() is called, the error message has been printed,
so it need not to call dev_err_probe() to print error.
As the comment of platform_get_irq() says, it returned non-zero value
when it succeeded, and it returned negative value when it failed.
Signed-off-by: Zhu Wang <wangzhu9@huawei.com>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
---
Changes in v2:
- Update the comment, explain the return value of platform_get_irq().
---
drivers/i2c/busses/i2c-davinci.c | 2 +-
drivers/i2c/busses/i2c-microchip-corei2c.c | 5 ++---
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/i2c/busses/i2c-davinci.c b/drivers/i2c/busses/i2c-davinci.c
index 52527189a7bf..329c952d5062 100644
--- a/drivers/i2c/busses/i2c-davinci.c
+++ b/drivers/i2c/busses/i2c-davinci.c
@@ -765,7 +765,7 @@ static int davinci_i2c_probe(struct platform_device *pdev)
irq = platform_get_irq(pdev, 0);
if (irq < 0)
- return dev_err_probe(&pdev->dev, irq, "can't get irq resource\n");
+ return irq;
dev = devm_kzalloc(&pdev->dev, sizeof(*dev), GFP_KERNEL);
if (!dev)
diff --git a/drivers/i2c/busses/i2c-microchip-corei2c.c b/drivers/i2c/busses/i2c-microchip-corei2c.c
index 7f58f7eaabb6..0b0a1c4d17ca 100644
--- a/drivers/i2c/busses/i2c-microchip-corei2c.c
+++ b/drivers/i2c/busses/i2c-microchip-corei2c.c
@@ -378,9 +378,8 @@ static int mchp_corei2c_probe(struct platform_device *pdev)
return PTR_ERR(idev->base);
irq = platform_get_irq(pdev, 0);
- if (irq <= 0)
- return dev_err_probe(&pdev->dev, -ENXIO,
- "invalid IRQ %d for I2C controller\n", irq);
+ if (irq < 0)
+ return irq;
idev->i2c_clk = devm_clk_get(&pdev->dev, NULL);
if (IS_ERR(idev->i2c_clk))
--
2.17.1
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH -next v2] i2c: remove redundant dev_err_probe()
@ 2023-08-01 13:48 ` Zhu Wang
0 siblings, 0 replies; 9+ messages in thread
From: Zhu Wang @ 2023-08-01 13:48 UTC (permalink / raw)
To: brgl, andi.shyti, conor.dooley, daire.mcnamara, linux-arm-kernel,
linux-i2c, linux-riscv
Cc: wangzhu9
When platform_get_irq() is called, the error message has been printed,
so it need not to call dev_err_probe() to print error.
As the comment of platform_get_irq() says, it returned non-zero value
when it succeeded, and it returned negative value when it failed.
Signed-off-by: Zhu Wang <wangzhu9@huawei.com>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
---
Changes in v2:
- Update the comment, explain the return value of platform_get_irq().
---
drivers/i2c/busses/i2c-davinci.c | 2 +-
drivers/i2c/busses/i2c-microchip-corei2c.c | 5 ++---
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/i2c/busses/i2c-davinci.c b/drivers/i2c/busses/i2c-davinci.c
index 52527189a7bf..329c952d5062 100644
--- a/drivers/i2c/busses/i2c-davinci.c
+++ b/drivers/i2c/busses/i2c-davinci.c
@@ -765,7 +765,7 @@ static int davinci_i2c_probe(struct platform_device *pdev)
irq = platform_get_irq(pdev, 0);
if (irq < 0)
- return dev_err_probe(&pdev->dev, irq, "can't get irq resource\n");
+ return irq;
dev = devm_kzalloc(&pdev->dev, sizeof(*dev), GFP_KERNEL);
if (!dev)
diff --git a/drivers/i2c/busses/i2c-microchip-corei2c.c b/drivers/i2c/busses/i2c-microchip-corei2c.c
index 7f58f7eaabb6..0b0a1c4d17ca 100644
--- a/drivers/i2c/busses/i2c-microchip-corei2c.c
+++ b/drivers/i2c/busses/i2c-microchip-corei2c.c
@@ -378,9 +378,8 @@ static int mchp_corei2c_probe(struct platform_device *pdev)
return PTR_ERR(idev->base);
irq = platform_get_irq(pdev, 0);
- if (irq <= 0)
- return dev_err_probe(&pdev->dev, -ENXIO,
- "invalid IRQ %d for I2C controller\n", irq);
+ if (irq < 0)
+ return irq;
idev->i2c_clk = devm_clk_get(&pdev->dev, NULL);
if (IS_ERR(idev->i2c_clk))
--
2.17.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH -next v2] i2c: remove redundant dev_err_probe()
2023-08-01 13:48 ` Zhu Wang
(?)
@ 2023-08-02 20:10 ` Andi Shyti
-1 siblings, 0 replies; 9+ messages in thread
From: Andi Shyti @ 2023-08-02 20:10 UTC (permalink / raw)
To: brgl, conor.dooley, daire.mcnamara, linux-arm-kernel, linux-i2c,
linux-riscv, Zhu Wang
Cc: Andi Shyti
Hi
On Tue, 01 Aug 2023 21:48:14 +0800, Zhu Wang wrote:
> When platform_get_irq() is called, the error message has been printed,
> so it need not to call dev_err_probe() to print error.
>
> As the comment of platform_get_irq() says, it returned non-zero value
> when it succeeded, and it returned negative value when it failed.
>
>
> [...]
Applied to i2c/andi-for-next on
https://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti/linux.git
Please note that this patch may still undergo further evaluation
and the final decision will be made in collaboration with
Wolfram.
Thank you,
Andi
Patches applied
===============
[1/1] i2c: remove redundant dev_err_probe()
commit: 6a07ab839a9c14df82ba2fe0b5dd4faa85a64d89
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH -next v2] i2c: remove redundant dev_err_probe()
@ 2023-08-02 20:10 ` Andi Shyti
0 siblings, 0 replies; 9+ messages in thread
From: Andi Shyti @ 2023-08-02 20:10 UTC (permalink / raw)
To: brgl, conor.dooley, daire.mcnamara, linux-arm-kernel, linux-i2c,
linux-riscv, Zhu Wang
Cc: Andi Shyti
Hi
On Tue, 01 Aug 2023 21:48:14 +0800, Zhu Wang wrote:
> When platform_get_irq() is called, the error message has been printed,
> so it need not to call dev_err_probe() to print error.
>
> As the comment of platform_get_irq() says, it returned non-zero value
> when it succeeded, and it returned negative value when it failed.
>
>
> [...]
Applied to i2c/andi-for-next on
https://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti/linux.git
Please note that this patch may still undergo further evaluation
and the final decision will be made in collaboration with
Wolfram.
Thank you,
Andi
Patches applied
===============
[1/1] i2c: remove redundant dev_err_probe()
commit: 6a07ab839a9c14df82ba2fe0b5dd4faa85a64d89
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH -next v2] i2c: remove redundant dev_err_probe()
@ 2023-08-02 20:10 ` Andi Shyti
0 siblings, 0 replies; 9+ messages in thread
From: Andi Shyti @ 2023-08-02 20:10 UTC (permalink / raw)
To: brgl, conor.dooley, daire.mcnamara, linux-arm-kernel, linux-i2c,
linux-riscv, Zhu Wang
Cc: Andi Shyti
Hi
On Tue, 01 Aug 2023 21:48:14 +0800, Zhu Wang wrote:
> When platform_get_irq() is called, the error message has been printed,
> so it need not to call dev_err_probe() to print error.
>
> As the comment of platform_get_irq() says, it returned non-zero value
> when it succeeded, and it returned negative value when it failed.
>
>
> [...]
Applied to i2c/andi-for-next on
https://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti/linux.git
Please note that this patch may still undergo further evaluation
and the final decision will be made in collaboration with
Wolfram.
Thank you,
Andi
Patches applied
===============
[1/1] i2c: remove redundant dev_err_probe()
commit: 6a07ab839a9c14df82ba2fe0b5dd4faa85a64d89
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH -next v2] i2c: remove redundant dev_err_probe()
2023-08-02 20:10 ` Andi Shyti
(?)
@ 2023-08-14 15:11 ` Wolfram Sang
-1 siblings, 0 replies; 9+ messages in thread
From: Wolfram Sang @ 2023-08-14 15:11 UTC (permalink / raw)
To: Andi Shyti
Cc: brgl, conor.dooley, daire.mcnamara, linux-arm-kernel, linux-i2c,
linux-riscv, Zhu Wang
[-- Attachment #1: Type: text/plain, Size: 530 bytes --]
On Wed, Aug 02, 2023 at 10:10:36PM +0200, Andi Shyti wrote:
> Hi
>
> On Tue, 01 Aug 2023 21:48:14 +0800, Zhu Wang wrote:
> > When platform_get_irq() is called, the error message has been printed,
> > so it need not to call dev_err_probe() to print error.
> >
> > As the comment of platform_get_irq() says, it returned non-zero value
> > when it succeeded, and it returned negative value when it failed.
> >
> >
> > [...]
>
> Applied to i2c/andi-for-next on
Applied to for-next (via Andi's branch), thanks!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH -next v2] i2c: remove redundant dev_err_probe()
@ 2023-08-14 15:11 ` Wolfram Sang
0 siblings, 0 replies; 9+ messages in thread
From: Wolfram Sang @ 2023-08-14 15:11 UTC (permalink / raw)
To: Andi Shyti
Cc: brgl, conor.dooley, daire.mcnamara, linux-arm-kernel, linux-i2c,
linux-riscv, Zhu Wang
[-- Attachment #1.1: Type: text/plain, Size: 530 bytes --]
On Wed, Aug 02, 2023 at 10:10:36PM +0200, Andi Shyti wrote:
> Hi
>
> On Tue, 01 Aug 2023 21:48:14 +0800, Zhu Wang wrote:
> > When platform_get_irq() is called, the error message has been printed,
> > so it need not to call dev_err_probe() to print error.
> >
> > As the comment of platform_get_irq() says, it returned non-zero value
> > when it succeeded, and it returned negative value when it failed.
> >
> >
> > [...]
>
> Applied to i2c/andi-for-next on
Applied to for-next (via Andi's branch), thanks!
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
[-- Attachment #2: Type: text/plain, Size: 161 bytes --]
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH -next v2] i2c: remove redundant dev_err_probe()
@ 2023-08-14 15:11 ` Wolfram Sang
0 siblings, 0 replies; 9+ messages in thread
From: Wolfram Sang @ 2023-08-14 15:11 UTC (permalink / raw)
To: Andi Shyti
Cc: brgl, conor.dooley, daire.mcnamara, linux-arm-kernel, linux-i2c,
linux-riscv, Zhu Wang
[-- Attachment #1.1: Type: text/plain, Size: 530 bytes --]
On Wed, Aug 02, 2023 at 10:10:36PM +0200, Andi Shyti wrote:
> Hi
>
> On Tue, 01 Aug 2023 21:48:14 +0800, Zhu Wang wrote:
> > When platform_get_irq() is called, the error message has been printed,
> > so it need not to call dev_err_probe() to print error.
> >
> > As the comment of platform_get_irq() says, it returned non-zero value
> > when it succeeded, and it returned negative value when it failed.
> >
> >
> > [...]
>
> Applied to i2c/andi-for-next on
Applied to for-next (via Andi's branch), thanks!
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
[-- Attachment #2: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2023-08-14 15:12 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-01 13:48 [PATCH -next v2] i2c: remove redundant dev_err_probe() Zhu Wang
2023-08-01 13:48 ` Zhu Wang
2023-08-01 13:48 ` Zhu Wang
2023-08-02 20:10 ` Andi Shyti
2023-08-02 20:10 ` Andi Shyti
2023-08-02 20:10 ` Andi Shyti
2023-08-14 15:11 ` Wolfram Sang
2023-08-14 15:11 ` Wolfram Sang
2023-08-14 15:11 ` Wolfram Sang
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.