From: "Christian König" <christian.koenig@amd.com>
To: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>,
alexander.deucher@amd.com
Cc: Xinhui.Pan@amd.com, airlied@linux.ie, daniel@ffwll.ch,
amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm/amd/display: clean up some inconsistent indenting
Date: Thu, 11 Nov 2021 11:08:06 +0100 [thread overview]
Message-ID: <7dc5f830-36af-4d8f-4e45-03d73141db9b@amd.com> (raw)
In-Reply-To: <1636624728-85197-1-git-send-email-jiapeng.chong@linux.alibaba.com>
Am 11.11.21 um 10:58 schrieb Jiapeng Chong:
> Eliminate the follow smatch warning:
>
> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_debugfs.c:2245
> dp_dsc_slice_bpg_offset_read() warn: inconsistent indenting.
>
> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_debugfs.c:2044
> dp_dsc_pic_width_read() warn: inconsistent indenting.
>
> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_debugfs.c:2101
> dp_dsc_pic_height_read() warn: inconsistent indenting.
>
> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_debugfs.c:2173
> dp_dsc_chunk_size_read() warn: inconsistent indenting.
>
> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_debugfs.c:1868
> dp_dsc_bits_per_pixel_read() warn: inconsistent indenting.
>
> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_debugfs.c:1965
> dp_dsc_bits_per_pixel_write() warn: inconsistent indenting.
>
> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_debugfs.c:1787
> dp_dsc_slice_height_write() warn: inconsistent indenting.
>
> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_debugfs.c:1602
> dp_dsc_slice_width_write() warn: inconsistent indenting.
>
> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_debugfs.c:1687
> dp_dsc_slice_height_read() warn: inconsistent indenting.
>
> vers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_debugfs.c:1417
> dp_dsc_clock_en_write() warn: inconsistent indenting.
>
> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_debugfs.c:1502
> dp_dsc_slice_width_read() warn: inconsistent indenting.
>
> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_debugfs.c:1315
> dp_dsc_clock_en_read() warn: inconsistent indenting.
>
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Looks like the same code was copied over and over again, maybe make this
an even wider cleanup and add a helper function to find the pipe_ctx for
a specific dc_link.
Regards,
Christian.
> ---
> .../drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 72 +++++++++++-----------
> 1 file changed, 36 insertions(+), 36 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c
> index 9d43ecb..50ef248 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c
> @@ -1312,9 +1312,9 @@ static ssize_t dp_dsc_clock_en_read(struct file *f, char __user *buf,
>
> for (i = 0; i < MAX_PIPES; i++) {
> pipe_ctx = &aconnector->dc_link->dc->current_state->res_ctx.pipe_ctx[i];
> - if (pipe_ctx && pipe_ctx->stream &&
> - pipe_ctx->stream->link == aconnector->dc_link)
> - break;
> + if (pipe_ctx && pipe_ctx->stream &&
> + pipe_ctx->stream->link == aconnector->dc_link)
> + break;
> }
>
> if (!pipe_ctx)
> @@ -1414,9 +1414,9 @@ static ssize_t dp_dsc_clock_en_write(struct file *f, const char __user *buf,
>
> for (i = 0; i < MAX_PIPES; i++) {
> pipe_ctx = &aconnector->dc_link->dc->current_state->res_ctx.pipe_ctx[i];
> - if (pipe_ctx && pipe_ctx->stream &&
> - pipe_ctx->stream->link == aconnector->dc_link)
> - break;
> + if (pipe_ctx && pipe_ctx->stream &&
> + pipe_ctx->stream->link == aconnector->dc_link)
> + break;
> }
>
> if (!pipe_ctx || !pipe_ctx->stream)
> @@ -1499,9 +1499,9 @@ static ssize_t dp_dsc_slice_width_read(struct file *f, char __user *buf,
>
> for (i = 0; i < MAX_PIPES; i++) {
> pipe_ctx = &aconnector->dc_link->dc->current_state->res_ctx.pipe_ctx[i];
> - if (pipe_ctx && pipe_ctx->stream &&
> - pipe_ctx->stream->link == aconnector->dc_link)
> - break;
> + if (pipe_ctx && pipe_ctx->stream &&
> + pipe_ctx->stream->link == aconnector->dc_link)
> + break;
> }
>
> if (!pipe_ctx)
> @@ -1599,9 +1599,9 @@ static ssize_t dp_dsc_slice_width_write(struct file *f, const char __user *buf,
>
> for (i = 0; i < MAX_PIPES; i++) {
> pipe_ctx = &aconnector->dc_link->dc->current_state->res_ctx.pipe_ctx[i];
> - if (pipe_ctx && pipe_ctx->stream &&
> - pipe_ctx->stream->link == aconnector->dc_link)
> - break;
> + if (pipe_ctx && pipe_ctx->stream &&
> + pipe_ctx->stream->link == aconnector->dc_link)
> + break;
> }
>
> if (!pipe_ctx || !pipe_ctx->stream)
> @@ -1684,9 +1684,9 @@ static ssize_t dp_dsc_slice_height_read(struct file *f, char __user *buf,
>
> for (i = 0; i < MAX_PIPES; i++) {
> pipe_ctx = &aconnector->dc_link->dc->current_state->res_ctx.pipe_ctx[i];
> - if (pipe_ctx && pipe_ctx->stream &&
> - pipe_ctx->stream->link == aconnector->dc_link)
> - break;
> + if (pipe_ctx && pipe_ctx->stream &&
> + pipe_ctx->stream->link == aconnector->dc_link)
> + break;
> }
>
> if (!pipe_ctx)
> @@ -1784,9 +1784,9 @@ static ssize_t dp_dsc_slice_height_write(struct file *f, const char __user *buf,
>
> for (i = 0; i < MAX_PIPES; i++) {
> pipe_ctx = &aconnector->dc_link->dc->current_state->res_ctx.pipe_ctx[i];
> - if (pipe_ctx && pipe_ctx->stream &&
> - pipe_ctx->stream->link == aconnector->dc_link)
> - break;
> + if (pipe_ctx && pipe_ctx->stream &&
> + pipe_ctx->stream->link == aconnector->dc_link)
> + break;
> }
>
> if (!pipe_ctx || !pipe_ctx->stream)
> @@ -1865,9 +1865,9 @@ static ssize_t dp_dsc_bits_per_pixel_read(struct file *f, char __user *buf,
>
> for (i = 0; i < MAX_PIPES; i++) {
> pipe_ctx = &aconnector->dc_link->dc->current_state->res_ctx.pipe_ctx[i];
> - if (pipe_ctx && pipe_ctx->stream &&
> - pipe_ctx->stream->link == aconnector->dc_link)
> - break;
> + if (pipe_ctx && pipe_ctx->stream &&
> + pipe_ctx->stream->link == aconnector->dc_link)
> + break;
> }
>
> if (!pipe_ctx)
> @@ -1962,9 +1962,9 @@ static ssize_t dp_dsc_bits_per_pixel_write(struct file *f, const char __user *bu
>
> for (i = 0; i < MAX_PIPES; i++) {
> pipe_ctx = &aconnector->dc_link->dc->current_state->res_ctx.pipe_ctx[i];
> - if (pipe_ctx && pipe_ctx->stream &&
> - pipe_ctx->stream->link == aconnector->dc_link)
> - break;
> + if (pipe_ctx && pipe_ctx->stream &&
> + pipe_ctx->stream->link == aconnector->dc_link)
> + break;
> }
>
> if (!pipe_ctx || !pipe_ctx->stream)
> @@ -2041,9 +2041,9 @@ static ssize_t dp_dsc_pic_width_read(struct file *f, char __user *buf,
>
> for (i = 0; i < MAX_PIPES; i++) {
> pipe_ctx = &aconnector->dc_link->dc->current_state->res_ctx.pipe_ctx[i];
> - if (pipe_ctx && pipe_ctx->stream &&
> - pipe_ctx->stream->link == aconnector->dc_link)
> - break;
> + if (pipe_ctx && pipe_ctx->stream &&
> + pipe_ctx->stream->link == aconnector->dc_link)
> + break;
> }
>
> if (!pipe_ctx)
> @@ -2098,9 +2098,9 @@ static ssize_t dp_dsc_pic_height_read(struct file *f, char __user *buf,
>
> for (i = 0; i < MAX_PIPES; i++) {
> pipe_ctx = &aconnector->dc_link->dc->current_state->res_ctx.pipe_ctx[i];
> - if (pipe_ctx && pipe_ctx->stream &&
> - pipe_ctx->stream->link == aconnector->dc_link)
> - break;
> + if (pipe_ctx && pipe_ctx->stream &&
> + pipe_ctx->stream->link == aconnector->dc_link)
> + break;
> }
>
> if (!pipe_ctx)
> @@ -2170,9 +2170,9 @@ static ssize_t dp_dsc_chunk_size_read(struct file *f, char __user *buf,
>
> for (i = 0; i < MAX_PIPES; i++) {
> pipe_ctx = &aconnector->dc_link->dc->current_state->res_ctx.pipe_ctx[i];
> - if (pipe_ctx && pipe_ctx->stream &&
> - pipe_ctx->stream->link == aconnector->dc_link)
> - break;
> + if (pipe_ctx && pipe_ctx->stream &&
> + pipe_ctx->stream->link == aconnector->dc_link)
> + break;
> }
>
> if (!pipe_ctx)
> @@ -2242,9 +2242,9 @@ static ssize_t dp_dsc_slice_bpg_offset_read(struct file *f, char __user *buf,
>
> for (i = 0; i < MAX_PIPES; i++) {
> pipe_ctx = &aconnector->dc_link->dc->current_state->res_ctx.pipe_ctx[i];
> - if (pipe_ctx && pipe_ctx->stream &&
> - pipe_ctx->stream->link == aconnector->dc_link)
> - break;
> + if (pipe_ctx && pipe_ctx->stream &&
> + pipe_ctx->stream->link == aconnector->dc_link)
> + break;
> }
>
> if (!pipe_ctx)
next prev parent reply other threads:[~2021-11-11 10:08 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-11 9:58 [PATCH] drm/amd/display: clean up some inconsistent indenting Jiapeng Chong
2021-11-11 10:08 ` Christian König [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-11-11 10:03 [PATCH] drm/amd/display: Clean " Jiapeng Chong
2021-11-11 10:08 ` Christian König
2021-11-12 22:55 ` Alex Deucher
2022-05-12 7:19 [PATCH] drm/amd/display: clean " Jiapeng Chong
2022-05-13 16:57 ` Alex Deucher
2023-02-21 3:44 [PATCH] drm/amd/display: Clean " Jiapeng Chong
2023-02-23 13:49 ` Alex Deucher
2023-03-22 3:14 Jiapeng Chong
2023-03-22 15:18 ` Hamza Mahfooz
2023-06-02 6:17 [PATCH] drm/amd/display: clean " Jiapeng Chong
2023-06-02 13:16 ` Alex Deucher
2023-06-02 14:28 ` Hamza Mahfooz
2023-09-08 7:54 Jiapeng Chong
2023-09-11 16:20 ` Hamza Mahfooz
2023-10-19 3:38 Jiapeng Chong
2023-10-19 14:51 ` Alex Deucher
2023-11-10 7:44 Jiapeng Chong
2023-11-17 6:40 Jiapeng Chong
2024-03-22 6:08 Jiapeng Chong
2024-05-11 2:43 Jiapeng Chong
2024-05-24 2:19 Jiapeng Chong
2024-05-24 13:44 ` Alex Deucher
2024-06-06 9:44 Jiapeng Chong
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=7dc5f830-36af-4d8f-4e45-03d73141db9b@amd.com \
--to=christian.koenig@amd.com \
--cc=Xinhui.Pan@amd.com \
--cc=airlied@linux.ie \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=jiapeng.chong@linux.alibaba.com \
--cc=linux-kernel@vger.kernel.org \
/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