lkml.org 
[lkml]   [2021]   [Dec]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH platform-next] media/platform: remove redundant bpp variable
Date
From: Minghao Chi <chi.minghao@zte.com.cn>

Return value directly instead of taking this in another
redundant variable.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
---
drivers/media/platform/am437x/am437x-vpfe.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/media/platform/am437x/am437x-vpfe.c b/drivers/media/platform/am437x/am437x-vpfe.c
index 2dfae9bc0bba..dc3ef0708f14 100644
--- a/drivers/media/platform/am437x/am437x-vpfe.c
+++ b/drivers/media/platform/am437x/am437x-vpfe.c
@@ -143,13 +143,12 @@ static unsigned int __get_bytesperpixel(struct vpfe_device *vpfe,
{
struct vpfe_subdev_info *sdinfo = vpfe->current_subdev;
unsigned int bus_width = sdinfo->vpfe_param.bus_width;
- u32 bpp, bus_width_bytes, clocksperpixel;
+ u32 bus_width_bytes, clocksperpixel;

bus_width_bytes = ALIGN(bus_width, 8) >> 3;
clocksperpixel = DIV_ROUND_UP(fmt->bitsperpixel, bus_width);
- bpp = clocksperpixel * bus_width_bytes;

- return bpp;
+ return clocksperpixel * bus_width_bytes;
}

/* Print Four-character-code (FOURCC) */
--
2.25.1
\
 
 \ /
  Last update: 2021-12-15 07:05    [W:0.093 / U:0.324 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site