From patchwork Wed Nov 22 12:48:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Brauner X-Patchwork-Id: 13464773 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id DB43FC61D9B for ; Wed, 22 Nov 2023 12:49:22 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6F9D06B056D; Wed, 22 Nov 2023 07:49:22 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 6A9676B0575; Wed, 22 Nov 2023 07:49:22 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 54A8D6B0573; Wed, 22 Nov 2023 07:49:22 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 3909C6B0575 for ; Wed, 22 Nov 2023 07:49:22 -0500 (EST) Received: from smtpin24.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 0DB691CAB79 for ; Wed, 22 Nov 2023 12:49:22 +0000 (UTC) X-FDA: 81485570964.24.70A045F Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf10.hostedemail.com (Postfix) with ESMTP id 62302C0021; Wed, 22 Nov 2023 12:49:19 +0000 (UTC) Authentication-Results: imf10.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=AqfJxO8X; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf10.hostedemail.com: domain of brauner@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=brauner@kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1700657359; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=u5lBAXS5xavBvDM44lddetfuBKoasxPVwxU8ERfFBHA=; b=MwckMpF1m9iJ+YT8zV6fps8tQ37xrIWz4iS6nIuBbfh4Lw6E2HV5EfwavQacvlfJ75W06R +KTLmstYH+PjljOhcMcKTmBft+90V6ntwLKfboDD8pFKZyhoB3Xs+/pLSCzXh5npiXrySQ 4SVc2xQOrdU607yzxnhJQSxag04U4Cc= ARC-Authentication-Results: i=1; imf10.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=AqfJxO8X; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf10.hostedemail.com: domain of brauner@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=brauner@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1700657359; a=rsa-sha256; cv=none; b=Ez8Klq3QyusgrlV/enmB4v2tP3BZocDtVPwIi/lQbVYh8czDuL7f0efKHups3E+auETukG MMv5/58PSzDbD7cXFFEGf/7x9MxmHSNx48bKxwDnZIH/rCrFOmeek9mz3djBfA1gDyxvwz UthImmvKSpT6GzzIyi36Jv0HVxlKzJU= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 58AFD61DC7; Wed, 22 Nov 2023 12:49:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DD60AC433C9; Wed, 22 Nov 2023 12:49:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700657358; bh=7uZiA7BV1EHvD8gDrmgEuc8Q4gkEdBarx0UpVsG1vNg=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=AqfJxO8XzZeGNu0mtpcXDTCSFRPOo0SlhhHv/QC0WO3Obsw0j2/dU4c4FuBQrd/OP DbFK2NJl7j4VWDGp+SPsJ2YNue2rd7Zmwi8E3gfCSqgH9n/YLMrRNAlGE6SQVlsU23 vXqTRkoNBWRDxjRECNLDuPkVcLRsFUNxMuqqdeQsDkcrKlrPNXno9qOAJ6oepLCP+d LXmPkukb1d8ai5dg0mrA/uqMeYv4stTQeV+VB3b1YYMaJJmaWGgihfWA/lNr2WTu1/ 7/ZBuqxZhiJUisLEqasZPLQquM1tLv/D5upbL8C3NSwCaFqd+c3rIUmaf4Nu5T4QBL r9gfOpX5Qg0Tw== From: Christian Brauner Date: Wed, 22 Nov 2023 13:48:22 +0100 Subject: [PATCH v2 1/4] i915: make inject_virtual_interrupt() void MIME-Version: 1.0 Message-Id: <20231122-vfs-eventfd-signal-v2-1-bd549b14ce0c@kernel.org> References: <20231122-vfs-eventfd-signal-v2-0-bd549b14ce0c@kernel.org> In-Reply-To: <20231122-vfs-eventfd-signal-v2-0-bd549b14ce0c@kernel.org> To: linux-fsdevel@vger.kernel.org Cc: Christoph Hellwig , Jan Kara , Vitaly Kuznetsov , Sean Christopherson , Paolo Bonzini , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, David Woodhouse , Paul Durrant , Oded Gabbay , Wu Hao , Tom Rix , Moritz Fischer , Xu Yilun , Zhenyu Wang , Zhi Wang , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Tvrtko Ursulin , David Airlie , Daniel Vetter , Leon Romanovsky , Jason Gunthorpe , Frederic Barrat , Andrew Donnellan , Arnd Bergmann , Greg Kroah-Hartman , Eric Farman , Matthew Rosato , Halil Pasic , Vineeth Vijayan , Peter Oberparleiter , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Tony Krowiak , Jason Herne , Harald Freudenberger , "Michael S. Tsirkin" , Jason Wang , Xuan Zhuo , Diana Craciun , Alex Williamson , Eric Auger , Fei Li , Benjamin LaHaise , Christian Brauner , Johannes Weiner , Michal Hocko , Roman Gushchin , Shakeel Butt , Muchun Song , Kirti Wankhede , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-fpga@vger.kernel.org, intel-gvt-dev@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, linux-rdma@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-usb@vger.kernel.org, virtualization@lists.linux-foundation.org, netdev@vger.kernel.org, linux-aio@kvack.org, cgroups@vger.kernel.org, linux-mm@kvack.org, Jens Axboe , Pavel Begunkov , io-uring@vger.kernel.org X-Mailer: b4 0.13-dev-26615 X-Developer-Signature: v=1; a=openpgp-sha256; l=1755; i=brauner@kernel.org; h=from:subject:message-id; bh=7uZiA7BV1EHvD8gDrmgEuc8Q4gkEdBarx0UpVsG1vNg=; b=owGbwMvMwCU28Zj0gdSKO4sYT6slMaTG/lijOaknSTlcRJzPILDJVd/TRk51g3yQX9PrhU6dq 73z7mzoKGVhEONikBVTZHFoNwmXW85TsdkoUwNmDisTyBAGLk4BmIggF8P/skrZDdMFRVfP+ti2 XjtpR/st0cgfoZuOF904N6NM/+fZTYwMt20s3h3lyVj0+C63y4d/387vnKA8ry7MYWFejO+c6q/ /mAE= X-Developer-Key: i=brauner@kernel.org; a=openpgp; fpr=4880B8C9BD0E5106FC070F4F7B3C391EFEA93624 X-Rspamd-Queue-Id: 62302C0021 X-Rspam-User: X-Rspamd-Server: rspam04 X-Stat-Signature: 3g8aw191bas9j3itzxanqja1pwczyix6 X-HE-Tag: 1700657359-245642 X-HE-Meta: U2FsdGVkX1+BqPjW/1YSadA610aDCcR7McQc4MPWhAo5c4hZUiBOqDY53RjSAeYSpcQ1f3FHsa2yUdYK45D2payTCPuWKGDNzIpVDKTQuJ0By5w3Dapdk0XpoAhTnY9LXQCiOrLhqy6pFRcgT527aO2BQiOgerQaBa0z4grnwfQJPYGaAlWiQplalK/w4WhEEBtCJrMMmH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D/BFDaVNKOXTwZrLHOBi4JKKRdi03JdOU+C1k4iuiaq9AOagA11uYlXCoJKW9bOVSWIUUpGjkz3r9bnkQtIeyaBv+6qu85K9hEQ== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: The single caller of inject_virtual_interrupt() ignores the return value anyway. This allows us to simplify eventfd_signal() in follow-up patches. Signed-off-by: Christian Brauner Reviewed-by: Jan Kara Reviewed-by: Zhenyu Wang --- drivers/gpu/drm/i915/gvt/interrupt.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/i915/gvt/interrupt.c b/drivers/gpu/drm/i915/gvt/interrupt.c index de3f5903d1a7..9665876b4b13 100644 --- a/drivers/gpu/drm/i915/gvt/interrupt.c +++ b/drivers/gpu/drm/i915/gvt/interrupt.c @@ -422,7 +422,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; @@ -434,10 +434,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); @@ -451,10 +451,10 @@ 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) + return; + eventfd_signal(vgpu->msi_trigger, 1); } static void propagate_event(struct intel_gvt_irq *irq,