diff options
author | Harry Wentland <harry.wentland@amd.com> | 2017-09-27 10:53:50 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-09-28 16:46:15 -0400 |
commit | 2004f45ef83f07f43f5da6ede780b08068c7583d (patch) | |
tree | 011ac2087c8a8c9272a4c4c5eaacd69d44c2319a /drivers/gpu/drm/amd/display/dc/gpio/hw_factory.c | |
parent | 82b400a62f2fd42b87f91a298c5641d0ead99251 (diff) | |
download | linux-2004f45ef83f07f43f5da6ede780b08068c7583d.tar.gz linux-2004f45ef83f07f43f5da6ede780b08068c7583d.tar.bz2 linux-2004f45ef83f07f43f5da6ede780b08068c7583d.zip |
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/gpio/hw_factory.c')
-rw-r--r-- | drivers/gpu/drm/amd/display/dc/gpio/hw_factory.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/gpio/hw_factory.c b/drivers/gpu/drm/amd/display/dc/gpio/hw_factory.c index f7d049c0e62a..87b580fa4bc9 100644 --- a/drivers/gpu/drm/amd/display/dc/gpio/hw_factory.c +++ b/drivers/gpu/drm/amd/display/dc/gpio/hw_factory.c @@ -101,7 +101,7 @@ void dal_hw_factory_destroy( return; } - dm_free(*factory); + kfree(*factory); *factory = NULL; } |