All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] drm/msm/dsi: Drop the redundant fail label
@ 2023-01-11  1:10 ` Jiasheng Jiang
  0 siblings, 0 replies; 6+ messages in thread
From: Jiasheng Jiang @ 2023-01-11  1:10 UTC (permalink / raw)
  To: dianders
  Cc: dmitry.baryshkov, robdclark, quic_abhinavk, sean, airlied,
	daniel, marijn.suijten, vkoul, marex, vladimir.lypak,
	linux-arm-msm, dri-devel, freedreno, linux-kernel,
	Jiasheng Jiang

Drop the redundant fail label and change the "goto fail" into "return ret"
since they are the same.

Reviewed-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
---
Changelog:

v1 -> v2:

1. No change of the error handling of the irq_of_parse_and_map.
---
 drivers/gpu/drm/msm/dsi/dsi_host.c | 24 ++++++++----------------
 1 file changed, 8 insertions(+), 16 deletions(-)

diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c
index 89aadd3b3202..de615c505def 100644
--- a/drivers/gpu/drm/msm/dsi/dsi_host.c
+++ b/drivers/gpu/drm/msm/dsi/dsi_host.c
@@ -1883,8 +1883,7 @@ int msm_dsi_host_init(struct msm_dsi *msm_dsi)
 
 	msm_host = devm_kzalloc(&pdev->dev, sizeof(*msm_host), GFP_KERNEL);
 	if (!msm_host) {
-		ret = -ENOMEM;
-		goto fail;
+		return -ENOMEM;
 	}
 
 	msm_host->pdev = pdev;
@@ -1893,31 +1892,28 @@ int msm_dsi_host_init(struct msm_dsi *msm_dsi)
 	ret = dsi_host_parse_dt(msm_host);
 	if (ret) {
 		pr_err("%s: failed to parse dt\n", __func__);
-		goto fail;
+		return ret;
 	}
 
 	msm_host->ctrl_base = msm_ioremap_size(pdev, "dsi_ctrl", &msm_host->ctrl_size);
 	if (IS_ERR(msm_host->ctrl_base)) {
 		pr_err("%s: unable to map Dsi ctrl base\n", __func__);
-		ret = PTR_ERR(msm_host->ctrl_base);
-		goto fail;
+		return PTR_ERR(msm_host->ctrl_base);
 	}
 
 	pm_runtime_enable(&pdev->dev);
 
 	msm_host->cfg_hnd = dsi_get_config(msm_host);
 	if (!msm_host->cfg_hnd) {
-		ret = -EINVAL;
 		pr_err("%s: get config failed\n", __func__);
-		goto fail;
+		return -EINVAL;
 	}
 	cfg = msm_host->cfg_hnd->cfg;
 
 	msm_host->id = dsi_host_get_id(msm_host);
 	if (msm_host->id < 0) {
-		ret = msm_host->id;
 		pr_err("%s: unable to identify DSI host index\n", __func__);
-		goto fail;
+		return msm_host->id;
 	}
 
 	/* fixup base address by io offset */
@@ -1927,19 +1923,18 @@ int msm_dsi_host_init(struct msm_dsi *msm_dsi)
 					    cfg->regulator_data,
 					    &msm_host->supplies);
 	if (ret)
-		goto fail;
+		return ret;
 
 	ret = dsi_clk_init(msm_host);
 	if (ret) {
 		pr_err("%s: unable to initialize dsi clks\n", __func__);
-		goto fail;
+		return ret;
 	}
 
 	msm_host->rx_buf = devm_kzalloc(&pdev->dev, SZ_4K, GFP_KERNEL);
 	if (!msm_host->rx_buf) {
-		ret = -ENOMEM;
 		pr_err("%s: alloc rx temp buf failed\n", __func__);
-		goto fail;
+		return -ENOMEM;
 	}
 
 	ret = devm_pm_opp_set_clkname(&pdev->dev, "byte");
@@ -1983,9 +1978,6 @@ int msm_dsi_host_init(struct msm_dsi *msm_dsi)
 
 	DBG("Dsi Host %d initialized", msm_host->id);
 	return 0;
-
-fail:
-	return ret;
 }
 
 void msm_dsi_host_destroy(struct mipi_dsi_host *host)
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH v2] drm/msm/dsi: Drop the redundant fail label
@ 2023-01-11  1:10 ` Jiasheng Jiang
  0 siblings, 0 replies; 6+ messages in thread
