diff options
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2763-drm-amd-display-remove-unnecessary-cast-and-use-kcal.patch')
-rw-r--r-- | meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2763-drm-amd-display-remove-unnecessary-cast-and-use-kcal.patch | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2763-drm-amd-display-remove-unnecessary-cast-and-use-kcal.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2763-drm-amd-display-remove-unnecessary-cast-and-use-kcal.patch new file mode 100644 index 00000000..2d4d60ca --- /dev/null +++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2763-drm-amd-display-remove-unnecessary-cast-and-use-kcal.patch @@ -0,0 +1,35 @@ +From 4221bd1fe68128cc53c767f65164169f6c64450a Mon Sep 17 00:00:00 2001 +From: Colin Ian King <colin.king@canonical.com> +Date: Wed, 15 Nov 2017 15:45:09 +0000 +Subject: [PATCH 2763/4131] drm/amd/display: remove unnecessary cast and use + kcalloc instead of kzalloc + +Use kcalloc instead of kzalloc and the cast on the return from kzalloc is +unnecessary and can be removed. + +Reviewed-by: Alex Deucher <alexander.deucher@amd.com> +Signed-off-by: Colin Ian King <colin.king@canonical.com> +Signed-off-by: Alex Deucher <alexander.deucher@amd.com> +--- + drivers/gpu/drm/amd/display/dc/basics/logger.c | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +diff --git a/drivers/gpu/drm/amd/display/dc/basics/logger.c b/drivers/gpu/drm/amd/display/dc/basics/logger.c +index e04e8ec..2ff5b46 100644 +--- a/drivers/gpu/drm/amd/display/dc/basics/logger.c ++++ b/drivers/gpu/drm/amd/display/dc/basics/logger.c +@@ -70,9 +70,8 @@ static bool construct(struct dc_context *ctx, struct dal_logger *logger, + { + /* malloc buffer and init offsets */ + logger->log_buffer_size = DAL_LOGGER_BUFFER_MAX_SIZE; +- logger->log_buffer = (char *)kzalloc(logger->log_buffer_size * sizeof(char), +- GFP_KERNEL); +- ++ logger->log_buffer = kcalloc(logger->log_buffer_size, sizeof(char), ++ GFP_KERNEL); + if (!logger->log_buffer) + return false; + +-- +2.7.4 + |