]> Git Repo - linux.git/commitdiff
drm/amd/display: Remove unnecessary casts in amdgpu_dm_helpers.c
authorSrinivasan Shanmugam <[email protected]>
Sat, 24 Jun 2023 04:43:24 +0000 (10:13 +0530)
committerAlex Deucher <[email protected]>
Fri, 7 Jul 2023 17:51:47 +0000 (13:51 -0400)
Fixes the following category of checkpatch complaints:

WARNING: unnecessary cast may hide bugs, see http://c-faq.com/malloc/mallocnocast.html
+               char *buf = (char *)kvcalloc(total, sizeof(char), GFP_KERNEL);

Cc: Rodrigo Siqueira <[email protected]>
Cc: Aurabindo Pillai <[email protected]>
Signed-off-by: Srinivasan Shanmugam <[email protected]>
Reviewed-by: Christian König <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c

index d9a482908380dfd06bbac67b42ca6b5795c52997..c13b70629be65d0d6fc204811577572e6bfdae6f 100644 (file)
@@ -426,7 +426,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);
This page took 0.091345 seconds and 4 git commands to generate.