From patchwork Fri Jan 5 17:40:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cristian Ciocaltea X-Patchwork-Id: 13512416 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 E73A5C3DA6E for ; Fri, 5 Jan 2024 17:40:26 +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=ack3KPtn6b+enjP63eBaKE7H1E2QtXPq9ie9UEObZTc=; b=KslEwrLjZYrDwA BnxRks3Z0QAf+E/2+1b/UihAFjoDbn2ZDLPbRFrUp6mlfDVBuq4GU+MMbRxs3bjpheL+M9NQDjF/R 7nQ1JEmQi0K0F5+H2Dw8SpaDRz37jrVbsKub+ZX05o/QDZTSO8yALr4D0zPGiQJ6Hzu6HliUYcP3P DRf+iaIv0BgeER4E8tzqXJZp8nGqn11ynCD+5M2chV/bPIisoHGUpeEvK2oy9EDkNsNrBxrQKa+45 3S6EvqIFqTtjNJ9l38/6hJv981UZf6exkl/b9A2IDclGrvYw+WMPYwI0KlkS4DUgMBPwVN74mwyrh l7dhner2svgzCCDOZaMQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rLoBA-00HRey-1a; Fri, 05 Jan 2024 17:40:20 +0000 Received: from madrid.collaboradmins.com ([2a00:1098:ed:100::25]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rLoB4-00HRbd-2E; Fri, 05 Jan 2024 17:40:17 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1704476409; bh=hWk1W4Y/uqGBsgP+2O2pUAprqjBWjIZHflJNW21OcLE=; h=From:To:Cc:Subject:Date:From; b=KsUqs6qpuGBnBzSYHOMDounBY2qPlZe2mMPtFXri5Qaj74t1aVz/xAk1OxVnfr/ox 2eRiHt/5maTLd+yk2TaNG/DmoT2F0JJODIcP0q7y7aryeHseCLkIZ1lib7igGoD/ij ypnshdEqI9ATVP75qRqfJlhuN9ebn9ZDq14wUVTZgdSfvt5yn6SmxQy8l2dIuPG/Nn wyke6lv7it/qELjg6nOnZ/L4cSiyKNfmLIhh+9B8n6FBrFetMRsQvZ0vFIO7RTc1oX Ct/jT2jVoPS1ko3JdY4Z4io6XwulTg9DMn0fcZK9c+ccDXJlYRTC0Ia6qVKts4PkRi 2P2/z5SBYIyjQ== Received: from localhost (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: cristicc) by madrid.collaboradmins.com (Postfix) with ESMTPSA id 89A3D378003D; Fri, 5 Jan 2024 17:40:09 +0000 (UTC) From: Cristian Ciocaltea To: Sandy Huang , =?utf-8?q?Heiko_St=C3=BCbner?= , Andy Yan , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter Cc: dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, kernel@collabora.com Subject: [PATCH v2] drm/rockchip: vop2: Drop unused if_dclk_rate variable Date: Fri, 5 Jan 2024 19:40:06 +0200 Message-ID: <20240105174007.98054-1-cristian.ciocaltea@collabora.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240105_094014_921580_66E5C92C X-CRM114-Status: GOOD ( 12.74 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org Commit 5a028e8f062f ("drm/rockchip: vop2: Add support for rk3588") introduced a variable which ended up being unused: rockchip_drm_vop2.c:1688:23: warning: variable ‘if_dclk_rate’ set but not used [-Wunused-but-set-variable] This has been initially used as part of a formula to compute the clock dividers, but eventually it has been replaced by static values. Drop the variable declaration and move its assignment to the comment block, to serve as documentation of how the constants have been generated. Signed-off-by: Cristian Ciocaltea --- Changes in v2: - Move variable assignment to comment block, per Heiko's review - Update commit message drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c index 89afeadd0bad..b7b44b69cc8c 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c @@ -1684,7 +1684,6 @@ static unsigned long rk3588_calc_cru_cfg(struct vop2_video_port *vp, int id, unsigned long dclk_core_rate = v_pixclk >> 2; unsigned long dclk_rate = v_pixclk; unsigned long dclk_out_rate; - unsigned long if_dclk_rate; unsigned long if_pixclk_rate; int K = 1; @@ -1699,8 +1698,8 @@ static unsigned long rk3588_calc_cru_cfg(struct vop2_video_port *vp, int id, } if_pixclk_rate = (dclk_core_rate << 1) / K; - if_dclk_rate = dclk_core_rate / K; /* + * if_dclk_rate = dclk_core_rate / K; * *if_pixclk_div = dclk_rate / if_pixclk_rate; * *if_dclk_div = dclk_rate / if_dclk_rate; */