diff options
author | Kent Russell <kent.russell@amd.com> | 2017-08-15 23:00:08 -0400 |
---|---|---|
committer | Oded Gabbay <oded.gabbay@gmail.com> | 2017-08-15 23:00:08 -0400 |
commit | dbf56ab11a09550c00edb84fc4b2197350154e99 (patch) | |
tree | 67342d776471888f326568b990c2e70b34d5874d /drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | |
parent | ab7c16486707f86264c73b043327c70866236722 (diff) |
drm/amdkfd: Remove usage of alloc(sizeof(struct...
See https://kernel.org/doc/html/latest/process/coding-style.html
under "14) Allocating Memory" for rationale behind removing the
x=alloc(sizeof(struct) style and using x=alloc(sizeof(*x) instead
Signed-off-by: Kent Russell <kent.russell@amd.com>
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com>
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c index 2e0337977fa6..22a47b93b45b 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c @@ -422,7 +422,7 @@ static int register_process_nocpsch(struct device_queue_manager *dqm, BUG_ON(!dqm || !qpd); - n = kzalloc(sizeof(struct device_process_node), GFP_KERNEL); + n = kzalloc(sizeof(*n), GFP_KERNEL); if (!n) return -ENOMEM; @@ -1135,7 +1135,7 @@ struct device_queue_manager *device_queue_manager_init(struct kfd_dev *dev) pr_debug("Loading device queue manager\n"); - dqm = kzalloc(sizeof(struct device_queue_manager), GFP_KERNEL); + dqm = kzalloc(sizeof(*dqm), GFP_KERNEL); if (!dqm) return NULL; |