linux-staging.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH] media: meson: vdec: remove redundant initialization of variable reg_cur
@ 2021-05-13 22:03 Colin King
  2021-05-16 17:01 ` Martin Blumenstingl
  0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2021-05-13 22:03 UTC (permalink / raw)
  To: Neil Armstrong, Mauro Carvalho Chehab, Greg Kroah-Hartman,
	Kevin Hilman, Jerome Brunet, Martin Blumenstingl, linux-media,
	linux-amlogic, linux-staging, linux-arm-kernel
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

The variable reg_cur is being initialized with a value that is never
read, it is being updated later on. The assignment is redundant and
can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/staging/media/meson/vdec/vdec_helpers.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/media/meson/vdec/vdec_helpers.c b/drivers/staging/media/meson/vdec/vdec_helpers.c
index 7f07a9175815..b9125c295d1d 100644
--- a/drivers/staging/media/meson/vdec/vdec_helpers.c
+++ b/drivers/staging/media/meson/vdec/vdec_helpers.c
@@ -183,7 +183,7 @@ int amvdec_set_canvases(struct amvdec_session *sess,
 	u32 pixfmt = sess->pixfmt_cap;
 	u32 width = ALIGN(sess->width, 32);
 	u32 height = ALIGN(sess->height, 32);
-	u32 reg_cur = reg_base[0];
+	u32 reg_cur;
 	u32 reg_num_cur = 0;
 	u32 reg_base_cur = 0;
 	int i = 0;
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] media: meson: vdec: remove redundant initialization of variable reg_cur
  2021-05-13 22:03 [PATCH] media: meson: vdec: remove redundant initialization of variable reg_cur Colin King
@ 2021-05-16 17:01 ` Martin Blumenstingl
  0 siblings, 0 replies; 2+ messages in thread
From: Martin Blumenstingl @ 2021-05-16 17:01 UTC (permalink / raw)
  To: Colin King
  Cc: Neil Armstrong, Mauro Carvalho Chehab, Greg Kroah-Hartman,
	Kevin Hilman, Jerome Brunet, linux-media, linux-amlogic,
	linux-staging, linux-arm-kernel, kernel-janitors, linux-kernel

On Fri, May 14, 2021 at 12:03 AM Colin King <colin.king@canonical.com> wrote:
>
> From: Colin Ian King <colin.king@canonical.com>
>
> The variable reg_cur is being initialized with a value that is never
> read, it is being updated later on. The assignment is redundant and
> can be removed.
>
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-05-16 17:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-13 22:03 [PATCH] media: meson: vdec: remove redundant initialization of variable reg_cur Colin King
2021-05-16 17:01 ` Martin Blumenstingl

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).