Fixes the following category of checkpatch complaints:

WARNING: unnecessary cast may hide bugs, see 
http://c-faq.com/malloc/mallocnocast.html

Cc: Rodrigo Siqueira <rodrigo.sique...@amd.com>
Cc: Aurabindo Pillai <aurabindo.pil...@amd.com>
Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmu...@amd.com>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c 
b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
index 6efb812189f7..12ed5a5800d0 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
@@ -401,7 +401,7 @@ void dm_dtn_log_append_v(struct dc_context *ctx,
        total = log_ctx->pos + n + 1;
 
        if (total > log_ctx->size) {
-               char *buf = (char *)kvcalloc(total, sizeof(char), GFP_KERNEL);
+               char *buf = kvcalloc(total, sizeof(char), GFP_KERNEL);
 
                if (buf) {
                        memcpy(buf, log_ctx->buf, log_ctx->pos);
-- 
2.25.1

Reply via email to