2016-11-04 10:48:02

by Masahiro Yamada

[permalink] [raw]
Subject: [PATCH 1/2] i2c: uniphier: rename jump label to follow coding style guideline

Documentation/CodingStyle recommends to use label names which say
what the goto does or why the goto exists.

Signed-off-by: Masahiro Yamada <[email protected]>
---

drivers/i2c/busses/i2c-uniphier.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/i2c/busses/i2c-uniphier.c b/drivers/i2c/busses/i2c-uniphier.c
index cc80bb2..abc6770 100644
--- a/drivers/i2c/busses/i2c-uniphier.c
+++ b/drivers/i2c/busses/i2c-uniphier.c
@@ -373,7 +373,7 @@ static int uniphier_i2c_probe(struct platform_device *pdev)
if (!clk_rate) {
dev_err(dev, "input clock rate should not be zero\n");
ret = -EINVAL;
- goto err;
+ goto disable_clk;
}

init_completion(&priv->comp);
@@ -392,11 +392,11 @@ static int uniphier_i2c_probe(struct platform_device *pdev)
priv);
if (ret) {
dev_err(dev, "failed to request irq %d\n", irq);
- goto err;
+ goto disable_clk;
}

ret = i2c_add_adapter(&priv->adap);
-err:
+disable_clk:
if (ret)
clk_disable_unprepare(priv->clk);

--
1.9.1


2016-11-04 10:48:01

by Masahiro Yamada

[permalink] [raw]
Subject: [PATCH 2/2] i2c: uniphier-f: rename jump label to follow coding style guideline

Documentation/CodingStyle recommends to use label names which say
what the goto does or why the goto exists.

Signed-off-by: Masahiro Yamada <[email protected]>
---

drivers/i2c/busses/i2c-uniphier-f.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/i2c/busses/i2c-uniphier-f.c b/drivers/i2c/busses/i2c-uniphier-f.c
index b54448e..a154cc9 100644
--- a/drivers/i2c/busses/i2c-uniphier-f.c
+++ b/drivers/i2c/busses/i2c-uniphier-f.c
@@ -528,7 +528,7 @@ static int uniphier_fi2c_probe(struct platform_device *pdev)
if (!clk_rate) {
dev_err(dev, "input clock rate should not be zero\n");
ret = -EINVAL;
- goto err;
+ goto disable_clk;
}

init_completion(&priv->comp);
@@ -547,11 +547,11 @@ static int uniphier_fi2c_probe(struct platform_device *pdev)
pdev->name, priv);
if (ret) {
dev_err(dev, "failed to request irq %d\n", irq);
- goto err;
+ goto disable_clk;
}

ret = i2c_add_adapter(&priv->adap);
-err:
+disable_clk:
if (ret)
clk_disable_unprepare(priv->clk);

--
1.9.1

2016-11-18 01:22:50

by Wolfram Sang

[permalink] [raw]
Subject: Re: [1/2] i2c: uniphier: rename jump label to follow coding style guideline

On Fri, Nov 04, 2016 at 07:49:20PM +0900, Masahiro Yamada wrote:
> Documentation/CodingStyle recommends to use label names which say
> what the goto does or why the goto exists.
>
> Signed-off-by: Masahiro Yamada <[email protected]>

Applied to for-next, thanks!


Attachments:
(No filename) (277.00 B)
signature.asc (819.00 B)
Download all attachments

2016-11-18 01:23:15

by Wolfram Sang

[permalink] [raw]
Subject: Re: [2/2] i2c: uniphier-f: rename jump label to follow coding style guideline

On Fri, Nov 04, 2016 at 07:49:21PM +0900, Masahiro Yamada wrote:
> Documentation/CodingStyle recommends to use label names which say
> what the goto does or why the goto exists.
>
> Signed-off-by: Masahiro Yamada <[email protected]>

Applied to for-next, thanks!


Attachments:
(No filename) (277.00 B)
signature.asc (819.00 B)
Download all attachments