diff mbox series

drm/sprd: Remove unnecessary variable in calc_video_size_step()

Message ID e3f65945-4a93-4d4c-afd7-8d68586ea591@moroto.mountain (mailing list archive)
State New, archived
Headers show
Series drm/sprd: Remove unnecessary variable in calc_video_size_step() | expand

Commit Message

Dan Carpenter June 19, 2023, 9:44 a.m. UTC
The "video_size_step" variable is never used so it can be removed.

Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
 drivers/gpu/drm/sprd/sprd_dsi.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/drivers/gpu/drm/sprd/sprd_dsi.c b/drivers/gpu/drm/sprd/sprd_dsi.c
index ab0e5cce7adb..adeff6b2fb4b 100644
--- a/drivers/gpu/drm/sprd/sprd_dsi.c
+++ b/drivers/gpu/drm/sprd/sprd_dsi.c
@@ -324,8 +324,6 @@  static u16 calc_bytes_per_pixel_x100(int coding)
 
 static u8 calc_video_size_step(int coding)
 {
-	u8 video_size_step;
-
 	switch (coding) {
 	case COLOR_CODE_16BIT_CONFIG1:
 	case COLOR_CODE_16BIT_CONFIG2:
@@ -334,14 +332,14 @@  static u8 calc_video_size_step(int coding)
 	case COLOR_CODE_18BIT_CONFIG2:
 	case COLOR_CODE_24BIT:
 	case COLOR_CODE_COMPRESSTION:
-		return video_size_step = 1;
+		return 1;
 	case COLOR_CODE_20BIT_YCC422_LOOSELY:
 	case COLOR_CODE_24BIT_YCC422:
 	case COLOR_CODE_16BIT_YCC422:
 	case COLOR_CODE_30BIT:
 	case COLOR_CODE_36BIT:
 	case COLOR_CODE_12BIT_YCC420:
-		return video_size_step = 2;
+		return 2;
 	default:
 		DRM_ERROR("invalid color coding");
 		return 0;