From: Colin Ian King Date: Wed, 15 Nov 2017 15:45:09 +0000 (+0000) Subject: drm/amd/display: remove unnecessary cast and use kcalloc instead of kzalloc X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=e778c1319b627e1aabd7aa00757eb50f593fbfa3;p=openwrt%2Fstaging%2Fblogic.git 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 Signed-off-by: Colin Ian King Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/display/dc/basics/logger.c b/drivers/gpu/drm/amd/display/dc/basics/logger.c index e04e8ecd4874..2ff5b467603d 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;