Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp1156127rdf; Wed, 22 Nov 2023 07:05:35 -0800 (PST) X-Google-Smtp-Source: AGHT+IEFVB8oMuuu75hVGhA2QQvSuFAEZ6iSfudN7yHFhGUm6ul3KjnFlgp/sOX5Wy5VDHX5884P X-Received: by 2002:a05:6808:11cb:b0:3b8:3a9d:7ef4 with SMTP id p11-20020a05680811cb00b003b83a9d7ef4mr3067745oiv.55.1700665535500; Wed, 22 Nov 2023 07:05:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700665535; cv=none; d=google.com; s=arc-20160816; b=Htj1qClDv+D4eia1E2ejm5iEXpl8+NmvTo+FLxjsA62sORUoU4aUImy3iy+qB5PoEw HVYparSlSwfWvd8sJBv3V9QALxNJvlj30YgwPQ6LkiZm3MBWuPheHq1EIY0xjV34NZ1S qtNusfe2oWrGnq4Hd4Su77UtnaTPH5W+ETC62S2zSfFDuPFQRfSfqh0L5TyGTkS1R7lB nJSICEQ3487oo0ON1HWMD7InhzWBR4L1OAw1M5j1KlKIYLLrehOxSbOQWkgdGH1Yxhou fPT2G45TcS1RIBbmu0WyLfWYpsUCvBa7CtStBwC8BAEpZZoVe/8wZa8TgOAe+ki9YAI8 xn0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=kiNIjoy22VhgtIuHBArgiaoyvsvGoNJHeARkzxhMWGY=; fh=o4Dq6GeO+YpuBESu7iIWE8q03XQ/heY11JZf4WM67Zs=; b=YgX5HxeoomFwfaQGx40sHP6viKhAOKaD3I+slgJMropQrOiq/8ih+N2xZzriQSb48M JMGPmFdusKvZIzVabQr/hS/AwPdrpLEueg7M9RMOs0+qsOJgJyr8LhxVS+WW+zbtww+l 7tjRXDaML8V+Ow6Qt7d+86yP3u+kNPw8erEY+5EOH0yJXZJdSnQLUgHbETyB6gQ4AQzJ 8luAa5PHCLzqUETSKAdUkI/e0HliY/bmkY6neyS9ufaxme6mMv92p6DCU4cAafwYF3X0 QfgvJOx4ngI680xtdadx5BbxYLmd27K5y//xR6MuBq2R/8bKJIeX27ARuhiPz+jAbJUR C48Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=gghhkSG4; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id w15-20020a0568080d4f00b003b84478d4fdsi220954oik.280.2023.11.22.07.05.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 07:05:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=gghhkSG4; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 413D38053C4D; Wed, 22 Nov 2023 07:05:25 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344295AbjKVPFR (ORCPT + 99 others); Wed, 22 Nov 2023 10:05:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39300 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232793AbjKVPFP (ORCPT ); Wed, 22 Nov 2023 10:05:15 -0500 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B951F19E; Wed, 22 Nov 2023 07:05:11 -0800 (PST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 962401F8D7; Wed, 22 Nov 2023 15:05:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1700665509; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=kiNIjoy22VhgtIuHBArgiaoyvsvGoNJHeARkzxhMWGY=; b=gghhkSG43KQIBBJGVUaWHWPez5aSJU2oWxN0I2xdIkHy4nT299HGHkEPzB5ju783UEdGub quQGKg0KLRMPxc924bp7I28UpnSbuczFPYoBfNJEla47Q0VzoDIda1+kyxPGX1KLh3kS2P Jr9MMfR+boGxUZF/uwCU5ZOK4WMlf80= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1700665509; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=kiNIjoy22VhgtIuHBArgiaoyvsvGoNJHeARkzxhMWGY=; b=ylDzK1dNfUswNgsV2CMCxU1vr72Y1bh7nO7MfzJ/ZCx/IAxOmdSUWmUdkcoayATrj7nzRj dFlzvSaj+6lPeYAw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 84B63139FD; Wed, 22 Nov 2023 15:05:09 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 4pvmH6UYXmUmGgAAMHmgww (envelope-from ); Wed, 22 Nov 2023 15:05:09 +0000 Received: by quack3.suse.cz (Postfix, from userid 1000) id E6C71A07DC; Wed, 22 Nov 2023 16:05:08 +0100 (CET) Date: Wed, 22 Nov 2023 16:05:08 +0100 From: Jan Kara To: Christian Brauner Cc: linux-fsdevel@vger.kernel.org, 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 , 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 Subject: Re: [PATCH v2 1/4] i915: make inject_virtual_interrupt() void Message-ID: <20231122150508.bdkhrdrhlyva7biz@quack3> References: <20231122-vfs-eventfd-signal-v2-0-bd549b14ce0c@kernel.org> <20231122-vfs-eventfd-signal-v2-1-bd549b14ce0c@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231122-vfs-eventfd-signal-v2-1-bd549b14ce0c@kernel.org> Authentication-Results: smtp-out2.suse.de; none X-Spam-Level: X-Spam-Score: -6.30 X-Spamd-Result: default: False [-6.30 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; BAYES_HAM(-3.00)[100.00%]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[text/plain]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_SIGNED(0.00)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; RCPT_COUNT_GT_50(0.00)[78]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; MID_RHS_NOT_FQDN(0.50)[]; FREEMAIL_CC(0.00)[vger.kernel.org,lst.de,suse.cz,redhat.com,google.com,linutronix.de,alien8.de,linux.intel.com,kernel.org,infradead.org,xen.org,intel.com,gmail.com,ffwll.ch,ziepe.ca,linux.ibm.com,arndb.de,linuxfoundation.org,linux.alibaba.com,oss.nxp.com,kvack.org,cmpxchg.org,linux.dev,nvidia.com,lists.freedesktop.org,lists.ozlabs.org,lists.linux-foundation.org,kernel.dk]; RCVD_COUNT_TWO(0.00)[2]; SUSPICIOUS_RECIPS(1.50)[] X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Wed, 22 Nov 2023 07:05:25 -0800 (PST) On Wed 22-11-23 13:48:22, Christian Brauner wrote: > 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 Looks good. Feel free to add: Reviewed-by: Jan Kara Honza > --- > 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, > > -- > 2.42.0 > -- Jan Kara SUSE Labs, CR