* [PATCH] media: hantro: Fix reset_raw_fmt initialization
@ 2021-01-14 13:03 Ricardo Ribalda
[not found] ` <d472a1b1-71d6-0c9c-0ead-d2287bd788ae@embeddedor.com>
0 siblings, 1 reply; 2+ messages in thread
From: Ricardo Ribalda @ 2021-01-14 13:03 UTC (permalink / raw)
To: Ezequiel Garcia, Philipp Zabel, linux-media, linux-kernel; +Cc: Ricardo Ribalda
raw_fmt->height in never initialized. But width in initialized twice.
Fixes: 88d06362d1d05 ("media: hantro: Refactor for V4L2 API spec compliancy")
Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
---
drivers/staging/media/hantro/hantro_v4l2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/media/hantro/hantro_v4l2.c b/drivers/staging/media/hantro/hantro_v4l2.c
index b668a82d40ad..f5fbdbc4ffdb 100644
--- a/drivers/staging/media/hantro/hantro_v4l2.c
+++ b/drivers/staging/media/hantro/hantro_v4l2.c
@@ -367,7 +367,7 @@ hantro_reset_raw_fmt(struct hantro_ctx *ctx)
hantro_reset_fmt(raw_fmt, raw_vpu_fmt);
raw_fmt->width = encoded_fmt->width;
- raw_fmt->width = encoded_fmt->width;
+ raw_fmt->height = encoded_fmt->height;
if (ctx->is_encoder)
hantro_set_fmt_out(ctx, raw_fmt);
else
--
2.30.0.284.gd98b1dd5eaa7-goog
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] media: hantro: Fix reset_raw_fmt initialization
[not found] ` <d472a1b1-71d6-0c9c-0ead-d2287bd788ae@embeddedor.com>
@ 2021-01-19 8:57 ` Ricardo Ribalda
0 siblings, 0 replies; 2+ messages in thread
From: Ricardo Ribalda @ 2021-01-19 8:57 UTC (permalink / raw)
To: Gustavo A. R. Silva
Cc: Ezequiel Garcia, Philipp Zabel, Linux Media Mailing List,
Linux Kernel Mailing List
Hi Gustavo
On Mon, Jan 18, 2021 at 11:26 PM Gustavo A. R. Silva
<gustavo@embeddedor.com> wrote:
>
> Hey Ricardo,
>
> On 1/14/21 07:03, Ricardo Ribalda wrote:
> > raw_fmt->height in never initialized. But width in initialized twice.
>
> Nice catch!
Thanks :)
>
> How did you find this?
Pure luck. I was backporting a patch and the duplicated line hit my
eye. Maybe we could just search for duplicated lines in the codebase.
I guess it is not the only c&p issue we have
>
> > Fixes: 88d06362d1d05 ("media: hantro: Refactor for V4L2 API spec compliancy")
> > Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
>
> This should be tagged for -stable:
>
> Cc: stable@vger.kernel.org
>
> --
> Gustavo
>
> > ---
> > drivers/staging/media/hantro/hantro_v4l2.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/staging/media/hantro/hantro_v4l2.c b/drivers/staging/media/hantro/hantro_v4l2.c
> > index b668a82d40ad..f5fbdbc4ffdb 100644
> > --- a/drivers/staging/media/hantro/hantro_v4l2.c
> > +++ b/drivers/staging/media/hantro/hantro_v4l2.c
> > @@ -367,7 +367,7 @@ hantro_reset_raw_fmt(struct hantro_ctx *ctx)
> >
> > hantro_reset_fmt(raw_fmt, raw_vpu_fmt);
> > raw_fmt->width = encoded_fmt->width;
> > - raw_fmt->width = encoded_fmt->width;
> > + raw_fmt->height = encoded_fmt->height;
> > if (ctx->is_encoder)
> > hantro_set_fmt_out(ctx, raw_fmt);
> > else
> >
--
Ricardo Ribalda
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-01-19 9:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-14 13:03 [PATCH] media: hantro: Fix reset_raw_fmt initialization Ricardo Ribalda
[not found] ` <d472a1b1-71d6-0c9c-0ead-d2287bd788ae@embeddedor.com>
2021-01-19 8:57 ` Ricardo Ribalda
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).