Skip to contentSkip to conversation

i2c: img-scb: remove duplicate dev_err()

PATCH In review Dejin Zheng 3 participants 7 messages Apr 14, 2020 I2C subsystem host drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 i2c: img-scb: remove duplicate dev_err()

it will print an error message by itself when platform_get_irq() goes wrong. so don't need dev_err() in here again.

---
 drivers/i2c/busses/i2c-img-scb.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/i2c/busses/i2c-img-scb.c +1 -3
index 422097a31c95..2f6de763816a 100644
@@ -1344,10 +1344,8 @@ static int img_i2c_probe(struct platform_device *pdev)
 		return PTR_ERR(i2c->base);
 
 	irq = platform_get_irq(pdev, 0);
-	if (irq < 0) {
-		dev_err(&pdev->dev, "can't get irq number\n");
+	if (irq < 0)
 		return irq;
-	}
 
 	i2c->sys_clk = devm_clk_get(&pdev->dev, "sys");
 	if (IS_ERR(i2c->sys_clk)) {
Signature · 1 line
2.25.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 2 lines · Dejin Zheng

it will print an error message by itself when platform_get_irq() goes wrong. so don't need dev_err() in here again.

In the future, please use something like this

	scripts/get_maintainer.pl --git --git-min-percent=67

when retrieve Cc list for the mail.

FWIW,

Quoted 24 lines
---
 drivers/i2c/busses/i2c-img-scb.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/i2c/busses/i2c-img-scb.c +1 -3
index 422097a31c95..2f6de763816a 100644
@@ -1344,10 +1344,8 @@ static int img_i2c_probe(struct platform_device *pdev)
 		return PTR_ERR(i2c->base);
 
 	irq = platform_get_irq(pdev, 0);
-	if (irq < 0) {
-		dev_err(&pdev->dev, "can't get irq number\n");
+	if (irq < 0)
 		return irq;
-	}
 
 	i2c->sys_clk = devm_clk_get(&pdev->dev, "sys");
 	if (IS_ERR(i2c->sys_clk)) {
Signature · 1 line
2.25.0
Signature · 2 lines
With Best Regards,
Andy Shevchenko
#2 lore raw
Quoted 8 lines · Andy Shevchenko
Quoted 2 lines · Dejin Zheng

it will print an error message by itself when platform_get_irq() goes wrong. so don't need dev_err() in here again.

In the future, please use something like this

	scripts/get_maintainer.pl --git --git-min-percent=67

when retrieve Cc list for the mail.

Andy, Thank you for reminding me again, if I used it, There are only two email addresses.

scripts/get_maintainer.pl --git --git-min-percent=67 v1-0001-i2c-img-scb-remove-duplicate-dev_err.patch [email protected] (open list:I2C SUBSYSTEM HOST DRIVERS) [email protected] (open list)

Quoted 4 lines

FWIW,

Thanks very much for your review.

BR,
Dejin

Quoted 30 lines
Quoted 24 lines
---
 drivers/i2c/busses/i2c-img-scb.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/i2c/busses/i2c-img-scb.c +1 -3
index 422097a31c95..2f6de763816a 100644
@@ -1344,10 +1344,8 @@ static int img_i2c_probe(struct platform_device *pdev)
 		return PTR_ERR(i2c->base);
 
 	irq = platform_get_irq(pdev, 0);
-	if (irq < 0) {
-		dev_err(&pdev->dev, "can't get irq number\n");
+	if (irq < 0)
 		return irq;
-	}
 
 	i2c->sys_clk = devm_clk_get(&pdev->dev, "sys");
 	if (IS_ERR(i2c->sys_clk)) {
Signature · 1 line
2.25.0
Signature · 2 lines
With Best Regards,
Andy Shevchenko
#3 lore raw
Quoted 9 lines · Dejin Zheng
Quoted 8 lines · Andy Shevchenko
Quoted 2 lines · Dejin Zheng

it will print an error message by itself when platform_get_irq() goes wrong. so don't need dev_err() in here again.

In the future, please use something like this

	scripts/get_maintainer.pl --git --git-min-percent=67

when retrieve Cc list for the mail.

Quoted 6 lines

Andy, Thank you for reminding me again, if I used it, There are only two email addresses.

scripts/get_maintainer.pl --git --git-min-percent=67 v1-0001-i2c-img-scb-remove-duplicate-dev_err.patch [email protected] (open list:I2C SUBSYSTEM HOST DRIVERS) [email protected] (open list)

Nice, you found a bug in MAINTAINERS database.

Quoted 4 lines
Quoted 3 lines

FWIW,

Thanks very much for your review.

I recommend to resend a new version with those mailings lists followed by Wolfram included in the Cc list. Don't forget to add my tag in the commit message and bump the version.

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#4 lore raw
Quoted 6 lines
Quoted 4 lines

scripts/get_maintainer.pl --git --git-min-percent=67 v1-0001-i2c-img-scb-remove-duplicate-dev_err.patch [email protected] (open list:I2C SUBSYSTEM HOST DRIVERS) [email protected] (open list)

Nice, you found a bug in MAINTAINERS database.

No, all fine. We don't have a maintainer for that driver.

Quoted 3 lines

I recommend to resend a new version with those mailings lists followed by Wolfram included in the Cc list. Don't forget to add my tag in the commit message and bump the version.

The patch is already in patchwork, so no need to resend from my side.

#5 lore raw
Quoted 8 lines · Wolfram Sang
Quoted 6 lines
Quoted 4 lines

scripts/get_maintainer.pl --git --git-min-percent=67 v1-0001-i2c-img-scb-remove-duplicate-dev_err.patch [email protected] (open list:I2C SUBSYSTEM HOST DRIVERS) [email protected] (open list)

Nice, you found a bug in MAINTAINERS database.

No, all fine. We don't have a maintainer for that driver.

I realized that there are many drivers like that in the tree...

Quoted 5 lines
Quoted 3 lines

I recommend to resend a new version with those mailings lists followed by Wolfram included in the Cc list. Don't forget to add my tag in the commit message and bump the version.

The patch is already in patchwork, so no need to resend from my side.

Good to know how you handle the (orphaned?) ones.

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#6 lore raw
Quoted 4 lines
Quoted 2 lines

The patch is already in patchwork, so no need to resend from my side.

Good to know how you handle the (orphaned?) ones.

Kind of. Those are set to "odd fixes" in MAINTAINERS.

Having per-driver maintainers worked quite good so far, so I keep asking whenever I see potential candidates.