summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/display/dc/dce80/dce80_compressor.c
diff options
context:
space:
mode:
authorHarry Wentland <harry.wentland@amd.com>2017-09-27 10:53:50 -0400
committerAlex Deucher <alexander.deucher@amd.com>2017-09-28 16:46:15 -0400
commit2004f45ef83f07f43f5da6ede780b08068c7583d (patch)
tree011ac2087c8a8c9272a4c4c5eaacd69d44c2319a /drivers/gpu/drm/amd/display/dc/dce80/dce80_compressor.c
parent82b400a62f2fd42b87f91a298c5641d0ead99251 (diff)
drm/amd/display: Use kernel alloc/free
Abstractions are frowned upon. cocci script: virtual context virtual patch virtual org virtual report @@ expression ptr; @@ - dm_alloc(ptr) + kzalloc(ptr, GFP_KERNEL) @@ expression ptr, size; @@ - dm_realloc(ptr, size) + krealloc(ptr, size, GFP_KERNEL) @@ expression ptr; @@ - dm_free(ptr) + kfree(ptr) v2: use GFP_KERNEL, not GFP_ATOMIC. add cocci script Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/dce80/dce80_compressor.c')
-rw-r--r--drivers/gpu/drm/amd/display/dc/dce80/dce80_compressor.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/dce80/dce80_compressor.c b/drivers/gpu/drm/amd/display/dc/dce80/dce80_compressor.c
index 77626d7624c6..cc1c0d390945 100644
--- a/drivers/gpu/drm/amd/display/dc/dce80/dce80_compressor.c
+++ b/drivers/gpu/drm/amd/display/dc/dce80/dce80_compressor.c
@@ -819,7 +819,7 @@ bool dce80_compressor_construct(struct dce80_compressor *compressor,
struct compressor *dce80_compressor_create(struct dc_context *ctx)
{
struct dce80_compressor *cp80 =
- dm_alloc(sizeof(struct dce80_compressor));
+ kzalloc(sizeof(struct dce80_compressor), GFP_KERNEL);
if (!cp80)
return NULL;
@@ -828,12 +828,12 @@ struct compressor *dce80_compressor_create(struct dc_context *ctx)
return &cp80->base;
BREAK_TO_DEBUGGER();
- dm_free(cp80);
+ kfree(cp80);
return NULL;
}
void dce80_compressor_destroy(struct compressor **compressor)
{
- dm_free(TO_DCE80_COMPRESSOR(*compressor));
+ kfree(TO_DCE80_COMPRESSOR(*compressor));
*compressor = NULL;
}