]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/i915/gvt: Remove unnecessary check in reg_is_mmio
authorJonathan Cavitt <jonathan.cavitt@intel.com>
Tue, 16 Sep 2025 17:43:19 +0000 (17:43 +0000)
committerAndi Shyti <andi.shyti@linux.intel.com>
Thu, 18 Sep 2025 11:07:05 +0000 (13:07 +0200)
commitf80fb921747b46d3e65887099977e457fba7256a
treedf09a3f527e8a03443817de0079f4e7c6f9f5572
parent7a356ee5cf6dad1c7d305eea261a03a925454ed6
drm/i915/gvt: Remove unnecessary check in reg_is_mmio

The reg >= 0 check in reg_is_mmio is unnecessary because reg is always
greater than zero in all current use cases.  This is obvious when
checking 'offset' by itself (as offset is defined as an unsigned
integer), but it's also true for the offset + bytes - 1 use case in
intel_vgpu_emulate_mmio_read because bytes > 0.

Signed-off-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>
Reviewed-by: Zhenyu Wang <zhenyuw.linux@gmail.com>
Signed-off-by: Andi Shyti <andi.shyti@linux.intel.com>
Link: https://lore.kernel.org/r/20250916174317.76521-5-jonathan.cavitt@intel.com
drivers/gpu/drm/i915/gvt/mmio.c