From nobody Sat May 18 07:48:39 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1638909995167243.33743822354552; Tue, 7 Dec 2021 12:46:35 -0800 (PST) Received: from localhost ([::1]:58522 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1muhM9-0004Ap-TJ for importer@patchew.org; Tue, 07 Dec 2021 15:46:33 -0500 Received: from eggs.gnu.org ([209.51.188.92]:38552) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1muhHO-0006sY-Lv for qemu-devel@nongnu.org; Tue, 07 Dec 2021 15:41:39 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:50658) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1muhHM-0001Wp-Tc for qemu-devel@nongnu.org; Tue, 07 Dec 2021 15:41:38 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-324-pT4_Sfr7ON6pQVuYilrEPQ-1; Tue, 07 Dec 2021 15:41:30 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id AD94C1023F5F; Tue, 7 Dec 2021 20:41:27 +0000 (UTC) Received: from scv.redhat.com (unknown [10.22.11.33]) by smtp.corp.redhat.com (Postfix) with ESMTP id E8DB95D6CF; Tue, 7 Dec 2021 20:41:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1638909695; h=from:from: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; bh=nGhMs2Qe98OSIfJtMPS4gMxKSEzy7iiQCdZbOOhQCKQ=; b=g6M8J1ihTouQdlnPit1CzgpwlSYz1g887k+HvfD0e85fpZycDO3w+Ef1Uove7HJr4Pv9Pg tUoXM2sEgBdSXh1WkIBUOOKr7/keDVjBffdiqoB11Tkf89mWoK0Q1aH8RwDS04s5CuXxBp Qt/vqUbcpS3JfMGgVuoqfb97yRRJJj0= X-MC-Unique: pT4_Sfr7ON6pQVuYilrEPQ-1 From: John Snow To: qemu-devel@nongnu.org Subject: [PATCH v2 1/2] spice: Update QXLInterface for spice >= 0.15.0 Date: Tue, 7 Dec 2021 15:40:37 -0500 Message-Id: <20211207204038.664133-2-jsnow@redhat.com> In-Reply-To: <20211207204038.664133-1-jsnow@redhat.com> References: <20211207204038.664133-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=jsnow@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=jsnow@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -33 X-Spam_score: -3.4 X-Spam_bar: --- X-Spam_report: (-3.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.619, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Daniel Berrange , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Philippe Mathieu Daude , Gerd Hoffmann , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , John Snow Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1638909996764100001 Content-Type: text/plain; charset="utf-8" spice updated the spelling (and arguments) of "attache_worker" in 0.15.0. Update QEMU to match, preventing -Wdeprecated-declarations compilations from reporting build errors. See also: https://gitlab.freedesktop.org/spice/spice/-/commit/974692bda1e77af92b71ed4= 3b022439448492cb9 Signed-off-by: John Snow Acked-by: Gerd Hoffmann Reviewed-by: Daniel P. Berrang=C3=A9 --- include/ui/qemu-spice.h | 6 ++++++ hw/display/qxl.c | 14 +++++++++++++- ui/spice-display.c | 11 +++++++++++ 3 files changed, 30 insertions(+), 1 deletion(-) diff --git a/include/ui/qemu-spice.h b/include/ui/qemu-spice.h index 71ecd6cfd1..21fe195e18 100644 --- a/include/ui/qemu-spice.h +++ b/include/ui/qemu-spice.h @@ -40,6 +40,12 @@ int qemu_spice_migrate_info(const char *hostname, int po= rt, int tls_port, #define SPICE_NEEDS_SET_MM_TIME 0 #endif =20 +#if defined(SPICE_SERVER_VERSION) && (SPICE_SERVER_VERSION >=3D 0x000f00) +#define SPICE_HAS_ATTACHED_WORKER 1 +#else +#define SPICE_HAS_ATTACHED_WORKER 0 +#endif + #else /* CONFIG_SPICE */ =20 #include "qemu/error-report.h" diff --git a/hw/display/qxl.c b/hw/display/qxl.c index 29c80b4289..1da6703e44 100644 --- a/hw/display/qxl.c +++ b/hw/display/qxl.c @@ -517,13 +517,20 @@ static int qxl_track_command(PCIQXLDevice *qxl, struc= t QXLCommandExt *ext) =20 /* spice display interface callbacks */ =20 -static void interface_attach_worker(QXLInstance *sin, QXLWorker *qxl_worke= r) +static void interface_attached_worker(QXLInstance *sin) { PCIQXLDevice *qxl =3D container_of(sin, PCIQXLDevice, ssd.qxl); =20 trace_qxl_interface_attach_worker(qxl->id); } =20 +#if !(SPICE_HAS_ATTACHED_WORKER) +static void interface_attach_worker(QXLInstance *sin, QXLWorker *qxl_worke= r) +{ + interface_attached_worker(sin); +} +#endif + static void interface_set_compression_level(QXLInstance *sin, int level) { PCIQXLDevice *qxl =3D container_of(sin, PCIQXLDevice, ssd.qxl); @@ -1131,7 +1138,12 @@ static const QXLInterface qxl_interface =3D { .base.major_version =3D SPICE_INTERFACE_QXL_MAJOR, .base.minor_version =3D SPICE_INTERFACE_QXL_MINOR, =20 +#if SPICE_HAS_ATTACHED_WORKER + .attached_worker =3D interface_attached_worker, +#else .attache_worker =3D interface_attach_worker, +#endif + .set_compression_level =3D interface_set_compression_level, #if SPICE_NEEDS_SET_MM_TIME .set_mm_time =3D interface_set_mm_time, diff --git a/ui/spice-display.c b/ui/spice-display.c index f59c69882d..1a60cebb7d 100644 --- a/ui/spice-display.c +++ b/ui/spice-display.c @@ -500,10 +500,17 @@ void qemu_spice_display_refresh(SimpleSpiceDisplay *s= sd) =20 /* spice display interface callbacks */ =20 +#if SPICE_HAS_ATTACHED_WORKER +static void interface_attached_worker(QXLInstance *sin) +{ + /* nothing to do */ +} +#else static void interface_attach_worker(QXLInstance *sin, QXLWorker *qxl_worke= r) { /* nothing to do */ } +#endif =20 static void interface_set_compression_level(QXLInstance *sin, int level) { @@ -702,7 +709,11 @@ static const QXLInterface dpy_interface =3D { .base.major_version =3D SPICE_INTERFACE_QXL_MAJOR, .base.minor_version =3D SPICE_INTERFACE_QXL_MINOR, =20 +#if SPICE_HAS_ATTACHED_WORKER + .attached_worker =3D interface_attached_worker, +#else .attache_worker =3D interface_attach_worker, +#endif .set_compression_level =3D interface_set_compression_level, #if SPICE_NEEDS_SET_MM_TIME .set_mm_time =3D interface_set_mm_time, --=20 2.31.1 From nobody Sat May 18 07:48:39 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1638909895878697.8118403190393; Tue, 7 Dec 2021 12:44:55 -0800 (PST) Received: from localhost ([::1]:55476 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1muhKY-00023A-Pp for importer@patchew.org; Tue, 07 Dec 2021 15:44:54 -0500 Received: from eggs.gnu.org ([209.51.188.92]:38550) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1muhHO-0006sV-KX for qemu-devel@nongnu.org; Tue, 07 Dec 2021 15:41:39 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:51352) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1muhHM-0001X5-RT for qemu-devel@nongnu.org; Tue, 07 Dec 2021 15:41:38 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-524-pkgDj18zMSaW0iFm_mE37Q-1; Tue, 07 Dec 2021 15:41:33 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 59F5C347AA; Tue, 7 Dec 2021 20:41:28 +0000 (UTC) Received: from scv.redhat.com (unknown [10.22.11.33]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2A6EC56A84; Tue, 7 Dec 2021 20:41:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1638909696; h=from:from: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; bh=jcvDFRD7wH73IBrzFUVypp8m7aFaIeCDOjPBTV5Wx8g=; b=BsczS+yCiLemRRVI4rWNXJHCmDS7idldk1fsll9Cgt9ekoSCdF3LR/poP08l/Xhx3WsKUa W5Z5ksKcMx4oDCdf73NFjiTAlk1JAkAVs+MfPZsfGh+hETJmwv/LlunAKmL/u1Z9ak2B0g F1LI9JllaqPmyDEzWYIuZ1Su9AIUxr4= X-MC-Unique: pkgDj18zMSaW0iFm_mE37Q-1 From: John Snow To: qemu-devel@nongnu.org Subject: [PATCH v2 2/2] ui/clipboard: Don't use g_autoptr just to free a variable Date: Tue, 7 Dec 2021 15:40:38 -0500 Message-Id: <20211207204038.664133-3-jsnow@redhat.com> In-Reply-To: <20211207204038.664133-1-jsnow@redhat.com> References: <20211207204038.664133-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=jsnow@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=jsnow@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -33 X-Spam_score: -3.4 X-Spam_bar: --- X-Spam_report: (-3.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.619, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Daniel Berrange , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Philippe Mathieu Daude , Gerd Hoffmann , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , John Snow Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1638909897641100001 Content-Type: text/plain; charset="utf-8" Clang doesn't recognize that the variable is being "used" and will emit a warning: ../ui/clipboard.c:47:34: error: variable 'old' set but not used [-Werror,= -Wunused-but-set-variable] g_autoptr(QemuClipboardInfo) old =3D NULL; ^ 1 error generated. OK, fine. Just do things the old way. Signed-off-by: John Snow Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- ui/clipboard.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ui/clipboard.c b/ui/clipboard.c index d7b008d62a..9ab65efefb 100644 --- a/ui/clipboard.c +++ b/ui/clipboard.c @@ -44,12 +44,11 @@ void qemu_clipboard_peer_release(QemuClipboardPeer *pee= r, =20 void qemu_clipboard_update(QemuClipboardInfo *info) { - g_autoptr(QemuClipboardInfo) old =3D NULL; assert(info->selection < QEMU_CLIPBOARD_SELECTION__COUNT); =20 notifier_list_notify(&clipboard_notifiers, info); =20 - old =3D cbinfo[info->selection]; + g_free(cbinfo[info->selection]); cbinfo[info->selection] =3D qemu_clipboard_info_ref(info); } =20 --=20 2.31.1