Received: by 2002:a05:7412:98c1:b0:fa:551:50a7 with SMTP id kc1csp288768rdb; Fri, 5 Jan 2024 09:49:27 -0800 (PST) X-Google-Smtp-Source: AGHT+IG4f3RV7rB63UeALxDqDVA4JnHdL+1elq8TGf+pkUQTOT2/iR8g4B4djzjTUmn7+F+unf0P X-Received: by 2002:a17:902:6549:b0:1d3:e7ce:b549 with SMTP id d9-20020a170902654900b001d3e7ceb549mr1875364pln.40.1704476967562; Fri, 05 Jan 2024 09:49:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704476967; cv=none; d=google.com; s=arc-20160816; b=dzYYdhwQVqOW+GINwn4cHIS07FP7zYa70rRjM4y3x8g5yZLIB9KNF1uYx1/MgJhSKm O1j8V+FmVzdrM+gZCu+LBShtRsAoTNuhRN85FnFJRxWjsw+6uk4PP4uaogNgYCGD/LqP skOB0K5e79YcFBVPovaWEB/beqTNDJ+3aTjWy3ER4uhNetxFqlPE8z+j1HPMDBcl9Z6I 1BqYfJLGPBpFR+Ex3bdn+pVE/oRyl2lW8OJWO8AGyZKnP/lo/hSXCRTRd/tPUewk54nh 9Guvl9eg+oOTM/mJLbydc1eKdk36dh47KHr5pMAdhnf8sx6D7wXA4AJ9TizawOm40/iA 8ZCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=vtWyfhvNBnWrmjm3s+gQUcPUGpT1eRnQdaNSNrTLn+s=; fh=ZejXilD6Qi7M9Za5LMQ9aDDk3ccKqBv103y6hQ1euic=; b=y+yypUutpMZcrW+EakXNNkGPbQx5nDKtv0Bi0RU9JmhWYVfTPz/rlMhtK4o94/wqDR PybVbRIFbt/dv6mMjsTPXQHi+s7oyqsfFNE8WKGVZTv3td7Sd7tgXyK9rw82gO7I17oR 59tBL1tevSQ72/BVu02rrxli2ORg3f0A0ozu43TvyRSVCSkFc0m3VtSlIaCSSYF/+8iO oJo+lpbCjKeq00V5wZqljq8jglxYNO10KrpLAXgNNUUpfBKDCSyA+Kp+76aze7RGY3qY LS2URnE22SsDk3bxzptQVEgWTYar623zPsw6surhjOCxxW0NDnFDbf2JVACYc41+9R73 ATjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=vEBLtejK; spf=pass (google.com: domain of linux-kernel+bounces-18142-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-18142-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id ei12-20020a17090ae54c00b0028b9ece36acsi1147275pjb.168.2024.01.05.09.49.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jan 2024 09:49:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-18142-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=vEBLtejK; spf=pass (google.com: domain of linux-kernel+bounces-18142-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-18142-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 2663428573F for ; Fri, 5 Jan 2024 17:49:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 33DF0328D0; Fri, 5 Jan 2024 17:49:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="vEBLtejK" 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 0AB5B250E5 for ; Fri, 5 Jan 2024 17:49:17 +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=1704476956; bh=oiTjNDE8zdxt2cMZq7xxs8JwiZDB7s9mhohrKDnY/2E=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=vEBLtejKVsVkA/nSjHRUQnhjBOK6LO380L89stD1j4116VhjpGVphkIylt+u24RH5 su3sUhTwunOUMgAvc3PuMdxBgz47Z+Tx2RUIyCf/jBMiOLReJffKvaYL4Dqa0eVrq0 NfPodRzxZeUwMTlfId+M2rY6Sey7PidHirQaAtdXqQiQWYRvWDBI0kZW96OZ6iAr6W XLzf1Krv7tefrzgj56aSnHBBv4dPouS5M+QcVvkBIAgeOyOsbHfTB5ifnj0h429a8n 2VQYwKnzc88v9ZEEhquHMlCzAzDzFUDDWHpGHudTEn9c/L2IS3Ok2g8h8r8FFW0/7m pFZl80/dkBpcQ== Received: from [100.115.223.179] (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: cristicc) by madrid.collaboradmins.com (Postfix) with ESMTPSA id 29C10378003D; Fri, 5 Jan 2024 17:49:15 +0000 (UTC) Message-ID: <30114fa6-d83d-4563-9f3b-2975ddfd2752@collabora.com> Date: Fri, 5 Jan 2024 19:49:14 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] drm/rockchip: vop2: Drop unused if_dclk_rate variable Content-Language: en-US To: =?UTF-8?Q?Heiko_St=C3=BCbner?= , Sandy Huang , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Andy Yan 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 References: <20240104143951.85219-1-cristian.ciocaltea@collabora.com> <5867171.29KlJPOoH8@diego> <13141620.VsHLxoZxqI@diego> From: Cristian Ciocaltea In-Reply-To: <13141620.VsHLxoZxqI@diego> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 1/5/24 11:57, Heiko Stübner wrote: > Hi, > > Am Freitag, 5. Januar 2024, 10:04:55 CET schrieb Andy Yan: >> On 1/4/24 23:58, Heiko Stübner wrote: >>> Am Donnerstag, 4. Januar 2024, 15:39:50 CET schrieb Cristian Ciocaltea: >>>> Commit 5a028e8f062f ("drm/rockchip: vop2: Add support for rk3588") >>>> introduced a variable which ended up being unused. Remove it. >>>> >>>> rockchip_drm_vop2.c:1688:23: warning: variable ‘if_dclk_rate’ set but not used [-Wunused-but-set-variable] >>>> >>>> Signed-off-by: Cristian Ciocaltea [...] >>> with the code continuing with those static constants but the comment >>> showing a forumula, I do hope Andy can provide a bit of insight into >>> what is happening here. >>> >>> I.e. I'd really like to understand if that really is just a remnant or >>> something different is needed. >> >> This is not a remnant, in my V1, I calculate all the div by formula, but Sascha prefer >> more for a constants value[0], so I keep this formula as comments to indicate how these value come from. >> >> [0]https://patchwork.kernel.org/project/linux-rockchip/patch/20231114112855.1771372-1-andyshrk@163.com/ > > thanks for referencing the source of the change. > Leaving the formula in there was the right choice I think > > That still leaves the issue with the "unused" warning. > > @Christan: in the hdmi block itself can you move the > if_dclk_rate = dclk_core_rate / K; > to the comment block please? And possibly reference the use > of the static values in the comment message. > > The if_dclk_rate var declaration at the top of the function can of course > go away. > > That way we still keep documenting how these values came to be: Requested changes submitted via v2: https://lore.kernel.org/lkml/20240105174007.98054-1-cristian.ciocaltea@collabora.com/ Thanks, Cristian