summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common/mm/bitmap_allocator.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/common/mm/bitmap_allocator.c')
-rw-r--r--drivers/gpu/nvgpu/common/mm/bitmap_allocator.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/nvgpu/common/mm/bitmap_allocator.c b/drivers/gpu/nvgpu/common/mm/bitmap_allocator.c
index 5316783d..1edfda51 100644
--- a/drivers/gpu/nvgpu/common/mm/bitmap_allocator.c
+++ b/drivers/gpu/nvgpu/common/mm/bitmap_allocator.c
@@ -378,7 +378,7 @@ int nvgpu_bitmap_allocator_init(struct gk20a *g, struct nvgpu_allocator *na,
378 int err; 378 int err;
379 struct nvgpu_bitmap_allocator *a; 379 struct nvgpu_bitmap_allocator *a;
380 380
381 if (WARN_ON(blk_size & (blk_size - 1))) { 381 if (WARN_ON(blk_size & (blk_size - 1U))) {
382 return -EINVAL; 382 return -EINVAL;
383 } 383 }
384 384
@@ -386,12 +386,12 @@ int nvgpu_bitmap_allocator_init(struct gk20a *g, struct nvgpu_allocator *na,
386 * blk_size must be a power-of-2; base length also need to be aligned 386 * blk_size must be a power-of-2; base length also need to be aligned
387 * to blk_size. 387 * to blk_size.
388 */ 388 */
389 if (blk_size & (blk_size - 1) || 389 if (blk_size & (blk_size - 1U) ||
390 base & (blk_size - 1) || length & (blk_size - 1)) { 390 base & (blk_size - 1U) || length & (blk_size - 1U)) {
391 return -EINVAL; 391 return -EINVAL;
392 } 392 }
393 393
394 if (base == 0) { 394 if (base == 0U) {
395 base = blk_size; 395 base = blk_size;
396 length -= blk_size; 396 length -= blk_size;
397 } 397 }