Skip to content

Commit

Permalink
drm/amd/display: fix the coding style issue of integrated_info
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Huang Rui authored and Alex Deucher committed Jan 15, 2021
1 parent b3de22c commit b4423a3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/gpu/drm/amd/display/dc/core/dc_link.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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++) {
Expand Down

0 comments on commit b4423a3

Please sign in to comment.