From patchwork Mon Jul 11 12:42:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 589617 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0B5D1C43334 for ; Mon, 11 Jul 2022 12:45:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232084AbiGKMpb (ORCPT ); Mon, 11 Jul 2022 08:45:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44844 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232091AbiGKMow (ORCPT ); Mon, 11 Jul 2022 08:44:52 -0400 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CE95E1BEA6 for ; Mon, 11 Jul 2022 05:44:37 -0700 (PDT) Received: from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id F1FE42719; Mon, 11 Jul 2022 14:43:39 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1657543420; bh=UPJ5XRznE8cv1wBcVUOUFQDm95EI3a0AXC/nNFTTE8U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PEK0yW8lSsF1HhztAw/YIBASa+OvMjVjn+I9BI9oc6TsAYyX6CRHJGBxXPp1bUVWj Y5YvePPAY8mFD7/FLSTMYNAp0b0w0Xu9PdC247SoIxpvtrcHQFjUp35Of/iwfRojmA 7FpksrkIS9e8i07uZWZ5KLzwwxU0BkI/z4WPSNoc= From: Laurent Pinchart To: linux-media@vger.kernel.org Cc: linux-rockchip@lists.infradead.org, Dafna Hirschfeld , Heiko Stuebner , Helen Koike , Paul Elder Subject: [PATCH v3 34/46] media: rkisp1: isp: Initialize some variables at declaration time Date: Mon, 11 Jul 2022 15:42:36 +0300 Message-Id: <20220711124248.2683-35-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220711124248.2683-1-laurent.pinchart@ideasonboard.com> References: <20220711124248.2683-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Initialize the src_fmt and sink_fmt variable when declaring them in rkisp1_config_isp(). Signed-off-by: Laurent Pinchart Reviewed-by: Dafna Hirschfeld Reviewed-by: Paul Elder --- Changes since v1: - Fix typo in commit message --- drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c b/drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c index 938541ce52ce..53f0516594ef 100644 --- a/drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c +++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c @@ -142,12 +142,11 @@ static int rkisp1_config_isp(struct rkisp1_isp *isp, { struct rkisp1_device *rkisp1 = isp->rkisp1; u32 isp_ctrl = 0, irq_mask = 0, acq_mult = 0, acq_prop = 0; - const struct rkisp1_mbus_info *src_fmt, *sink_fmt; + const struct rkisp1_mbus_info *sink_fmt = isp->sink_fmt; + const struct rkisp1_mbus_info *src_fmt = isp->src_fmt; struct v4l2_mbus_framefmt *sink_frm; struct v4l2_rect *sink_crop; - sink_fmt = isp->sink_fmt; - src_fmt = isp->src_fmt; sink_frm = rkisp1_isp_get_pad_fmt(isp, NULL, RKISP1_ISP_PAD_SINK_VIDEO, V4L2_SUBDEV_FORMAT_ACTIVE);