diff options
author | Huang Rui <ray.huang@amd.com> | 2021-01-16 05:49:44 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2021-01-15 15:23:23 -0500 |
commit | b4423a3d30a9fab04e5d085f2cf031c922261a46 (patch) | |
tree | c6abdf350642a8a8055cac0143a1978d0ad85ec8 /drivers/gpu/drm/amd/display/dc/core/dc_link.c | |
parent | b3de22cbde831e8e208209bddb50fe25be61eb5f (diff) |
drm/amd/display: fix the coding style issue of integrated_info
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>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/core/dc_link.c')
-rw-r--r-- | drivers/gpu/drm/amd/display/dc/core/dc_link.c | 4 |
1 files 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++) { |