mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 02:22:34 +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
@@ -181,7 +181,7 @@ static int test_buddy_allocator_with_big_pages(struct unit_module *m,
|
||||
goto fail;
|
||||
}
|
||||
|
||||
na->ops->free(na, addr1);
|
||||
na->ops->free_alloc(na, addr1);
|
||||
|
||||
/*
|
||||
* alloc_pte()
|
||||
@@ -734,11 +734,11 @@ static int test_nvgpu_buddy_allocator_basic_ops(struct unit_module *m,
|
||||
|
||||
addr = na->ops->alloc(na, (SZ_64K >> 1));
|
||||
|
||||
na->ops->free(na, addr);
|
||||
na->ops->free_alloc(na, addr);
|
||||
|
||||
na->ops->free(na, addr);
|
||||
na->ops->free_alloc(na, addr);
|
||||
|
||||
na->ops->free(na, 0ULL);
|
||||
na->ops->free_alloc(na, 0ULL);
|
||||
|
||||
/*
|
||||
* len = 2M (requesting more than available memory)
|
||||
@@ -751,7 +751,7 @@ static int test_nvgpu_buddy_allocator_basic_ops(struct unit_module *m,
|
||||
|
||||
addr = na->ops->alloc_pte(na, (SZ_4K << 2), SZ_1K << 1);
|
||||
|
||||
na->ops->free(na, addr);
|
||||
na->ops->free_alloc(na, addr);
|
||||
|
||||
/*
|
||||
* Unaligned base
|
||||
|
||||
Reference in New Issue
Block a user