From: "Christian König" <christian.koenig@amd.com>
To: Huang Rui <ray.huang@amd.com>, amd-gfx@lists.freedesktop.org
Cc: Alex Deucher <alexander.deucher@amd.com>,
Lee Jones <lee.jones@linaro.org>,
Jiansong.Chen@amd.com
Subject: Re: [PATCH] drm/amd/display: fix the coding style issue of integrated_info
Date: Fri, 15 Jan 2021 14:59:26 +0100 [thread overview]
Message-ID: <e14afaa8-5e5c-a16c-b6bc-e8a6e792a3f4@amd.com> (raw)
In-Reply-To: <20210115215423.525965-1-ray.huang@amd.com>
Am 15.01.21 um 22:54 schrieb Huang Rui:
> Follow the coding style of size of a struct, changing to:
>
> p = kmalloc(sizeof(*p), ...);
>
> Signed-off-by: Huang Rui <ray.huang@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
> ---
> drivers/gpu/drm/amd/display/dc/core/dc_link.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link.c b/drivers/gpu/drm/amd/display/dc/core/dc_link.c
> index 73178978ae74..9885ef21cc05 100644
> --- a/drivers/gpu/drm/amd/display/dc/core/dc_link.c
> +++ b/drivers/gpu/drm/amd/display/dc/core/dc_link.c
> @@ -1380,7 +1380,7 @@ static bool dc_link_construct(struct dc_link *link,
>
> DC_LOGGER_INIT(dc_ctx->logger);
>
> - info = kzalloc(sizeof(struct integrated_info), GFP_KERNEL);
> + info = kzalloc(sizeof(*info), GFP_KERNEL);
> if (!info)
> goto create_fail;
>
> @@ -1545,7 +1545,7 @@ static bool dc_link_construct(struct dc_link *link,
> }
>
> if (bios->integrated_info)
> - memcpy(info, bios->integrated_info, sizeof(struct integrated_info));
> + memcpy(info, bios->integrated_info, sizeof(*info));
>
> /* Look for channel mapping corresponding to connector and device tag */
> for (i = 0; i < MAX_NUMBER_OF_EXT_DISPLAY_PATH; i++) {
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
next prev parent reply other threads:[~2021-01-15 13:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-15 21:54 [PATCH] drm/amd/display: fix the coding style issue of integrated_info Huang Rui
2021-01-15 13:59 ` Christian König [this message]
2021-01-15 14:07 ` Lee Jones
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=e14afaa8-5e5c-a16c-b6bc-e8a6e792a3f4@amd.com \
--to=christian.koenig@amd.com \
--cc=Jiansong.Chen@amd.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=lee.jones@linaro.org \
--cc=ray.huang@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