diff mbox

[v2,5/9] exynos/fimg2d: remove default case from g2d_get_blend_op()

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

Commit Message

Tobias Jakobi Sept. 8, 2015, 3:22 p.m. UTC
We now validate the blending mode via g2d_validate_mode()
prior to feeding it to g2d_get_blend_op().

Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
---
 exynos/exynos_fimg2d.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
diff mbox

Patch

diff --git a/exynos/exynos_fimg2d.c b/exynos/exynos_fimg2d.c
index 9d9359a..d7cbb24 100644
--- a/exynos/exynos_fimg2d.c
+++ b/exynos/exynos_fimg2d.c
@@ -64,6 +64,11 @@  static unsigned int g2d_get_blend_op(enum e_g2d_op op)
 
 	val.val = 0;
 
+	/*
+	 * The switch statement is missing the default branch since
+	 * we assume that the caller checks the blending operation
+	 * via g2d_validate_blending_op() first.
+	 */
 	switch (op) {
 	case G2D_OP_CLEAR:
 	case G2D_OP_DISJOINT_CLEAR:
@@ -91,11 +96,6 @@  static unsigned int g2d_get_blend_op(enum e_g2d_op op)
 		SET_BF(val, G2D_COEFF_MODE_SRC_ALPHA, 0, 0, 0,
 				G2D_COEFF_MODE_SRC_ALPHA, 1, 0, 0);
 		break;
-	default:
-		fprintf(stderr, "Not support operation(%d).\n", op);
-		SET_BF(val, G2D_COEFF_MODE_ONE, 0, 0, 0, G2D_COEFF_MODE_ZERO,
-				0, 0, 0);
-		break;
 	}
 
 	return val.val;