From patchwork Wed May 18 08:32:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin Ian King X-Patchwork-Id: 12853347 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8CD81C433F5 for ; Wed, 18 May 2022 08:33:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=s6rN2WmruohXvDvKlkGi8fIFTLN6jGR58tmt1/Q9gXQ=; b=4ofelDq6JKfS9w Yru64fNB2i8GnSTZx5/TBlnSPnqStCoafBncPIK28v3C+DSsYMg4KKdQsUjmM0Oz7wp1q6x77hYY0 LdDrmt1fjbeuO/W6Ch2/JgcwAyrrcy7FQbwLsnbRRUA8VD7x6JXZat8uojikSbnr7gqJfTSx5ScMP SQhV2iNNHSpDzvKNlhTa5OgN2HfCrCyGdzV4CVFQ7zBGc7Ik9E4PPP+Z59AldZPtUtbXCZKAAth+9 /lzDAg9JPdwh0duAwOosq9l/n693/EikL1Qzfo2DarYZo4SXG3CP6gPYO8KLXx0lNC6zuSHR1DgPM FYs6Hk6+T4stLGOfqIhA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nrF6a-000cJY-9A; Wed, 18 May 2022 08:32:28 +0000 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nrF6W-000cHI-BO for linux-arm-kernel@lists.infradead.org; Wed, 18 May 2022 08:32:25 +0000 Received: by mail-wm1-x329.google.com with SMTP id k126so694704wme.2 for ; Wed, 18 May 2022 01:32:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=+z+PQb5MQz4Hi46TApUGBFaL5pik2KHkz+IdCi2pk9E=; b=nY5N7FCiiLTLIDrAVVBNIomteMVrETYaVXuYS6S6dWlVkrDwFrzMMCy5pZRw1FpyLb lXvOLdTFOPDufB1lDxHXiNeCc4voonWSxAyhbdIogQCX8LWGNHkdJa+GBnORF97VIDHq Pkn65y9YJkCKnNZ469oZZAJtaVT9HFFPSgCkdUtjiPa0zET/KOPV8NUPlWH44wEUt6L2 AkgRMSgAn+PYPsBFIhoKlMTP46fKDPzI5UUlxI1MqNYM8ScXfPUxbpwqdAzHh/EaS59h NDHaUcsiYR8A6HI/7Wfd6Cgzl135bPI7I70l7n0Dz1AfAmCjOW+SrY9XxkTWV5Jl1taG shcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=+z+PQb5MQz4Hi46TApUGBFaL5pik2KHkz+IdCi2pk9E=; b=FSsQOzVdaoR7VuggvwIHCnrPf+x1HpAmdD9E4txy8zWA9Vk3au8OYhtVq7Z/4/eUVT q9mIcxA0V0l4WO66K7SlW0Ha9BZAoGr4yPmPq9g/YECgmaiRJXnDYIvsV2Cz+LsyEzJe 5z46c12TbrKVm2Ll6Rc66onI7BdB2C+lUnTiV+H0K1skjjHBsuVO3cTRGDRHLFbxRRUN SGEsK6rH2VNKdaUzwX4GlVux+skRObZtw10AybbYmhCB16LhxcCuBhCHKMNEU0zgib/1 iaSMdXwLBNR7JyVELcxj4VCFkDvEKNB8IpiRLElDAjEQVoozZ/nhQwDNHjJ1L71WVMvi jE9A== X-Gm-Message-State: AOAM532GrXuURORfZ8nQnTJHTbeP8XkeMpbWApJgIXEXFaKipOiUZnIP rfZIBTvoDVQpavihjpY/ug8= X-Google-Smtp-Source: ABdhPJzXrAx8whtDX8CJHaQ830Cxos71neUjKQZK3vabF5JDnUvkzjkhqIlJ4DYqBPqGl4C/Op+VsQ== X-Received: by 2002:a05:600c:4fd4:b0:394:8e96:6d3b with SMTP id o20-20020a05600c4fd400b003948e966d3bmr24819426wmq.180.1652862740991; Wed, 18 May 2022 01:32:20 -0700 (PDT) Received: from localhost (cpc154979-craw9-2-0-cust193.16-3.cable.virginm.net. [80.193.200.194]) by smtp.gmail.com with ESMTPSA id j35-20020a05600c1c2300b00397220a9354sm611048wms.30.2022.05.18.01.32.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 May 2022 01:32:20 -0700 (PDT) From: Colin Ian King To: Mauro Carvalho Chehab , Krzysztof Kozlowski , Alim Akhtar , linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] media: platform: exynos-gsc: remove redundant initializations of f_chk_len and f_chk_addr Date: Wed, 18 May 2022 09:32:19 +0100 Message-Id: <20220518083219.507716-1-colin.i.king@gmail.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220518_013224_431423_6AB877D6 X-CRM114-Status: GOOD ( 13.16 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The variables f_chk_len and f_chk_addr are being initialized to zero and then being re-assigned in the next statement. The initializations are redundant and can be removed. Also initialize s_chk_addr and s_chk_len at the declaration statement. Signed-off-by: Colin Ian King --- drivers/media/platform/samsung/exynos-gsc/gsc-core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/media/platform/samsung/exynos-gsc/gsc-core.c b/drivers/media/platform/samsung/exynos-gsc/gsc-core.c index e3559b047092..b147c645ae0b 100644 --- a/drivers/media/platform/samsung/exynos-gsc/gsc-core.c +++ b/drivers/media/platform/samsung/exynos-gsc/gsc-core.c @@ -339,8 +339,7 @@ static int get_plane_info(struct gsc_frame *frm, u32 addr, u32 *index, u32 *ret_ void gsc_set_prefbuf(struct gsc_dev *gsc, struct gsc_frame *frm) { - u32 f_chk_addr, f_chk_len, s_chk_addr, s_chk_len; - f_chk_addr = f_chk_len = s_chk_addr = s_chk_len = 0; + u32 f_chk_addr, f_chk_len, s_chk_addr = 0, s_chk_len = 0; f_chk_addr = frm->addr.y; f_chk_len = frm->payload[0];