Received: by 2002:a05:7412:98c1:b0:fa:551:50a7 with SMTP id kc1csp284908rdb; Fri, 5 Jan 2024 09:40:28 -0800 (PST) X-Google-Smtp-Source: AGHT+IH9fZWmM9+poEbJerIY9aAYgEy4huuNSVTVu6784BZlugYVgykstFj8VsP1hRsIpUZJcTD6 X-Received: by 2002:a17:906:26d7:b0:a29:b180:ddf2 with SMTP id u23-20020a17090626d700b00a29b180ddf2mr209557ejc.48.1704476428675; Fri, 05 Jan 2024 09:40:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704476428; cv=none; d=google.com; s=arc-20160816; b=IXmTjupXo1SLL59gS7ZHBAnJOstbyqZAqcd1FMVn9roxOPrZ94tRCEwQ5vycM7LE+Y YqCUcSsHS7O4GfURZp/d1VCLwoS43Licsai41u5FF2l5Cm012C/zKgsRvKDlFhdZ+q+W +WfnZ8VZWxrkvZeoiSuIzuaAN9D6XGg9QZb7e456HNCBVc+7Rw2LIAbJbQE+v4Fc07ve pCJ3np/5P9qCYOnTZLsAWOJ6pVtCNV0cCZr5q/nDIwaN6BlOejCYTfAQ5mvmda9ya5Aq jltGPhwzDGi2RxxWOpaetGXmvhHaAsB/4NLjvRjN0t6+ikNAZVemKPbJXrF+SVTmX+rk AesA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=xvC6kT+qSSpmxdESuIpaVXu2HzNpR1OQ3a/orHY6/ys=; fh=VHhIG2KUdtq/t9XgI3hDRIe5Cm/wdwReNzkkuxY96z8=; b=Qv2B3mVyYg/PX+g7I8WxZd0fiGsqHMjTmuMs2VRq+C3rDZdF4ILkGro88elU+EW2N3 +DAKBhP0OtwnTdeMYYqH3zCQuvmltBBp2dzTfzbVW66qbxyyWb+w2zRII9CMDcPg+HTX 2p0xBewH9KomhFHTmHGyUJQfqqkvNTxzTfMqOsbJ+AdQwEZXcDAvrLyuVZFKuZv4QpHP zuaT3Q7vt+ogsGn+MvLt+iafkgqxTiZVxzHAkNZRO+VXJ5usl3KiM3lYIXb1utXMqTpR 3YpzeM1dFMpnnfPAuT5DiyF3gOrOFVLvijiq1GeYk42igA5czKYTDSey4W5VrUmCGTh2 U0sw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=KsUqs6qp; spf=pass (google.com: domain of linux-kernel+bounces-18129-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-18129-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id lr18-20020a170906fb9200b00a28eddd9fb5si715236ejb.981.2024.01.05.09.40.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jan 2024 09:40:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-18129-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=KsUqs6qp; spf=pass (google.com: domain of linux-kernel+bounces-18129-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-18129-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 6ECAB1F2417C for ; Fri, 5 Jan 2024 17:40:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CDC8234545; Fri, 5 Jan 2024 17:40:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="KsUqs6qp" X-Original-To: linux-kernel@vger.kernel.org Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E8958328DB for ; Fri, 5 Jan 2024 17:40:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com 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=20St=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 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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; */ -- 2.43.0