]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdgpu: Replace kzalloc with kcalloc
authorGustavo A. R. Silva <gustavo@embeddedor.com>
Tue, 15 Jan 2019 05:22:02 +0000 (23:22 -0600)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 25 Jan 2019 21:15:35 +0000 (16:15 -0500)
commit7d93d6658ff657bf7b816bb9b0a75a0742244ebc
treea82389797d377b5f1bac073edc7ae62b4888e90c
parent7ab0fe9ce479cea3c0e8cd83e033eb08d0e56db7
drm/amdgpu: Replace kzalloc with kcalloc

Replace kzalloc() function with its 2-factor argument form, kcalloc().

This patch replaces cases of:

kzalloc(a * b, gfp)

with:
kcalloc(a, b, gfp)

Also, improve the coding style and the use of sizeof during
allocation by changing sizeof(struct dc_surface_update) and
sizeof(struct dc_plane_state) to sizeof(*updates) and
sizeof(*surfaces), correspondingly.

This code was detected with the help of Coccinelle.

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c