diff options
author | Alex Waterman <alexw@nvidia.com> | 2017-04-28 15:06:06 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-05-02 19:05:52 -0400 |
commit | 9bd9ffa0027d3925be4e01d255705f741e61ef87 (patch) | |
tree | 4587ed90f3d59f008cab2999ad0f9d6ba0c14d55 /drivers | |
parent | ef7908a455f53d4644131aa8d568282197943935 (diff) |
gpu: nvgpu: Remove unused variable and do_div()
Remove an unused variable that missed compilation checks because
it gets assigned to by do_div(). This same issue was propagated
to multiple places.
Change-Id: Ica2f675abbb3c08107ea4e6bc19044c0537a7484
Signed-off-by: Alex Waterman <alexw@nvidia.com>
Reviewed-on: http://git-master/r/1472365
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/nvgpu/common/mm/lockless_allocator.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/gpu/nvgpu/common/mm/lockless_allocator.c b/drivers/gpu/nvgpu/common/mm/lockless_allocator.c index d8043c0b..51e26208 100644 --- a/drivers/gpu/nvgpu/common/mm/lockless_allocator.c +++ b/drivers/gpu/nvgpu/common/mm/lockless_allocator.c | |||
@@ -79,10 +79,9 @@ static void nvgpu_lockless_free(struct nvgpu_allocator *a, u64 addr) | |||
79 | { | 79 | { |
80 | struct nvgpu_lockless_allocator *pa = a->priv; | 80 | struct nvgpu_lockless_allocator *pa = a->priv; |
81 | int head, ret; | 81 | int head, ret; |
82 | u64 cur_idx, rem; | 82 | u64 cur_idx; |
83 | 83 | ||
84 | cur_idx = addr - pa->base; | 84 | cur_idx = addr - pa->base; |
85 | rem = do_div(cur_idx, pa->blk_size); | ||
86 | 85 | ||
87 | while (1) { | 86 | while (1) { |
88 | head = ACCESS_ONCE(pa->head); | 87 | head = ACCESS_ONCE(pa->head); |
@@ -148,7 +147,7 @@ int nvgpu_lockless_allocator_init(struct gk20a *g, struct nvgpu_allocator *__a, | |||
148 | int i; | 147 | int i; |
149 | int err; | 148 | int err; |
150 | int nr_nodes; | 149 | int nr_nodes; |
151 | u64 count, rem; | 150 | u64 count; |
152 | struct nvgpu_lockless_allocator *a; | 151 | struct nvgpu_lockless_allocator *a; |
153 | 152 | ||
154 | if (!blk_size) | 153 | if (!blk_size) |
@@ -159,7 +158,6 @@ int nvgpu_lockless_allocator_init(struct gk20a *g, struct nvgpu_allocator *__a, | |||
159 | * In order to control memory footprint, we require count < INT_MAX | 158 | * In order to control memory footprint, we require count < INT_MAX |
160 | */ | 159 | */ |
161 | count = length; | 160 | count = length; |
162 | rem = do_div(count, blk_size); | ||
163 | if (!base || !count || count > INT_MAX) | 161 | if (!base || !count || count > INT_MAX) |
164 | return -EINVAL; | 162 | return -EINVAL; |
165 | 163 | ||