diff options
author | Alex Waterman <alexw@nvidia.com> | 2018-08-20 17:32:51 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-08-22 20:33:26 -0400 |
commit | 54b11a456cc5d9a13633b50c2bf167e0d5dafef5 (patch) | |
tree | 517c565784775ad71072d07c626a3d248dcda215 /drivers/gpu/nvgpu/common/mm/lockless_allocator.c | |
parent | 67e4f728eae290896ff69991e743328fc67b56e5 (diff) |
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 <alexw@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1803351
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/common/mm/lockless_allocator.c')
-rw-r--r-- | drivers/gpu/nvgpu/common/mm/lockless_allocator.c | 16 |
1 files changed, 8 insertions, 8 deletions
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 = { | |||
159 | #endif | 159 | #endif |
160 | }; | 160 | }; |
161 | 161 | ||
162 | int nvgpu_lockless_allocator_init(struct gk20a *g, struct nvgpu_allocator *__a, | 162 | int nvgpu_lockless_allocator_init(struct gk20a *g, struct nvgpu_allocator *na, |
163 | const char *name, u64 base, u64 length, | 163 | const char *name, u64 base, u64 length, |
164 | u64 blk_size, u64 flags) | 164 | u64 blk_size, u64 flags) |
165 | { | 165 | { |
@@ -187,7 +187,7 @@ int nvgpu_lockless_allocator_init(struct gk20a *g, struct nvgpu_allocator *__a, | |||
187 | return -ENOMEM; | 187 | return -ENOMEM; |
188 | } | 188 | } |
189 | 189 | ||
190 | err = __nvgpu_alloc_common_init(__a, g, name, a, false, &pool_ops); | 190 | err = __nvgpu_alloc_common_init(na, g, name, a, false, &pool_ops); |
191 | if (err) { | 191 | if (err) { |
192 | goto fail; | 192 | goto fail; |
193 | } | 193 | } |
@@ -216,13 +216,13 @@ int nvgpu_lockless_allocator_init(struct gk20a *g, struct nvgpu_allocator *__a, | |||
216 | a->inited = true; | 216 | a->inited = true; |
217 | 217 | ||
218 | #ifdef CONFIG_DEBUG_FS | 218 | #ifdef CONFIG_DEBUG_FS |
219 | nvgpu_init_alloc_debug(g, __a); | 219 | nvgpu_init_alloc_debug(g, na); |
220 | #endif | 220 | #endif |
221 | alloc_dbg(__a, "New allocator: type lockless"); | 221 | alloc_dbg(na, "New allocator: type lockless"); |
222 | alloc_dbg(__a, " base 0x%llx", a->base); | 222 | alloc_dbg(na, " base 0x%llx", a->base); |
223 | alloc_dbg(__a, " nodes %d", a->nr_nodes); | 223 | alloc_dbg(na, " nodes %d", a->nr_nodes); |
224 | alloc_dbg(__a, " blk_size 0x%llx", a->blk_size); | 224 | alloc_dbg(na, " blk_size 0x%llx", a->blk_size); |
225 | alloc_dbg(__a, " flags 0x%llx", a->flags); | 225 | alloc_dbg(na, " flags 0x%llx", a->flags); |
226 | 226 | ||
227 | return 0; | 227 | return 0; |
228 | 228 | ||