summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/include
diff options
context:
space:
mode:
authorAmulya <Amurthyreddy@nvidia.com>2018-08-28 03:04:55 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-09-19 06:24:12 -0400
commit941ac9a9d07bedb4062fd0c4d32eb2ef80a42359 (patch)
treec53622d96a4c2e7c18693ecf4059d7e403cd7808 /drivers/gpu/nvgpu/include
parent2805f03aa0496502b64ff760f667bfe9d8a27928 (diff)
nvgpu: common: MISRA 10.1 boolean fixes
Fix violations where a variable of type non-boolean is used as a boolean in gpu/nvgpu/common. JIRA NVGPU-646 Change-Id: I9773d863b715f83ae1772b75d5373f77244bc8ca Signed-off-by: Amulya <Amurthyreddy@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1807132 GVS: Gerrit_Virtual_Submit Tested-by: Amulya Murthyreddy <amurthyreddy@nvidia.com> Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/include')
-rw-r--r--drivers/gpu/nvgpu/include/nvgpu/allocator.h16
-rw-r--r--drivers/gpu/nvgpu/include/nvgpu/vm.h4
2 files changed, 10 insertions, 10 deletions
diff --git a/drivers/gpu/nvgpu/include/nvgpu/allocator.h b/drivers/gpu/nvgpu/include/nvgpu/allocator.h
index 2bff0efd..d722673d 100644
--- a/drivers/gpu/nvgpu/include/nvgpu/allocator.h
+++ b/drivers/gpu/nvgpu/include/nvgpu/allocator.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2011-2017, NVIDIA CORPORATION. All rights reserved. 2 * Copyright (c) 2011-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"),
@@ -83,7 +83,7 @@ struct nvgpu_allocator_ops {
83 u64 (*base)(struct nvgpu_allocator *allocator); 83 u64 (*base)(struct nvgpu_allocator *allocator);
84 u64 (*length)(struct nvgpu_allocator *allocator); 84 u64 (*length)(struct nvgpu_allocator *allocator);
85 u64 (*end)(struct nvgpu_allocator *allocator); 85 u64 (*end)(struct nvgpu_allocator *allocator);
86 int (*inited)(struct nvgpu_allocator *allocator); 86 bool (*inited)(struct nvgpu_allocator *allocator);
87 u64 (*space)(struct nvgpu_allocator *allocator); 87 u64 (*space)(struct nvgpu_allocator *allocator);
88 88
89 /* Destructor. */ 89 /* Destructor. */
@@ -188,11 +188,11 @@ nvgpu_alloc_carveout_from_co_entry(struct nvgpu_list_node *node)
188 * pointing to the allocation base (requires GPU_ALLOC_FORCE_CONTIG to be 188 * pointing to the allocation base (requires GPU_ALLOC_FORCE_CONTIG to be
189 * set as well). 189 * set as well).
190 */ 190 */
191#define GPU_ALLOC_GVA_SPACE BIT(0) 191#define GPU_ALLOC_GVA_SPACE BIT64(0)
192#define GPU_ALLOC_NO_ALLOC_PAGE BIT(1) 192#define GPU_ALLOC_NO_ALLOC_PAGE BIT64(1)
193#define GPU_ALLOC_4K_VIDMEM_PAGES BIT(2) 193#define GPU_ALLOC_4K_VIDMEM_PAGES BIT64(2)
194#define GPU_ALLOC_FORCE_CONTIG BIT(3) 194#define GPU_ALLOC_FORCE_CONTIG BIT64(3)
195#define GPU_ALLOC_NO_SCATTER_GATHER BIT(4) 195#define GPU_ALLOC_NO_SCATTER_GATHER BIT64(4)
196 196
197static inline void alloc_lock(struct nvgpu_allocator *a) 197static inline void alloc_lock(struct nvgpu_allocator *a)
198{ 198{
@@ -256,7 +256,7 @@ void nvgpu_alloc_release_carveout(struct nvgpu_allocator *a,
256u64 nvgpu_alloc_base(struct nvgpu_allocator *a); 256u64 nvgpu_alloc_base(struct nvgpu_allocator *a);
257u64 nvgpu_alloc_length(struct nvgpu_allocator *a); 257u64 nvgpu_alloc_length(struct nvgpu_allocator *a);
258u64 nvgpu_alloc_end(struct nvgpu_allocator *a); 258u64 nvgpu_alloc_end(struct nvgpu_allocator *a);
259u64 nvgpu_alloc_initialized(struct nvgpu_allocator *a); 259bool nvgpu_alloc_initialized(struct nvgpu_allocator *a);
260u64 nvgpu_alloc_space(struct nvgpu_allocator *a); 260u64 nvgpu_alloc_space(struct nvgpu_allocator *a);
261 261
262void nvgpu_alloc_destroy(struct nvgpu_allocator *allocator); 262void nvgpu_alloc_destroy(struct nvgpu_allocator *allocator);
diff --git a/drivers/gpu/nvgpu/include/nvgpu/vm.h b/drivers/gpu/nvgpu/include/nvgpu/vm.h
index b47d4ee0..23dac0ac 100644
--- a/drivers/gpu/nvgpu/include/nvgpu/vm.h
+++ b/drivers/gpu/nvgpu/include/nvgpu/vm.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved. 2 * Copyright (c) 2017-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"),
@@ -220,7 +220,7 @@ void nvgpu_vm_get(struct vm_gk20a *vm);
220void nvgpu_vm_put(struct vm_gk20a *vm); 220void nvgpu_vm_put(struct vm_gk20a *vm);
221 221
222int vm_aspace_id(struct vm_gk20a *vm); 222int vm_aspace_id(struct vm_gk20a *vm);
223int nvgpu_big_pages_possible(struct vm_gk20a *vm, u64 base, u64 size); 223bool nvgpu_big_pages_possible(struct vm_gk20a *vm, u64 base, u64 size);
224 224
225int nvgpu_vm_pde_coverage_bit_count(struct vm_gk20a *vm); 225int nvgpu_vm_pde_coverage_bit_count(struct vm_gk20a *vm);
226 226