From: jsg Date: Sat, 15 Jun 2024 04:14:54 +0000 (+0000) Subject: i915: make inject_virtual_interrupt() void X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=94dcca7d9f99420138a8161847e9665a41156234;p=openbsd i915: make inject_virtual_interrupt() void From Christian Brauner e642622550c88c77c2134409351c237c59f9191e in linux-6.6.y/6.6.33 85884871921000b9bca2184077b1159771e50047 in mainline linux --- diff --git a/sys/dev/pci/drm/i915/gvt/interrupt.c b/sys/dev/pci/drm/i915/gvt/interrupt.c index 68eca023bbc..80301472ac9 100644 --- a/sys/dev/pci/drm/i915/gvt/interrupt.c +++ b/sys/dev/pci/drm/i915/gvt/interrupt.c @@ -405,7 +405,7 @@ static void init_irq_map(struct intel_gvt_irq *irq) #define MSI_CAP_DATA(offset) (offset + 8) #define MSI_CAP_EN 0x1 -static int inject_virtual_interrupt(struct intel_vgpu *vgpu) +static void inject_virtual_interrupt(struct intel_vgpu *vgpu) { unsigned long offset = vgpu->gvt->device_info.msi_cap_offset; u16 control, data; @@ -417,10 +417,10 @@ static int inject_virtual_interrupt(struct intel_vgpu *vgpu) /* Do not generate MSI if MSIEN is disabled */ if (!(control & MSI_CAP_EN)) - return 0; + return; if (WARN(control & GENMASK(15, 1), "only support one MSI format\n")) - return -EINVAL; + return; trace_inject_msi(vgpu->id, addr, data); @@ -434,10 +434,9 @@ static int inject_virtual_interrupt(struct intel_vgpu *vgpu) * returned and don't inject interrupt into guest. */ if (!test_bit(INTEL_VGPU_STATUS_ATTACHED, vgpu->status)) - return -ESRCH; - if (vgpu->msi_trigger && eventfd_signal(vgpu->msi_trigger, 1) != 1) - return -EFAULT; - return 0; + return; + if (vgpu->msi_trigger) + eventfd_signal(vgpu->msi_trigger, 1); } static void propagate_event(struct intel_gvt_irq *irq,