summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common/mm/nvgpu_allocator.c
diff options
context:
space:
mode:
authorAlex Waterman <alexw@nvidia.com>2018-09-05 18:28:05 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-09-12 20:48:11 -0400
commit338500c8e2ee342612d7bc4eb1cd87850228d4e2 (patch)
tree55f607de797b24577fb03158c33738322b54e100 /drivers/gpu/nvgpu/common/mm/nvgpu_allocator.c
parent19434a22454778a14cd918ad6a0ec061634a1fc2 (diff)
gpu: nvgpu: Fix MISRA 21.2 violations (public allocator APIs)
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 fixes places in the public allocator APIs. This consists of the various init routines which are used to create an allocator and the debug macro used within the allocator code. The buddy allocator was handled by collapsing the internal '__' prepended version with the non-prefixed version. The only required change was in the page_allocator code which now had to pass in a NULL vm pointer (since the VM is not needed for managing VIDMEM). JIRA NVGPU-1029 Change-Id: I484a144e61789bf594c525c1ca307b96d120830f Signed-off-by: Alex Waterman <alexw@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1813578 Reviewed-by: svc-misra-checker <svc-misra-checker@nvidia.com> Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/common/mm/nvgpu_allocator.c')
-rw-r--r--drivers/gpu/nvgpu/common/mm/nvgpu_allocator.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/common/mm/nvgpu_allocator.c b/drivers/gpu/nvgpu/common/mm/nvgpu_allocator.c
index ec0aa888..bf624162 100644
--- a/drivers/gpu/nvgpu/common/mm/nvgpu_allocator.c
+++ b/drivers/gpu/nvgpu/common/mm/nvgpu_allocator.c
@@ -145,9 +145,9 @@ void nvgpu_alloc_print_stats(struct nvgpu_allocator *na,
145/* 145/*
146 * Handle the common init stuff for a nvgpu_allocator. 146 * Handle the common init stuff for a nvgpu_allocator.
147 */ 147 */
148int __nvgpu_alloc_common_init(struct nvgpu_allocator *a, struct gk20a *g, 148int nvgpu_alloc_common_init(struct nvgpu_allocator *a, struct gk20a *g,
149 const char *name, void *priv, bool dbg, 149 const char *name, void *priv, bool dbg,
150 const struct nvgpu_allocator_ops *ops) 150 const struct nvgpu_allocator_ops *ops)
151{ 151{
152 int err; 152 int err;
153 153