Skip to contentSkip to conversation

i2c: designware: Suppress error message if platform_get_irq() < 0

PATCH In review Alexey Brodkin 4 participants 4 messages Mar 9, 2015 – Mar 15, 2015

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 i2c: designware: Suppress error message if platform_get_irq() < 0

As discussed here https://lkml.org/lkml/2015/3/3/568 and here
https://lkml.org/lkml/2015/3/3/453 we're looking forward for implementing warnings and errors outputs right in platform_get_irq() instead of having all kind of different outputs in each and every driver that uses platform_get_irq().

Cc Vineet Gupta <vgupta-HKixBCOQz3hWk0Htik3J/[email protected]>
Cc Christian Ruppert <[email protected]>
Cc Mika Westerberg <mika.westerberg-VuQAYsv1563Yd54FQh9/[email protected]>
Cc Wolfram Sang <wsa-z923LK4zBo2bacvFa/[email protected]>
Cc Andy Shevchenko <andriy.shevchenko-VuQAYsv1563Yd54FQh9/[email protected]>
---
 drivers/i2c/busses/i2c-designware-platdrv.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/i2c/busses/i2c-designware-platdrv.c +2 -4
index c270f5f..fa4e2b5 100644
@@ -143,10 +143,8 @@ static int dw_i2c_probe(struct platform_device *pdev)
 	u32 clk_freq, ht = 0;
 
 	irq = platform_get_irq(pdev, 0);
-	if (irq < 0) {
-		dev_err(&pdev->dev, "no irq resource?\n");
-		return irq; /* -ENXIO */
-	}
+	if (irq < 0)
+		return irq;
 
 	dev = devm_kzalloc(&pdev->dev, sizeof(struct dw_i2c_dev), GFP_KERNEL);
 	if (!dev)
Signature · 1 line
2.1.0
maintainer Acked-by on v2 1/1
#1 lore raw
Quoted 10 lines · Alexey Brodkin

As discussed here https://lkml.org/lkml/2015/3/3/568 and here
https://lkml.org/lkml/2015/3/3/453 we're looking forward for implementing warnings and errors outputs right in platform_get_irq() instead of having all kind of different outputs in each and every driver that uses platform_get_irq().

Cc Vineet Gupta <vgupta-HKixBCOQz3hWk0Htik3J/[email protected]>
Cc Christian Ruppert <[email protected]>
Cc Mika Westerberg <mika.westerberg-VuQAYsv1563Yd54FQh9/[email protected]>
Acked-by on v2 1/1
#2 lore raw
In reply to Alexey Brodkin

Alexey Brodkin <[email protected]> wrote on 03/09/2015 10:03:12 AM:

Quoted 16 lines

From: Alexey Brodkin <[email protected]>
To: [email protected],
Cc: [email protected], Alexey Brodkin <[email protected]>, Vineet Gupta <[email protected]>, Christian Ruppert <[email protected]>, Mika Westerberg <[email protected]>, Wolfram Sang <[email protected]>, Andy Shevchenko <[email protected]>
Date: 03/09/2015 10:03 AM

As discussed here https://lkml.org/lkml/2015/3/3/568 and here
https://lkml.org/lkml/2015/3/3/453 we're looking forward for implementing warnings and errors outputs right in platform_get_irq() instead of having all kind of different outputs in each and every driver that uses platform_get_irq().

Quoted 3 lines
Cc Vineet Gupta <[email protected]>
Cc Christian Ruppert <[email protected]>

Please note that my email address has changed and use the alitech one in future. The abilis address might be switched off soon.

drivers/i2c/busses/i2c-designware-platdrv.c static int dw_i2c_probe(struct platform_device

Quoted 13 lines
Cc Mika Westerberg <[email protected]>
Cc Wolfram Sang <[email protected]>
Cc Andy Shevchenko <[email protected]>
---
 drivers/i2c/busses/i2c-designware-platdrv.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/ renamed from drivers/i2c/busses/i2c-designware-platdrv.c +0 -0

i2c/busses/i2c-designware-platdrv.c
index c270f5f..fa4e2b5 100644

drivers/i2c/busses/i2c-designware-platdrv.c +0 -0
@@ -143,10 +143,8 @@ static int dw_i2c_probe(struct platform_device 

*pdev)

drivers/i2c/busses/i2c-designware-platdrv.c static int dw_i2c_probe(struct platform_device *pdev)

Quoted 11 lines
drivers/i2c/busses/i2c-designware-platdrv.c +2 -4
    u32 clk_freq, ht = 0;
 
    irq = platform_get_irq(pdev, 0);
-   if (irq < 0) {
-      dev_err(&pdev->dev, "no irq resource?\n");
-      return irq; /* -ENXIO */
-   }
+   if (irq < 0)
+      return irq;
 
    dev = devm_kzalloc(&pdev->dev, sizeof(struct dw_i2c_dev), 

GFP_KERNEL);

Quoted 4 lines
drivers/i2c/busses/i2c-designware-platdrv.c +0 -0
    if (!dev)
Signature · 1 line
2.1.0
#3 lore raw
In reply to Alexey Brodkin
Quoted 6 lines · Alexey Brodkin

As discussed here https://lkml.org/lkml/2015/3/3/568 and here
https://lkml.org/lkml/2015/3/3/453 we're looking forward for implementing warnings and errors outputs right in platform_get_irq() instead of having all kind of different outputs in each and every driver that uses platform_get_irq().

Quoted 6 lines
Cc Vineet Gupta <[email protected]>
Cc Christian Ruppert <[email protected]>
Cc Mika Westerberg <[email protected]>
Cc Wolfram Sang <[email protected]>
Cc Andy Shevchenko <[email protected]>

Reworded the commit message to state the initial reason for this patch and applied to for-next, thanks!