From 31b4dcf8ec7405c8e59933538d281d7765b66239 Mon Sep 17 00:00:00 2001 From: Vedashree Vidwans Date: Thu, 2 May 2019 16:27:19 -0700 Subject: [PATCH] gpu: nvgpu: mm: fix MISRA 5.7 in bitmap allocator Currently, bitmap allocator reuses identifier "nvgpu_bitmap_alloc" for an allocation function and as bitmap rbtree node struct. Renaming the allocation function to "nvgpu_bitmap_balloc". Also, renaming fixed allocation function to "nvgpu_bitmap_balloc_fixed" for consistency. Jira NVGPU-3335 Change-Id: I6fe616db5137b2d4e2795a84ae5eafd527f0dba5 Signed-off-by: Vedashree Vidwans Reviewed-on: https://git-master.nvidia.com/r/2110714 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Alex Waterman Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/mm/allocators/bitmap_allocator.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/nvgpu/common/mm/allocators/bitmap_allocator.c b/drivers/gpu/nvgpu/common/mm/allocators/bitmap_allocator.c index b7aca0da0..dedb5398d 100644 --- a/drivers/gpu/nvgpu/common/mm/allocators/bitmap_allocator.c +++ b/drivers/gpu/nvgpu/common/mm/allocators/bitmap_allocator.c @@ -61,7 +61,7 @@ static u64 nvgpu_bitmap_alloc_end(struct nvgpu_allocator *a) /* * @page_size is ignored. */ -static u64 nvgpu_bitmap_alloc_fixed(struct nvgpu_allocator *na, +static u64 nvgpu_bitmap_balloc_fixed(struct nvgpu_allocator *na, u64 base, u64 len, u32 page_size) { struct nvgpu_bitmap_allocator *a = bitmap_allocator(na); @@ -202,7 +202,7 @@ static int nvgpu_bitmap_store_alloc(struct nvgpu_bitmap_allocator *a, * @len is in bytes. This routine will figure out the right number of bits to * actually allocate. The return is the address in bytes as well. */ -static u64 nvgpu_bitmap_alloc(struct nvgpu_allocator *na, u64 len) +static u64 nvgpu_bitmap_balloc(struct nvgpu_allocator *na, u64 len) { u64 tmp_u64, addr; u32 blks; @@ -372,10 +372,10 @@ static void nvgpu_bitmap_print_stats(struct nvgpu_allocator *na, #endif static const struct nvgpu_allocator_ops bitmap_ops = { - .alloc = nvgpu_bitmap_alloc, + .alloc = nvgpu_bitmap_balloc, .free = nvgpu_bitmap_free, - .alloc_fixed = nvgpu_bitmap_alloc_fixed, + .alloc_fixed = nvgpu_bitmap_balloc_fixed, .free_fixed = nvgpu_bitmap_free_fixed, .base = nvgpu_bitmap_alloc_base,