* [PATCH] drm/sprd: remove pointless assignment
@ 2022-09-12 15:09 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2022-09-12 15:09 UTC (permalink / raw)
To: David Airlie
Cc: kernel-janitors, Kevin Tang, Chunyan Zhang,
Javier Martinez Canillas, dri-devel, Thomas Zimmermann,
Baolin Wang, Orson Zhai
There is no need for the "video_size_step" variable.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
drivers/gpu/drm/sprd/sprd_dsi.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/sprd/sprd_dsi.c b/drivers/gpu/drm/sprd/sprd_dsi.c
index 12b67a5d5923..c8af4b5516a2 100644
--- a/drivers/gpu/drm/sprd/sprd_dsi.c
+++ b/drivers/gpu/drm/sprd/sprd_dsi.c
@@ -325,8 +325,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:
@@ -335,14 +333,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;
--
2.35.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2022-09-12 15:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-12 15:09 [PATCH] drm/sprd: remove pointless assignment Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).