mirror of
https://github.com/torvalds/linux.git
synced 2026-05-31 02:24:24 +02:00
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
This commit is contained in:
parent
7a356ee5cf
commit
f80fb92174
|
|
@ -58,7 +58,7 @@ int intel_vgpu_gpa_to_mmio_offset(struct intel_vgpu *vgpu, u64 gpa)
|
|||
}
|
||||
|
||||
#define reg_is_mmio(gvt, reg) \
|
||||
(reg >= 0 && reg < gvt->device_info.mmio_size)
|
||||
(reg < gvt->device_info.mmio_size)
|
||||
|
||||
#define reg_is_gtt(gvt, reg) \
|
||||
(reg >= gvt->device_info.gtt_start_offset \
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user