From: Jiasheng Jiang @ 2023-01-11  1:10 UTC (permalink / raw)
  To: dianders
  Cc: marex, vkoul, sean, Jiasheng Jiang, vladimir.lypak,
	quic_abhinavk, dri-devel, linux-kernel, linux-arm-msm,
	dmitry.baryshkov, marijn.suijten, freedreno

Drop the redundant fail label and change the "goto fail" into "return ret"
since they are the same.

Reviewed-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
---
Changelog:

v1 -> v2:

1. No change of the error handling of the irq_of_parse_and_map.
---
 drivers/gpu/drm/msm/dsi/dsi_host.c | 24 ++++++++----------------
 1 file changed, 8 insertions(+), 16 deletions(-)

diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c
index 89aadd3b3202..de615c505def 100644
--- a/drivers/gpu/drm/msm/dsi/dsi_host.c
+++ b/drivers/gpu/drm/msm/dsi/dsi_host.c
@@ -1883,8 +1883,7 @@ int msm_dsi_host_init(struct msm_dsi *msm_dsi)
 
 	msm_host = devm_kzalloc(&pdev->dev, sizeof(*msm_host), GFP_KERNEL);
 	if (!msm_host) {
-		ret = -ENOMEM;
-		goto fail;
+		return -ENOMEM;
 	}
 
 	msm_host->pdev = pdev;
@@ -1893,31 +1892,28 @@ int msm_dsi_host_init(struct msm_dsi *msm_dsi)
 	ret = dsi_host_parse_dt(msm_host);
 	if (ret) {
 		pr_err("%s: failed to parse dt\n", __func__);
-		goto fail;
+		return ret;
 	}
 
 	msm_host->ctrl_base = msm_ioremap_size(pdev, "dsi_ctrl", &msm_host->ctrl_size);
 	if (IS_ERR(msm_host->ctrl_base)) {
 		pr_err("%s: unable to map Dsi ctrl base\n", __func__);
-		ret = PTR_ERR(msm_host->ctrl_base);
-		goto fail;
+		return PTR_ERR(msm_host->ctrl_base);
 	}
 
 	pm_runtime_enable(&pdev->dev);
 
 	msm_host->cfg_hnd = dsi_get_config(msm_host);
 	if (!msm_host->cfg_hnd) {
-		ret = -EINVAL;
 		pr_err("%s: get config failed\n", __func__);
-		goto fail;
+		return -EINVAL;
 	}
 	cfg = msm_host->cfg_hnd->cfg;
 
 	msm_host->id = dsi_host_get_id(msm_host);
 	if (msm_host->id < 0) {
-		ret = msm_host->id;
 		pr_err("%s: unable to identify DSI host index\n", __func__);
-		goto fail;
+		return msm_host->id;
 	}
 
 	/* fixup base address by io offset */
@@ -1927,19 +1923,18 @@ int msm_dsi_host_init(struct msm_dsi *msm_dsi)
 					    cfg->regulator_data,
 					    &msm_host->supplies);
 	if (ret)
-		goto fail;
+		return ret;
 
 	ret = dsi_clk_init(msm_host);
 	if (ret) {
 		pr_err("%s: unable to initialize dsi clks\n", __func__);
-		goto fail;
+		return ret;
 	}
 
 	msm_host->rx_buf = devm_kzalloc(&pdev->dev, SZ_4K, GFP_KERNEL);
 	if (!msm_host->rx_buf) {
-		ret = -ENOMEM;
 		pr_err("%s: alloc rx temp buf failed\n", __func__);
-		goto fail;
+		return -ENOMEM;
 	}
 
 	ret = devm_pm_opp_set_clkname(&pdev->dev, "byte");
@@ -1983,9 +1978,6 @@ int msm_dsi_host_init(struct msm_dsi *msm_dsi)
 
 	DBG("Dsi Host %d initialized", msm_host->id);
 	return 0;
-
-fail:
-	return ret;
 }
 
 void msm_dsi_host_destroy(struct mipi_dsi_host *host)
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] drm/msm/dsi: Drop the redundant fail label
  2023-01-11  1:10 ` Jiasheng Jiang
@ 2023-01-18  1:32   ` Dmitry Baryshkov
  -1 siblings, 0 replies; 6+ messages in thread
From: Dmitry Baryshkov @ 2023-01-18  1:32 UTC (permalink / raw)
  To: Jiasheng Jiang, dianders
  Cc: robdclark, quic_abhinavk, sean, airlied, daniel, marijn.suijten,
	vkoul, marex, vladimir.lypak, linux-arm-msm, dri-devel,
	freedreno, linux-kernel

