From nobody Mon Feb 9 17:37:32 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=quarantine dis=none) header.from=suse.com ARC-Seal: i=1; a=rsa-sha256; t=1651134499; cv=none; d=zohomail.com; s=zohoarc; b=Sv1Lm6bj0KJBCGYiobT4dWbMATluc7oWn2iko3Sp1juO60bTRaBDmumKGreS9udHdDkumiaZuoOups/3w8UggKOh/W1AvkvlGYlE8o7/qXSYW8f7D+r2Y7HQX1jxu9gl93OlNltX144S/mndwBhBbV1tpbb0T5ZxONAZTFuSIsE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1651134499; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=nqfEAJYikez5yuRaJWQFVEnr7bTvqklH6kJ7XEyZeH4=; b=R5jOqrL7WCmHW4CdhzXq/kUHCWzMrR/1p1a2B/6p4RXexIiWag4krlXabd6C7Oflax66q15eeGKsfUZ11K549hGgVS5jHFoVkdZq+OPODTVal6rwhc1Kja9NONZeNZRjXsFMAsGwnuL8EyO6YN+/rrII+TTdnO/pT7MZ3i2s8To= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1651134499008805.135122118954; Thu, 28 Apr 2022 01:28:19 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.316175.534995 (Exim 4.92) (envelope-from ) id 1njzVD-0006XV-20; Thu, 28 Apr 2022 08:27:55 +0000 Received: by outflank-mailman (output) from mailman id 316175.534995; Thu, 28 Apr 2022 08:27:54 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1njzVC-0006TJ-FI; Thu, 28 Apr 2022 08:27:54 +0000 Received: by outflank-mailman (input) for mailman id 316175; Thu, 28 Apr 2022 08:27:52 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1njzVA-0005SL-AB for xen-devel@lists.xenproject.org; Thu, 28 Apr 2022 08:27:52 +0000 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 16dea835-c6cd-11ec-a405-831a346695d4; Thu, 28 Apr 2022 10:27:49 +0200 (CEST) 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 804C41F8A8; Thu, 28 Apr 2022 08:27:49 +0000 (UTC) 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 4287913491; Thu, 28 Apr 2022 08:27:49 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id sDPlDgVQamIBLgAAMHmgww (envelope-from ); Thu, 28 Apr 2022 08:27:49 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 16dea835-c6cd-11ec-a405-831a346695d4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1651134469; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=nqfEAJYikez5yuRaJWQFVEnr7bTvqklH6kJ7XEyZeH4=; b=TYPIqdG6C2kNSXwfoxobkb0T7Qrlkecz89DW0NUUSRJk8G1Cl1McWKfb63f8rCvjK2Z1w9 hltCqgILrPkBWZf7D6lZQrTVsQ9bYGNjEQQXo2D58+bj+Zbr/uJommfLuFr/ZVITaGpYKs 3TdHSODcKkMVn6eBxvw3c05nJoauKJs= From: Juergen Gross To: xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org Cc: Juergen Gross , Oleksandr Andrushchenko , Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org Subject: [PATCH v2 06/19] xen/sound: switch xen_snd_front to use INVALID_GRANT_REF Date: Thu, 28 Apr 2022 10:27:30 +0200 Message-Id: <20220428082743.16593-7-jgross@suse.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220428082743.16593-1-jgross@suse.com> References: <20220428082743.16593-1-jgross@suse.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @suse.com) X-ZM-MESSAGEID: 1651134501083100003 Content-Type: text/plain; charset="utf-8" Instead of using a private macro for an invalid grant reference use the common one. Signed-off-by: Juergen Gross --- sound/xen/xen_snd_front_evtchnl.c | 4 ++-- sound/xen/xen_snd_front_evtchnl.h | 9 --------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/sound/xen/xen_snd_front_evtchnl.c b/sound/xen/xen_snd_front_ev= tchnl.c index ecbc294fc59a..3e21369c8216 100644 --- a/sound/xen/xen_snd_front_evtchnl.c +++ b/sound/xen/xen_snd_front_evtchnl.c @@ -167,7 +167,7 @@ static void evtchnl_free(struct xen_snd_front_info *fro= nt_info, xenbus_free_evtchn(front_info->xb_dev, channel->port); =20 /* End access and free the page. */ - if (channel->gref !=3D GRANT_INVALID_REF) + if (channel->gref !=3D INVALID_GRANT_REF) gnttab_end_foreign_access(channel->gref, page); else free_page(page); @@ -207,7 +207,7 @@ static int evtchnl_alloc(struct xen_snd_front_info *fro= nt_info, int index, channel->index =3D index; channel->front_info =3D front_info; channel->state =3D EVTCHNL_STATE_DISCONNECTED; - channel->gref =3D GRANT_INVALID_REF; + channel->gref =3D INVALID_GRANT_REF; page =3D get_zeroed_page(GFP_KERNEL); if (!page) { ret =3D -ENOMEM; diff --git a/sound/xen/xen_snd_front_evtchnl.h b/sound/xen/xen_snd_front_ev= tchnl.h index cbe51fd1ec15..3675fba70564 100644 --- a/sound/xen/xen_snd_front_evtchnl.h +++ b/sound/xen/xen_snd_front_evtchnl.h @@ -15,15 +15,6 @@ =20 struct xen_snd_front_info; =20 -#ifndef GRANT_INVALID_REF -/* - * FIXME: usage of grant reference 0 as invalid grant reference: - * grant reference 0 is valid, but never exposed to a PV driver, - * because of the fact it is already in use/reserved by the PV console. - */ -#define GRANT_INVALID_REF 0 -#endif - /* Timeout in ms to wait for backend to respond. */ #define VSND_WAIT_BACK_MS 3000 =20 --=20 2.34.1