From patchwork Fri Jun 7 10:51:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jani Nikula X-Patchwork-Id: 13689676 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B314DC27C53 for ; Fri, 7 Jun 2024 10:51:57 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2FF7810EBB1; Fri, 7 Jun 2024 10:51:57 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="PYhJ3gvs"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) by gabe.freedesktop.org (Postfix) with ESMTPS id D7BBF10EBB1; Fri, 7 Jun 2024 10:51:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1717757516; x=1749293516; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=h+DZEJlPOsUNPqJu0yGmIJNI0JvAMkJYYXC44pqnD9M=; b=PYhJ3gvsrJ2ZdVq9GrFgOdkOYHBio/pv5EF2gN5Yu26Tjm1rm/OPiUBg pIjWB2afT+rRy1NEwbwQNWeSD3I9zHWyA+g8ioHXC8kEEFP5FvM6yI2Jk YVGKYmbvZRYXpsynlbwp2tWKga8lI/AzsGOGBqkq5qfLcn3GXraM7QvDL xtF02k02Y4WhUGvaPnGQL7xRxzqV5g/PypUxYWFUz8+AL28qEt1WY9F1s niUVq4S7ZVESdolvRGLabMUxLDy6k9UZI8oj2pOfSm1cuh9bLbBGbZr/L ngLiQRpb2ecdbiwAtrtzViIPcJOidwDiHLKEmfkQtco+VRA+QFu5RmEyJ A==; X-CSE-ConnectionGUID: tpClYdr3TmafXzsFcGqytw== X-CSE-MsgGUID: FIHwm2GPQTypopSQCvzS7A== X-IronPort-AV: E=McAfee;i="6600,9927,11095"; a="39873287" X-IronPort-AV: E=Sophos;i="6.08,220,1712646000"; d="scan'208";a="39873287" Received: from orviesa009.jf.intel.com ([10.64.159.149]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jun 2024 03:51:55 -0700 X-CSE-ConnectionGUID: zPpQm9yvTDGQHjOc1ANRgQ== X-CSE-MsgGUID: ClkWoozrS+mh4KmzaT9bog== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,220,1712646000"; d="scan'208";a="38367222" Received: from cpetruta-mobl1.ger.corp.intel.com (HELO localhost) ([10.245.246.72]) by orviesa009-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jun 2024 03:51:51 -0700 From: Jani Nikula To: intel-gfx@lists.freedesktop.org, intel-gvt-dev@lists.freedesktop.org Cc: rodrigo.vivi@intel.com, ville.syrjala@linux.intel.com, jani.nikula@intel.com, Zhenyu Wang , Zhi Wang Subject: [PATCH 3/6] drm/i915/gvt: rename range variable to stride Date: Fri, 7 Jun 2024 13:51:26 +0300 Message-Id: <5978d8139a99943e221845ce06a67c45e0472e84.1717757337.git.jani.nikula@intel.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Range is a bit odd name for what really is stride. Rename. Switch to u32 while at it. Cc: Zhenyu Wang Cc: Zhi Wang Cc: intel-gvt-dev@lists.freedesktop.org Signed-off-by: Jani Nikula --- 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) \