Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2602457pxb; Tue, 19 Jan 2021 01:03:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJxAYdpyVYRlEDiK827LhuxDUIIThZEnNxhZzVpoZqNpNFdu4U/5O+qJJ9dy+6mwXHhQliE8 X-Received: by 2002:a05:6402:17a2:: with SMTP id j2mr2538531edy.15.1611047026059; Tue, 19 Jan 2021 01:03:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611047026; cv=none; d=google.com; s=arc-20160816; b=qq6bGAscLhR51I06q9l4/8opvcxgyw7kzKHQUkY10ca27qOz9RvTZtmzyU7eO/oAdu bUMr3W1Z2AxOAIlM/mNVu+HefCqCcKjvWqNu9Tm5QKdDfpODfGVCGA4ERtYftn4w0ZiQ 33Mj0wuTueIIp1eGey9B2LM9Ltk/RM3KmZdmy9Sy9080O/kyq8tpJ4Zvf+xpkFAND/qJ 6zPxru3dHzGUsqcga9HZsOrJD/GLRfvRVahzrkLlmPoEIWfD8DuqoKpH2INyURuWIxrG bUdd4KSjcTio943O5h5JIoeZiGqeY+bITATHf5WOiQqJYxy/YTih4uc9zG96A+4xo89M YOfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=3BeiBtcm9SCY0g91u2WvZrEK8opo1/Kd2ZEOb1FMWyU=; b=b0mIOz7riKtq8wwhv1VIPc9uyd665GZkueQi4g0702DOeGQG/KAjrDXqtcBF+lONOr MRHJxQ85WmahkVqeK0Yuw37NWRuQOVFDFil2ZDQ5wxlLMPnaGjEe6ihqOH7FO0Y6CR4P rtJa0DYJJB8fK/jPNb/pjZsRE/RZTJgWbS/7nIzU/M5Zy3/mkMMb8K4f6C9kfpBrnkRs +HcR0ZsmlXzutBxaWyzSSqnZfZ5hs7TsCkjX5WKleTHGDIbVYWk8o4nuqfCOdjO/IHuO zN8BJ7B79nx1+E804f50ayVPRWrtOQOOv577ZMPkXyY5E2csfElOyeMWw3+Xl5VyeRAv QCcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=DvwdpNez; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f10si8786711edc.491.2021.01.19.01.03.22; Tue, 19 Jan 2021 01:03:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=DvwdpNez; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731870AbhASI7G (ORCPT + 99 others); Tue, 19 Jan 2021 03:59:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37886 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727010AbhASI5z (ORCPT ); Tue, 19 Jan 2021 03:57:55 -0500 Received: from mail-io1-xd33.google.com (mail-io1-xd33.google.com [IPv6:2607:f8b0:4864:20::d33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8AE2CC061574 for ; Tue, 19 Jan 2021 00:57:13 -0800 (PST) Received: by mail-io1-xd33.google.com with SMTP id p72so13327272iod.12 for ; Tue, 19 Jan 2021 00:57:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=3BeiBtcm9SCY0g91u2WvZrEK8opo1/Kd2ZEOb1FMWyU=; b=DvwdpNezTQuRjskcmsqaM5J9cwAIeBpZNuG2isQwJyKqFxUDVF7ozHTubOBI1YUyEO Fjm3bHgbOjCBhtOyYF8g0SKCUrHrSov0dO1fBSkm6nBy2kUWbyO+vTR+tkyyRMKctN+3 UkB2uNFIBTomMwVxT45RL1fIjT0vJKop142Xw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=3BeiBtcm9SCY0g91u2WvZrEK8opo1/Kd2ZEOb1FMWyU=; b=cnIiV3BE4Diu62aH8byNNCCrNeQ21r1u7UDimiE1mv+LTlTwZXlCEoFBQUoGRZX5Qf M3d3v+y2m0VU8ajxVea+uzYN3r4JE12WoRF/DKjb4JWrCiTqKa3RvZqeH1FOOc0GjbFG DPTHpHO80z6WtgZbq2yYQtyx8LpkNul8ovkhJZTM5sY6kWs8msfA4L1VCcixvpPPS0eU mBgUUi5lKb43/SLiUxT20HV5bPgJmruUenVain2ktWYVI/RFUZVDcN0x+/dijR+4fqh1 4OuyPZq2OoH+AZIrU/lzm8JjdtfwNq3exD9QtBmgzi4s16evRFwzbqbozLiM/9KeMlwu eibA== X-Gm-Message-State: AOAM531e5l4wI9a6lAIHEnE2UnxXdI8yvTzvRjFU5KZsAfSCCBWQaZXt xNLKMVza2mg2oVs5sBZpAkM532FHBNmZsA== X-Received: by 2002:a02:a584:: with SMTP id b4mr2013425jam.135.1611046632769; Tue, 19 Jan 2021 00:57:12 -0800 (PST) Received: from mail-io1-f44.google.com (mail-io1-f44.google.com. [209.85.166.44]) by smtp.gmail.com with ESMTPSA id f80sm6687126ilg.8.2021.01.19.00.57.12 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 19 Jan 2021 00:57:12 -0800 (PST) Received: by mail-io1-f44.google.com with SMTP id p72so13327207iod.12 for ; Tue, 19 Jan 2021 00:57:12 -0800 (PST) X-Received: by 2002:a02:a58d:: with SMTP id b13mr2642407jam.115.1611046631587; Tue, 19 Jan 2021 00:57:11 -0800 (PST) MIME-Version: 1.0 References: <20210114130316.803231-1-ribalda@chromium.org> In-Reply-To: From: Ricardo Ribalda Date: Tue, 19 Jan 2021 09:57:00 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] media: hantro: Fix reset_raw_fmt initialization To: "Gustavo A. R. Silva" Cc: Ezequiel Garcia , Philipp Zabel , Linux Media Mailing List , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Gustavo On Mon, Jan 18, 2021 at 11:26 PM Gustavo A. R. Silva 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 > > 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