* Re: [PATCH] drm/amd/display: fix the coding style issue of integrated_info
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
2021-01-15 14:07 ` Lee Jones
1 sibling, 0 replies; 3+ messages in thread
From: Christian König @ 2021-01-15 13:59 UTC (permalink / raw)
To: Huang Rui, amd-gfx; +Cc: Alex Deucher, Lee Jones, Jiansong.Chen
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/amd/display: fix the coding style issue of integrated_info
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
@ 2021-01-15 14:07 ` Lee Jones
1 sibling, 0 replies; 3+ messages in thread
From: Lee Jones @ 2021-01-15 14:07 UTC (permalink / raw)
To: Huang Rui; +Cc: Alex Deucher, Christian König, amd-gfx, Jiansong.Chen
On Sat, 16 Jan 2021, Huang Rui wrote:
> Follow the coding style of size of a struct, changing to:
>
> p = kmalloc(sizeof(*p), ...);
>
> Signed-off-by: Huang Rui <ray.huang@amd.com>
> ---
> drivers/gpu/drm/amd/display/dc/core/dc_link.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Reviewed-by: Lee Jones <lee.jones@linaro.org>
--
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] drm/amd/display: fix the coding style issue of integrated_info
@ 2021-01-15 21:54 Huang Rui
2021-01-15 13:59 ` Christian König
2021-01-15 14:07 ` Lee Jones
0 siblings, 2 replies; 3+ messages in thread
From: Huang Rui @ 2021-01-15 21:54 UTC (permalink / raw)
To: amd-gfx
Cc: Alex Deucher, Huang Rui, Lee Jones, Christian König, Jiansong.Chen
Follow the coding style of size of a struct, changing to:
p = kmalloc(sizeof(*p), ...);
Signed-off-by: Huang Rui <ray.huang@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++) {
--
2.25.1
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-01-15 15:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2021-01-15 14:07 ` Lee Jones
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.