diff options
Diffstat (limited to 'drivers/gpu/nvgpu')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a_allocator.h | 2 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a_allocator_bitmap.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a_allocator.h b/drivers/gpu/nvgpu/gk20a/gk20a_allocator.h index 26612bf9..f3b6dab3 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a_allocator.h +++ b/drivers/gpu/nvgpu/gk20a/gk20a_allocator.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2011-2015, NVIDIA CORPORATION. All rights reserved. | 2 | * Copyright (c) 2011-2016, NVIDIA CORPORATION. All rights reserved. |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify it | 4 | * This program is free software; you can redistribute it and/or modify it |
5 | * under the terms and conditions of the GNU General Public License, | 5 | * under the terms and conditions of the GNU General Public License, |
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a_allocator_bitmap.c b/drivers/gpu/nvgpu/gk20a/gk20a_allocator_bitmap.c index 2ddabc62..29f52081 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a_allocator_bitmap.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a_allocator_bitmap.c | |||
@@ -285,7 +285,7 @@ static void gk20a_bitmap_free(struct gk20a_allocator *__a, u64 addr) | |||
285 | blks = alloc->length >> a->blk_shift; | 285 | blks = alloc->length >> a->blk_shift; |
286 | 286 | ||
287 | bitmap_clear(a->bitmap, offs, blks); | 287 | bitmap_clear(a->bitmap, offs, blks); |
288 | alloc_dbg(__a, "Free 0x%-10llx \n", addr); | 288 | alloc_dbg(__a, "Free 0x%-10llx\n", addr); |
289 | 289 | ||
290 | a->bytes_freed += alloc->length; | 290 | a->bytes_freed += alloc->length; |
291 | 291 | ||
@@ -400,7 +400,7 @@ int gk20a_bitmap_allocator_init(struct gk20a_allocator *__a, | |||
400 | a->bit_offs = a->base >> a->blk_shift; | 400 | a->bit_offs = a->base >> a->blk_shift; |
401 | a->flags = flags; | 401 | a->flags = flags; |
402 | 402 | ||
403 | a->bitmap = kzalloc(sizeof(*a->bitmap) * BITS_TO_LONGS(a->num_bits), | 403 | a->bitmap = kcalloc(BITS_TO_LONGS(a->num_bits), sizeof(*a->bitmap), |
404 | GFP_KERNEL); | 404 | GFP_KERNEL); |
405 | if (!a->bitmap) | 405 | if (!a->bitmap) |
406 | goto fail; | 406 | goto fail; |