[PATCH] drm/i915/gem: Remove unnecessary cast

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The cast from "long" to "unsigned long" is unnecessary. Remove
it.

In this case, the variables "start" and "end" are of type long
because they need to account for the possibility of negative
values. However, they are subsequently moved to "unsigned long"
since addresses are typically handled as unsigned values.

Signed-off-by: Andi Shyti <andi.shyti@xxxxxxxxxxxxxxx>
---
 drivers/gpu/drm/i915/gem/i915_gem_mman.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/gem/i915_gem_mman.c b/drivers/gpu/drm/i915/gem/i915_gem_mman.c
index e9b2424156f0..80528ba90a56 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_mman.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_mman.c
@@ -323,8 +323,8 @@ static void set_address_limits(struct vm_area_struct *area,
 	end = min_t(long, end, vm_end);
 
 	/* Let's move back into the "<< PAGE_SHIFT" domain */
-	*start_vaddr = (unsigned long)start << PAGE_SHIFT;
-	*end_vaddr = (unsigned long)end << PAGE_SHIFT;
+	*start_vaddr = start << PAGE_SHIFT;
+	*end_vaddr = end << PAGE_SHIFT;
 
 	*pfn = (gmadr_start + i915_ggtt_offset(vma)) >> PAGE_SHIFT;
 	*pfn += (*start_vaddr - area->vm_start) >> PAGE_SHIFT;
-- 
2.45.2




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux