summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/gvt/gtt.c
diff options
context:
space:
mode:
authorXinyun Liu <xinyun.liu@intel.com>2018-06-07 17:48:41 +0300
committerZhenyu Wang <zhenyuw@linux.intel.com>2018-06-11 10:04:32 +0300
commit659571953d315b36204acac508ef8d477044d260 (patch)
treeb50834cfc6f23f9a6f7e3180b7be922ea96aeedc /drivers/gpu/drm/i915/gvt/gtt.c
parent1f1c60d5b577377d07863f3e0891e63a0a56a3ad (diff)
downloadlinux-659571953d315b36204acac508ef8d477044d260.tar.xz
drm/i915/gvt: removed unnecessary boundary check
type is already checked in the function entry. So it is unnecessary to check it again. Signed-off-by: Xinyun Liu <xinyun.liu@intel.com> Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Diffstat (limited to 'drivers/gpu/drm/i915/gvt/gtt.c')
-rw-r--r--drivers/gpu/drm/i915/gvt/gtt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/gvt/gtt.c b/drivers/gpu/drm/i915/gvt/gtt.c
index 78e55aafc8bc..49400ab129ff 100644
--- a/drivers/gpu/drm/i915/gvt/gtt.c
+++ b/drivers/gpu/drm/i915/gvt/gtt.c
@@ -1972,7 +1972,7 @@ static int alloc_scratch_pages(struct intel_vgpu *vgpu,
* GTT_TYPE_PPGTT_PDE_PT level pt, that means this scratch_pt it self
* is GTT_TYPE_PPGTT_PTE_PT, and full filled by scratch page mfn.
*/
- if (type > GTT_TYPE_PPGTT_PTE_PT && type < GTT_TYPE_MAX) {
+ if (type > GTT_TYPE_PPGTT_PTE_PT) {
struct intel_gvt_gtt_entry se;
memset(&se, 0, sizeof(struct intel_gvt_gtt_entry));