From: "Christian König" <ckoenig.leichtzumerken@gmail.com>
To: Asher Song <Asher.Song@amd.com>,
Guchun.Chen@amd.com, flora.cui@amd.com, yuliang.shi@amd.com,
jun.ma2@amd.com, amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/amdgpu: fix a compiling error in old kernels
Date: Tue, 27 Sep 2022 08:15:42 +0200 [thread overview]
Message-ID: <88ca9dda-b88b-bd50-7270-04403a91971d@gmail.com> (raw)
In-Reply-To: <20220927033743.107390-1-Asher.Song@amd.com>
Am 27.09.22 um 05:37 schrieb Asher Song:
> This patch is used to fix following compiling error that occurs in some
> old kernels.
>
> error: ‘for’ loop initial declarations are only allowed in C99 mode
> for (int i = 0; i < dc->res_pool->res_cap->num_dsc; i++) {
>
> Signed-off-by: Asher Song <Asher.Song@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
> ---
> drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c b/drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c
> index 772ad200c5da..c91fcde7a16c 100644
> --- a/drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c
> +++ b/drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c
> @@ -1405,8 +1405,9 @@ void dcn32_update_dsc_pg(struct dc *dc,
> bool safe_to_disable)
> {
> struct dce_hwseq *hws = dc->hwseq;
> + int i;
>
> - for (int i = 0; i < dc->res_pool->res_cap->num_dsc; i++) {
> + for (i = 0; i < dc->res_pool->res_cap->num_dsc; i++) {
> struct display_stream_compressor *dsc = dc->res_pool->dscs[i];
> bool is_dsc_ungated = hws->funcs.dsc_pg_status(hws, dsc->inst);
>
prev parent reply other threads:[~2022-09-27 6:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-27 3:37 [PATCH] drm/amdgpu: fix a compiling error in old kernels Asher Song
2022-09-27 5:38 ` Chen, Guchun
2022-09-27 6:15 ` Christian König [this message]
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=88ca9dda-b88b-bd50-7270-04403a91971d@gmail.com \
--to=ckoenig.leichtzumerken@gmail.com \
--cc=Asher.Song@amd.com \
--cc=Guchun.Chen@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=flora.cui@amd.com \
--cc=jun.ma2@amd.com \
--cc=yuliang.shi@amd.com \
/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