From: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
To: "Heiko Stübner" <heiko@sntech.de>,
"Sandy Huang" <hjc@rock-chips.com>,
"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
"Maxime Ripard" <mripard@kernel.org>,
"Thomas Zimmermann" <tzimmermann@suse.de>,
"David Airlie" <airlied@gmail.com>,
"Daniel Vetter" <daniel@ffwll.ch>,
"Andy Yan" <andy.yan@rock-chips.com>
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: Re: [PATCH] drm/rockchip: vop2: Drop unused if_dclk_rate variable
Date: Fri, 5 Jan 2024 19:49:14 +0200 [thread overview]
Message-ID: <30114fa6-d83d-4563-9f3b-2975ddfd2752@collabora.com> (raw)
In-Reply-To: <13141620.VsHLxoZxqI@diego>
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 <cristian.ciocaltea@collabora.com>
[...]
>>> 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
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2024-01-05 17:49 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-04 14:39 [PATCH] drm/rockchip: vop2: Drop superfluous include Cristian Ciocaltea
2024-01-04 14:39 ` [PATCH] drm/rockchip: vop2: Drop unused if_dclk_rate variable Cristian Ciocaltea
2024-01-04 15:58 ` Heiko Stübner
2024-01-04 19:12 ` Cristian Ciocaltea
2024-01-05 9:13 ` Andy Yan
2024-01-05 18:05 ` Cristian Ciocaltea
2024-01-05 9:04 ` Andy Yan
2024-01-05 9:57 ` Heiko Stübner
2024-01-05 17:49 ` Cristian Ciocaltea [this message]
2024-01-04 16:28 ` [PATCH] drm/rockchip: vop2: Drop superfluous include Heiko Stübner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=30114fa6-d83d-4563-9f3b-2975ddfd2752@collabora.com \
--to=cristian.ciocaltea@collabora.com \
--cc=airlied@gmail.com \
--cc=andy.yan@rock-chips.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=heiko@sntech.de \
--cc=hjc@rock-chips.com \
--cc=kernel@collabora.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=tzimmermann@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox