From 54b11a456cc5d9a13633b50c2bf167e0d5dafef5 Mon Sep 17 00:00:00 2001 From: Alex Waterman Date: Mon, 20 Aug 2018 14:32:51 -0700 Subject: gpu: nvgpu: Fix MISRA 21.2 violations [1/3] MISRA 21.2 states that we may not use reserved identifiers; since all identifiers beginning with '_' are reserved by libc, the usage of '__' as a prefix is disallowed. This change removes the usage of the '__a' argument scattered throughout the nvgpu allocator code. JIRA NVGPU-1029 Change-Id: I5a9b8a3e0602ba4d519ca19080951402b6f3287d Signed-off-by: Alex Waterman Reviewed-on: https://git-master.nvidia.com/r/1803351 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/mm/lockless_allocator.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'drivers/gpu/nvgpu/common/mm/lockless_allocator.c') diff --git a/drivers/gpu/nvgpu/common/mm/lockless_allocator.c b/drivers/gpu/nvgpu/common/mm/lockless_allocator.c index 7a5f67e9..eec661bc 100644 --- a/drivers/gpu/nvgpu/common/mm/lockless_allocator.c +++ b/drivers/gpu/nvgpu/common/mm/lockless_allocator.c @@ -159,7 +159,7 @@ static const struct nvgpu_allocator_ops pool_ops = { #endif }; -int nvgpu_lockless_allocator_init(struct gk20a *g, struct nvgpu_allocator *__a, +int nvgpu_lockless_allocator_init(struct gk20a *g, struct nvgpu_allocator *na, const char *name, u64 base, u64 length, u64 blk_size, u64 flags) { @@ -187,7 +187,7 @@ int nvgpu_lockless_allocator_init(struct gk20a *g, struct nvgpu_allocator *__a, return -ENOMEM; } - err = __nvgpu_alloc_common_init(__a, g, name, a, false, &pool_ops); + err = __nvgpu_alloc_common_init(na, g, name, a, false, &pool_ops); if (err) { goto fail; } @@ -216,13 +216,13 @@ int nvgpu_lockless_allocator_init(struct gk20a *g, struct nvgpu_allocator *__a, a->inited = true; #ifdef CONFIG_DEBUG_FS - nvgpu_init_alloc_debug(g, __a); + nvgpu_init_alloc_debug(g, na); #endif - alloc_dbg(__a, "New allocator: type lockless"); - alloc_dbg(__a, " base 0x%llx", a->base); - alloc_dbg(__a, " nodes %d", a->nr_nodes); - alloc_dbg(__a, " blk_size 0x%llx", a->blk_size); - alloc_dbg(__a, " flags 0x%llx", a->flags); + alloc_dbg(na, "New allocator: type lockless"); + alloc_dbg(na, " base 0x%llx", a->base); + alloc_dbg(na, " nodes %d", a->nr_nodes); + alloc_dbg(na, " blk_size 0x%llx", a->blk_size); + alloc_dbg(na, " flags 0x%llx", a->flags); return 0; -- cgit v1.2.2