mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-23 01:50:07 +03:00
gpu: nvgpu: fix MISRA 21.3 mm nvgpu allocator
MISRA rule 21.3 forbids from using calloc, malloc, realloc and free identifiers for function or macro names. This patch renames nvgpu allocator free operator to free_alloc to follow rule 21.3. Jira NVGPU-3336 Change-Id: Ie9f48d567255a3e1dca70632fbe3d36b45023f3f Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2111365 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Alex Waterman <alexw@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
2b165deba1
commit
778f6b2874
@@ -101,7 +101,7 @@ static int test_nvgpu_bitmap_allocator_critical(struct unit_module *m,
|
||||
goto fail;
|
||||
}
|
||||
|
||||
na->ops->free(na, addr1);
|
||||
na->ops->free_alloc(na, addr1);
|
||||
|
||||
na->ops->free_fixed(na, SZ_4K, SZ_8K);
|
||||
|
||||
@@ -162,9 +162,9 @@ static int test_nvgpu_bitmap_allocator_alloc(struct unit_module *m,
|
||||
}
|
||||
nvgpu_posix_enable_fault_injection(kmem_fi, false, 0);
|
||||
|
||||
na->ops->free(na, alloc3k);
|
||||
na->ops->free_alloc(na, alloc3k);
|
||||
|
||||
na->ops->free(na, alloc3k);
|
||||
na->ops->free_alloc(na, alloc3k);
|
||||
|
||||
alloc4k = na->ops->alloc(na, SZ_4K);
|
||||
if (alloc4k == 0) {
|
||||
@@ -221,7 +221,7 @@ static int test_nvgpu_bitmap_allocator_alloc(struct unit_module *m,
|
||||
"freeing unaligned base didn't trigger BUG()\n");
|
||||
}
|
||||
|
||||
na->ops->free(na, alloc4k);
|
||||
na->ops->free_alloc(na, alloc4k);
|
||||
|
||||
/*
|
||||
* Allocate 4K
|
||||
|
||||
Reference in New Issue
Block a user