]> www.infradead.org Git - users/willy/xarray.git/commitdiff
drm/i915/gvt: rename range variable to stride
authorJani Nikula <jani.nikula@intel.com>
Fri, 7 Jun 2024 15:25:37 +0000 (18:25 +0300)
committerJani Nikula <jani.nikula@intel.com>
Fri, 14 Jun 2024 07:40:05 +0000 (10:40 +0300)
Range is a bit odd name for what really is stride. Rename. Switch to u32
while at it.

Cc: Zhenyu Wang <zhenyuw@linux.intel.com>
Cc: Zhi Wang <zhi.wang.linux@gmail.com>
Cc: intel-gvt-dev@lists.freedesktop.org
Reviewed-by: Zhi Wang <zhiwang@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/8b8d4acee15da07845ed1779d6856d5c3f50a132.1717773890.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/gvt/handlers.c

index 446df811611420d4e3fb8f236633ff6d26c6a456..084d62b3e6e83c0e603c79a3632b1b89b3c8d7f7 100644 (file)
@@ -886,12 +886,12 @@ static unsigned int calc_index(unsigned int offset, i915_reg_t _start,
        u32 start = i915_mmio_reg_offset(_start);
        u32 next = i915_mmio_reg_offset(_next);
        u32 end = i915_mmio_reg_offset(_end);
-       unsigned int range = next - start;
+       u32 stride = next - start;
 
        if (offset < start || offset > end)
                return INVALID_INDEX;
        offset -= start;
-       return offset / range;
+       return offset / stride;
 }
 
 #define FDI_RX_CTL_TO_PIPE(offset) \