Skip to content

Commit c299cb6

Browse files
roheetchavanalexdeucher
authored andcommitted
drm/amd/display: Fix unnecessary cast warnings from checkpatch
This patch addresses warnings produced by the checkpatch script related to unnecessary casts that could potentially hide bugs. The specific warnings are as follows: - Warning at drivers/gpu/drm/amd/display/dc/dml2/dml21/dml21_wrapper.c:16 - Warning at drivers/gpu/drm/amd/display/dc/dml2/dml21/dml21_wrapper.c:20 - Warning at drivers/gpu/drm/amd/display/dc/dml2/dml21/dml21_wrapper.c:30 Acked-by: Alex Deucher <[email protected]> Signed-off-by: Rohit Chavan <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 3eebfd5 commit c299cb6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/gpu/drm/amd/display/dc/dml2/dml21/dml21_wrapper.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@
1313

1414
static bool dml21_allocate_memory(struct dml2_context **dml_ctx)
1515
{
16-
*dml_ctx = (struct dml2_context *)kzalloc(sizeof(struct dml2_context), GFP_KERNEL);
16+
*dml_ctx = kzalloc(sizeof(struct dml2_context), GFP_KERNEL);
1717
if (!(*dml_ctx))
1818
return false;
1919

20-
(*dml_ctx)->v21.dml_init.dml2_instance = (struct dml2_instance *)kzalloc(sizeof(struct dml2_instance), GFP_KERNEL);
20+
(*dml_ctx)->v21.dml_init.dml2_instance = kzalloc(sizeof(struct dml2_instance), GFP_KERNEL);
2121
if (!((*dml_ctx)->v21.dml_init.dml2_instance))
2222
return false;
2323

@@ -27,7 +27,7 @@ static bool dml21_allocate_memory(struct dml2_context **dml_ctx)
2727
(*dml_ctx)->v21.mode_support.display_config = &(*dml_ctx)->v21.display_config;
2828
(*dml_ctx)->v21.mode_programming.display_config = (*dml_ctx)->v21.mode_support.display_config;
2929

30-
(*dml_ctx)->v21.mode_programming.programming = (struct dml2_display_cfg_programming *)kzalloc(sizeof(struct dml2_display_cfg_programming), GFP_KERNEL);
30+
(*dml_ctx)->v21.mode_programming.programming = kzalloc(sizeof(struct dml2_display_cfg_programming), GFP_KERNEL);
3131
if (!((*dml_ctx)->v21.mode_programming.programming))
3232
return false;
3333

0 commit comments

Comments
 (0)