[PATCH v2 3/6] drm/i915/gvt: rename range variable to stride
Zhi Wang
zhiwang at kernel.org
Mon Jun 10 10:57:33 UTC 2024
On Fri, 7 Jun 2024 18:25:37 +0300
Jani Nikula <jani.nikula at intel.com> wrote:
> Range is a bit odd name for what really is stride. Rename. Switch to
> u32 while at it.
>
> Cc: Zhenyu Wang <zhenyuw at linux.intel.com>
> Cc: Zhi Wang <zhi.wang.linux at gmail.com>
> Cc: intel-gvt-dev at lists.freedesktop.org
> Signed-off-by: Jani Nikula <jani.nikula at intel.com>
> ---
> drivers/gpu/drm/i915/gvt/handlers.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gvt/handlers.c
> b/drivers/gpu/drm/i915/gvt/handlers.c index
> b005ab0104ee..f79dd6cfc75b 100644 ---
> a/drivers/gpu/drm/i915/gvt/handlers.c +++
> b/drivers/gpu/drm/i915/gvt/handlers.c @@ -887,12 +887,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) \
Reviewed-by: Zhi Wang <zhiwang at kernel.org>
More information about the Intel-gfx
mailing list