* [PATCH] drm/exynos: dsi: fix exynos_dsi_set_pll() wrong return value
@ 2014-08-14 2:22 YoungJun Cho
2014-08-14 7:21 ` Andrzej Hajda
2014-08-18 8:32 ` Inki Dae
0 siblings, 2 replies; 3+ messages in thread
From: YoungJun Cho @ 2014-08-14 2:22 UTC (permalink / raw)
To: airlied, dri-devel
Cc: linux-samsung-soc, sw0312.kim, a.hajda, kyungmin.park, kgene.kim
The type of this function is unsigned long, and it is expected
to return proper fout value or zero if something is wrong.
So this patch fixes wrong return value for error cases.
Signed-off-by: YoungJun Cho <yj44.cho@samsung.com>
Acked-by: Inki Dae <inki.dae@samsung.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
---
drivers/gpu/drm/exynos/exynos_drm_dsi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
index 86aebd8..061017b 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
@@ -421,7 +421,7 @@ static unsigned long exynos_dsi_set_pll(struct exynos_dsi *dsi,
if (!fout) {
dev_err(dsi->dev,
"failed to find PLL PMS for requested frequency\n");
- return -EFAULT;
+ return 0;
}
dev_dbg(dsi->dev, "PLL freq %lu, (p %d, m %d, s %d)\n", fout, p, m, s);
@@ -453,7 +453,7 @@ static unsigned long exynos_dsi_set_pll(struct exynos_dsi *dsi,
do {
if (timeout-- == 0) {
dev_err(dsi->dev, "PLL failed to stabilize\n");
- return -EFAULT;
+ return 0;
}
reg = readl(dsi->reg_base + DSIM_STATUS_REG);
} while ((reg & DSIM_PLL_STABLE) == 0);
--
1.9.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/exynos: dsi: fix exynos_dsi_set_pll() wrong return value
2014-08-14 2:22 [PATCH] drm/exynos: dsi: fix exynos_dsi_set_pll() wrong return value YoungJun Cho
@ 2014-08-14 7:21 ` Andrzej Hajda
2014-08-18 8:32 ` Inki Dae
1 sibling, 0 replies; 3+ messages in thread
From: Andrzej Hajda @ 2014-08-14 7:21 UTC (permalink / raw)
To: YoungJun Cho, airlied, dri-devel
Cc: kgene.kim, sw0312.kim, kyungmin.park, linux-samsung-soc
Hi YoungJun,
Thanks for spotting it.
On 08/14/2014 04:22 AM, YoungJun Cho wrote:
> The type of this function is unsigned long, and it is expected
> to return proper fout value or zero if something is wrong.
> So this patch fixes wrong return value for error cases.
>
> Signed-off-by: YoungJun Cho <yj44.cho@samsung.com>
> Acked-by: Inki Dae <inki.dae@samsung.com>
> Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Andrzej Hajda <a.hajda@samsung.com>
Regards
Andrzej
> ---
> drivers/gpu/drm/exynos/exynos_drm_dsi.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
> index 86aebd8..061017b 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
> @@ -421,7 +421,7 @@ static unsigned long exynos_dsi_set_pll(struct exynos_dsi *dsi,
> if (!fout) {
> dev_err(dsi->dev,
> "failed to find PLL PMS for requested frequency\n");
> - return -EFAULT;
> + return 0;
> }
> dev_dbg(dsi->dev, "PLL freq %lu, (p %d, m %d, s %d)\n", fout, p, m, s);
>
> @@ -453,7 +453,7 @@ static unsigned long exynos_dsi_set_pll(struct exynos_dsi *dsi,
> do {
> if (timeout-- == 0) {
> dev_err(dsi->dev, "PLL failed to stabilize\n");
> - return -EFAULT;
> + return 0;
> }
> reg = readl(dsi->reg_base + DSIM_STATUS_REG);
> } while ((reg & DSIM_PLL_STABLE) == 0);
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/exynos: dsi: fix exynos_dsi_set_pll() wrong return value
2014-08-14 2:22 [PATCH] drm/exynos: dsi: fix exynos_dsi_set_pll() wrong return value YoungJun Cho
2014-08-14 7:21 ` Andrzej Hajda
@ 2014-08-18 8:32 ` Inki Dae
1 sibling, 0 replies; 3+ messages in thread
From: Inki Dae @ 2014-08-18 8:32 UTC (permalink / raw)
To: YoungJun Cho
Cc: linux-samsung-soc, sw0312.kim, dri-devel, a.hajda, kyungmin.park,
kgene.kim
On 2014년 08월 14일 11:22, YoungJun Cho wrote:
> The type of this function is unsigned long, and it is expected
> to return proper fout value or zero if something is wrong.
> So this patch fixes wrong return value for error cases.
Applied.
Thanks,
Inki Dae
>
> Signed-off-by: YoungJun Cho <yj44.cho@samsung.com>
> Acked-by: Inki Dae <inki.dae@samsung.com>
> Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
> ---
> drivers/gpu/drm/exynos/exynos_drm_dsi.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
> index 86aebd8..061017b 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
> @@ -421,7 +421,7 @@ static unsigned long exynos_dsi_set_pll(struct exynos_dsi *dsi,
> if (!fout) {
> dev_err(dsi->dev,
> "failed to find PLL PMS for requested frequency\n");
> - return -EFAULT;
> + return 0;
> }
> dev_dbg(dsi->dev, "PLL freq %lu, (p %d, m %d, s %d)\n", fout, p, m, s);
>
> @@ -453,7 +453,7 @@ static unsigned long exynos_dsi_set_pll(struct exynos_dsi *dsi,
> do {
> if (timeout-- == 0) {
> dev_err(dsi->dev, "PLL failed to stabilize\n");
> - return -EFAULT;
> + return 0;
> }
> reg = readl(dsi->reg_base + DSIM_STATUS_REG);
> } while ((reg & DSIM_PLL_STABLE) == 0);
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-08-18 8:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-14 2:22 [PATCH] drm/exynos: dsi: fix exynos_dsi_set_pll() wrong return value YoungJun Cho
2014-08-14 7:21 ` Andrzej Hajda
2014-08-18 8:32 ` Inki Dae
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.