diff mbox

drm/exynos: remove superfluous checks in g2d_check_reg_offset()

Message ID 1439851884-3346-1-git-send-email-tjakobi@math.uni-bielefeld.de (mailing list archive)
State New, archived
Headers show

Commit Message

Tobias Jakobi Aug. 17, 2015, 10:51 p.m. UTC
The cases of the switch statement ensure that reg_type
can never be REG_TYPE_NONE here.

Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
---
 drivers/gpu/drm/exynos/exynos_drm_g2d.c | 8 --------
 1 file changed, 8 deletions(-)

Comments

Tobias Jakobi Aug. 25, 2015, 3:50 p.m. UTC | #1
Gentle ping!

On 2015-08-18 00:51, Tobias Jakobi wrote:
> The cases of the switch statement ensure that reg_type
> can never be REG_TYPE_NONE here.
> 
> Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
> ---
>  drivers/gpu/drm/exynos/exynos_drm_g2d.c | 8 --------
>  1 file changed, 8 deletions(-)
> 
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_g2d.c
> b/drivers/gpu/drm/exynos/exynos_drm_g2d.c
> index ba00839..211af37 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_g2d.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_g2d.c
> @@ -973,8 +973,6 @@ static int g2d_check_reg_offset(struct device *dev,
>  				goto err;
> 
>  			reg_type = g2d_get_reg_type(reg_offset);
> -			if (reg_type == REG_TYPE_NONE)
> -				goto err;
> 
>  			/* check userptr buffer type. */
>  			if ((cmdlist->data[index] & ~0x7fffffff) >> 31) {
> @@ -989,8 +987,6 @@ static int g2d_check_reg_offset(struct device *dev,
>  				goto err;
> 
>  			reg_type = g2d_get_reg_type(reg_offset);
> -			if (reg_type == REG_TYPE_NONE)
> -				goto err;
> 
>  			buf_desc = &buf_info->descs[reg_type];
>  			value = cmdlist->data[index + 1];
> @@ -1003,8 +999,6 @@ static int g2d_check_reg_offset(struct device 
> *dev,
>  				goto err;
> 
>  			reg_type = g2d_get_reg_type(reg_offset);
> -			if (reg_type == REG_TYPE_NONE)
> -				goto err;
> 
>  			buf_desc = &buf_info->descs[reg_type];
>  			value = cmdlist->data[index + 1];
> @@ -1018,8 +1012,6 @@ static int g2d_check_reg_offset(struct device 
> *dev,
>  				goto err;
> 
>  			reg_type = g2d_get_reg_type(reg_offset);
> -			if (reg_type == REG_TYPE_NONE)
> -				goto err;
> 
>  			buf_desc = &buf_info->descs[reg_type];
>  			value = cmdlist->data[index + 1];
diff mbox

Patch

diff --git a/drivers/gpu/drm/exynos/exynos_drm_g2d.c b/drivers/gpu/drm/exynos/exynos_drm_g2d.c
index ba00839..211af37 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_g2d.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_g2d.c
@@ -973,8 +973,6 @@  static int g2d_check_reg_offset(struct device *dev,
 				goto err;
 
 			reg_type = g2d_get_reg_type(reg_offset);
-			if (reg_type == REG_TYPE_NONE)
-				goto err;
 
 			/* check userptr buffer type. */
 			if ((cmdlist->data[index] & ~0x7fffffff) >> 31) {
@@ -989,8 +987,6 @@  static int g2d_check_reg_offset(struct device *dev,
 				goto err;
 
 			reg_type = g2d_get_reg_type(reg_offset);
-			if (reg_type == REG_TYPE_NONE)
-				goto err;
 
 			buf_desc = &buf_info->descs[reg_type];
 			value = cmdlist->data[index + 1];
@@ -1003,8 +999,6 @@  static int g2d_check_reg_offset(struct device *dev,
 				goto err;
 
 			reg_type = g2d_get_reg_type(reg_offset);
-			if (reg_type == REG_TYPE_NONE)
-				goto err;
 
 			buf_desc = &buf_info->descs[reg_type];
 			value = cmdlist->data[index + 1];
@@ -1018,8 +1012,6 @@  static int g2d_check_reg_offset(struct device *dev,
 				goto err;
 
 			reg_type = g2d_get_reg_type(reg_offset);
-			if (reg_type == REG_TYPE_NONE)
-				goto err;
 
 			buf_desc = &buf_info->descs[reg_type];
 			value = cmdlist->data[index + 1];