Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1364615 > unrolled thread

Re: [patch 2/2] drm/exynos: mic: remove some dead code

Started byInki Dae <inki.dae@samsung.com>
First post2016-03-25 10:00 +0100
Last post2016-03-25 21:10 +0100
Articles 3 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [patch 2/2] drm/exynos: mic: remove some dead code Inki Dae <inki.dae@samsung.com> - 2016-03-25 10:00 +0100
    [patch 2/2 v2] drm/exynos: fix a warning message Dan Carpenter <dan.carpenter@oracle.com> - 2016-03-25 21:10 +0100
    Re: [patch 2/2] drm/exynos: mic: remove some dead code Dan Carpenter <dan.carpenter@oracle.com> - 2016-03-25 21:10 +0100

#1364615 — Re: [patch 2/2] drm/exynos: mic: remove some dead code

FromInki Dae <inki.dae@samsung.com>
Date2016-03-25 10:00 +0100
SubjectRe: [patch 2/2] drm/exynos: mic: remove some dead code
Message-ID<rgvL4-7AD-23@gated-at.bofh.it>
Hi Dan,

2016년 03월 17일 19:39에 Dan Carpenter 이(가) 쓴 글:
> We know "ret" is zero and the test makes static checkers complain so
> let's delete this printk.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_mic.c b/drivers/gpu/drm/exynos/exynos_drm_mic.c
> index 890c9b1..12db353 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_mic.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_mic.c
> @@ -130,8 +130,6 @@ static void mic_set_path(struct exynos_mic *mic, bool enable)
>  		val &= ~(MIC0_RGB_MUX | MIC0_I80_MUX | MIC0_ON_MUX);
>  
>  	regmap_write(mic->sysreg, DSD_CFG_MUX, val);
> -	if (ret)
> -		DRM_ERROR("mic: Failed to read system register\n");

I think we missed to keep return value from regmap_write function,
	ret = regmap_write(mic->sysreg, ....);
	if (ret)
		...

Thanks,
Inki Dae

>  }
>  
>  static int mic_sw_reset(struct exynos_mic *mic)
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> 

[toc] | [next] | [standalone]


#1364827 — [patch 2/2 v2] drm/exynos: fix a warning message

FromDan Carpenter <dan.carpenter@oracle.com>
Date2016-03-25 21:10 +0100
Subject[patch 2/2 v2] drm/exynos: fix a warning message
Message-ID<rgGdr-72X-1@gated-at.bofh.it>
In reply to#1364615
The "ret = regmap_write()" assignment was missing so this error message
is never printed.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
v2: in v1 I just deleted the error message

diff --git a/drivers/gpu/drm/exynos/exynos_drm_mic.c b/drivers/gpu/drm/exynos/exynos_drm_mic.c
index 9869d70..ea2ea17 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_mic.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_mic.c
@@ -129,7 +129,7 @@ static void mic_set_path(struct exynos_mic *mic, bool enable)
 	} else
 		val &= ~(MIC0_RGB_MUX | MIC0_I80_MUX | MIC0_ON_MUX);
 
-	regmap_write(mic->sysreg, DSD_CFG_MUX, val);
+	ret = regmap_write(mic->sysreg, DSD_CFG_MUX, val);
 	if (ret)
 		DRM_ERROR("mic: Failed to read system register\n");
 }

[toc] | [prev] | [next] | [standalone]


#1364828

FromDan Carpenter <dan.carpenter@oracle.com>
Date2016-03-25 21:10 +0100
Message-ID<rgGds-72X-3@gated-at.bofh.it>
In reply to#1364615
On Fri, Mar 25, 2016 at 05:51:20PM +0900, Inki Dae wrote:
> Hi Dan,
> 
> 2016년 03월 17일 19:39에 Dan Carpenter 이(가) 쓴 글:
> > We know "ret" is zero and the test makes static checkers complain so
> > let's delete this printk.
> > 
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> > 
> > diff --git a/drivers/gpu/drm/exynos/exynos_drm_mic.c b/drivers/gpu/drm/exynos/exynos_drm_mic.c
> > index 890c9b1..12db353 100644
> > --- a/drivers/gpu/drm/exynos/exynos_drm_mic.c
> > +++ b/drivers/gpu/drm/exynos/exynos_drm_mic.c
> > @@ -130,8 +130,6 @@ static void mic_set_path(struct exynos_mic *mic, bool enable)
> >  		val &= ~(MIC0_RGB_MUX | MIC0_I80_MUX | MIC0_ON_MUX);
> >  
> >  	regmap_write(mic->sysreg, DSD_CFG_MUX, val);
> > -	if (ret)
> > -		DRM_ERROR("mic: Failed to read system register\n");
> 
> I think we missed to keep return value from regmap_write function,
> 	ret = regmap_write(mic->sysreg, ....);
> 	if (ret)
> 		...

Yeah.  You're right.

regards,
dan carpenter

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web