summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common/mm/lockless_allocator.c
diff options
context:
space:
mode:
authorSrirangan <smadhavan@nvidia.com>2018-08-01 03:32:14 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-08-02 16:56:31 -0400
commit63e6e8ee3ee9ce01b1f7d4c0014bb589df105d71 (patch)
treef4db057c93973a9ad4afa15d1c6e5e1f2440c241 /drivers/gpu/nvgpu/common/mm/lockless_allocator.c
parente6c135ecb70e8b966fc036587301c979ae70e869 (diff)
gpu: nvgpu: common: Fix MISRA 15.6 violations
This fixes errors due to single statement loop bodies without braces, which is part of Rule 15.6 of MISRA. This patch covers in gpu/nvgpu/common/ JIRA NVGPU-989 Change-Id: Ic6a98a1cd04e4524dabf650e2f6e73c6b5a1db9d Signed-off-by: Srirangan <smadhavan@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1786207 Reviewed-by: svc-misra-checker <svc-misra-checker@nvidia.com> Reviewed-by: Adeel Raza <araza@nvidia.com> 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>
Diffstat (limited to 'drivers/gpu/nvgpu/common/mm/lockless_allocator.c')
-rw-r--r--drivers/gpu/nvgpu/common/mm/lockless_allocator.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/common/mm/lockless_allocator.c b/drivers/gpu/nvgpu/common/mm/lockless_allocator.c
index 5f48d606..4a3d6c9d 100644
--- a/drivers/gpu/nvgpu/common/mm/lockless_allocator.c
+++ b/drivers/gpu/nvgpu/common/mm/lockless_allocator.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved. 2 * Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved.
3 * 3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a 4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"), 5 * copy of this software and associated documentation files (the "Software"),
@@ -194,8 +194,9 @@ int nvgpu_lockless_allocator_init(struct gk20a *g, struct nvgpu_allocator *__a,
194 194
195 /* chain the elements together to form the initial free list */ 195 /* chain the elements together to form the initial free list */
196 nr_nodes = (int)count; 196 nr_nodes = (int)count;
197 for (i = 0; i < nr_nodes; i++) 197 for (i = 0; i < nr_nodes; i++) {
198 a->next[i] = i + 1; 198 a->next[i] = i + 1;
199 }
199 a->next[nr_nodes - 1] = -1; 200 a->next[nr_nodes - 1] = -1;
200 201
201 a->base = base; 202 a->base = base;