From 9bd9ffa0027d3925be4e01d255705f741e61ef87 Mon Sep 17 00:00:00 2001 From: Alex Waterman Date: Fri, 28 Apr 2017 12:06:06 -0700 Subject: 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 Reviewed-on: http://git-master/r/1472365 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: svccoveritychecker GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom --- drivers/gpu/nvgpu/common/mm/lockless_allocator.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'drivers/gpu/nvgpu/common/mm/lockless_allocator.c') 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) { struct nvgpu_lockless_allocator *pa = a->priv; int head, ret; - u64 cur_idx, rem; + u64 cur_idx; cur_idx = addr - pa->base; - rem = do_div(cur_idx, pa->blk_size); while (1) { head = ACCESS_ONCE(pa->head); @@ -148,7 +147,7 @@ int nvgpu_lockless_allocator_init(struct gk20a *g, struct nvgpu_allocator *__a, int i; int err; int nr_nodes; - u64 count, rem; + u64 count; struct nvgpu_lockless_allocator *a; if (!blk_size) @@ -159,7 +158,6 @@ int nvgpu_lockless_allocator_init(struct gk20a *g, struct nvgpu_allocator *__a, * In order to control memory footprint, we require count < INT_MAX */ count = length; - rem = do_div(count, blk_size); if (!base || !count || count > INT_MAX) return -EINVAL; -- cgit v1.2.2