On 11/01/2023 03:10, Jiasheng Jiang wrote:
> Drop the redundant fail label and change the "goto fail" into "return ret"
> since they are the same.
> 
> Reviewed-by: Doug Anderson <dianders@chromium.org>
> Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
> ---
> Changelog:
> 
> v1 -> v2:
> 
> 1. No change of the error handling of the irq_of_parse_and_map.
> ---
>   drivers/gpu/drm/msm/dsi/dsi_host.c | 24 ++++++++----------------
>   1 file changed, 8 insertions(+), 16 deletions(-)

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>

-- 
With best wishes
Dmitry


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] drm/msm/dsi: Drop the redundant fail label
@ 2023-01-18  1:32   ` Dmitry Baryshkov
  0 siblings, 0 replies; 6+ messages in thread
From: Dmitry Baryshkov @ 2023-01-18  1:32 UTC (permalink / raw)
  To: Jiasheng Jiang, dianders
  Cc: marex, vkoul, sean, vladimir.lypak, quic_abhinavk, dri-devel,
	linux-kernel, linux-arm-msm, marijn.suijten, freedreno

On 11/01/2023 03:10, Jiasheng Jiang wrote:
> Drop the redundant fail label and change the "goto fail" into "return ret"
> since they are the same.
> 
> Reviewed-by: Doug Anderson <dianders@chromium.org>
> Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
> ---
> Changelog:
> 
> v1 -> v2:
> 
> 1. No change of the error handling of the irq_of_parse_and_map.
> ---
>   drivers/gpu/drm/msm/dsi/dsi_host.c | 24 ++++++++----------------
>   1 file changed, 8 insertions(+), 16 deletions(-)

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>

-- 
With best wishes
Dmitry


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] drm/msm/dsi: Drop the redundant fail label
  2023-01-11  1:10 ` Jiasheng Jiang
@ 2023-01-18  2:06   ` Dmitry Baryshkov
  -1 siblings, 0 replies; 6+ messages in thread
From: Dmitry Baryshkov @ 2023-01-18  2:06 UTC (permalink / raw)
  To: dianders, Jiasheng Jiang
  Cc: robdclark, quic_abhinavk, sean, airlied, daniel, marijn.suijten,
	vkoul, marex, vladimir.lypak, linux-arm-msm, dri-devel,
	freedreno, linux-kernel


On Wed, 11 Jan 2023 09:10:06 +0800, Jiasheng Jiang wrote:
> Drop the redundant fail label and change the "goto fail" into "return ret"
> since they are the same.
> 
> 

Applied, thanks!

[1/1] drm/msm/dsi: Drop the redundant fail label
      https://gitlab.freedesktop.org/lumag/msm/-/commit/dc57f09acc34

Best regards,
-- 
Dmitry Baryshkov <dmitry.baryshkov@linaro.org>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] drm/msm/dsi: Drop the redundant fail label
@ 2023-01-18  2:06   ` Dmitry Baryshkov
  0 siblings, 0 replies; 6+ messages in thread
From: Dmitry Baryshkov @ 2023-01-18  2:06 UTC (permalink / raw)
  To: dianders, Jiasheng Jiang
  Cc: marex, vkoul, sean, vladimir.lypak, quic_abhinavk, dri-devel,
	linux-kernel, linux-arm-msm, marijn.suijten, freedreno


On Wed, 11 Jan 2023 09:10:06 +0800, Jiasheng Jiang wrote:
> Drop the redundant fail label and change the "goto fail" into "return ret"
> since they are the same.
> 
> 

Applied, thanks!

[1/1] drm/msm/dsi: Drop the redundant fail label
      https://gitlab.freedesktop.org/lumag/msm/-/commit/dc57f09acc34

Best regards,
-- 
Dmitry Baryshkov <dmitry.baryshkov@linaro.org>

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-01-18  2:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-11  1:10 [PATCH v2] drm/msm/dsi: Drop the redundant fail label Jiasheng Jiang
2023-01-11  1:10 ` Jiasheng Jiang
2023-01-18  1:32 ` Dmitry Baryshkov
2023-01-18  1:32   ` Dmitry Baryshkov
2023-01-18  2:06 ` Dmitry Baryshkov
2023-01-18  2:06   ` Dmitry Baryshkov

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.