[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20211210024721.425145-1-chi.minghao@zte.com.cn>
Date: Fri, 10 Dec 2021 02:47:21 +0000
From: cgel.zte@...il.com
To: dwlsalmeida@...il.com
Cc: mchehab@...nel.org, linux-media@...r.kernel.org,
linux-kernel@...r.kernel.org, Minghao Chi <chi.minghao@....com.cn>,
Zeal Robot <zealci@....com.cm>
Subject: [PATCH] media:vidtv: remove unneeded variable make code cleaner
From: Minghao Chi <chi.minghao@....com.cn>
return value form directly instead of
taking this in another redundant variable.
Reported-by: Zeal Robot <zealci@....com.cm>
Signed-off-by: Minghao Chi <chi.minghao@....com.cn>
---
drivers/media/test-drivers/vidtv/vidtv_psi.c | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/drivers/media/test-drivers/vidtv/vidtv_psi.c b/drivers/media/test-drivers/vidtv/vidtv_psi.c
index c11ac8dca73d..a5875380ef40 100644
--- a/drivers/media/test-drivers/vidtv/vidtv_psi.c
+++ b/drivers/media/test-drivers/vidtv/vidtv_psi.c
@@ -94,34 +94,28 @@ static void vidtv_psi_update_version_num(struct vidtv_psi_table_header *h)
static u16 vidtv_psi_get_sec_len(struct vidtv_psi_table_header *h)
{
u16 mask;
- u16 ret;
mask = GENMASK(11, 0);
- ret = be16_to_cpu(h->bitfield) & mask;
- return ret;
+ return be16_to_cpu(h->bitfield) & mask;
}
u16 vidtv_psi_get_pat_program_pid(struct vidtv_psi_table_pat_program *p)
{
u16 mask;
- u16 ret;
mask = GENMASK(12, 0);
- ret = be16_to_cpu(p->bitfield) & mask;
- return ret;
+ return be16_to_cpu(p->bitfield) & mask;
}
u16 vidtv_psi_pmt_stream_get_elem_pid(struct vidtv_psi_table_pmt_stream *s)
{
u16 mask;
- u16 ret;
mask = GENMASK(12, 0);
- ret = be16_to_cpu(s->bitfield) & mask;
- return ret;
+ return be16_to_cpu(s->bitfield) & mask;
}
static void vidtv_psi_set_desc_loop_len(__be16 *bitfield, u16 new_len,
--
2.25.1
Powered by blists - more mailing lists