qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: marcandre.lureau@redhat.com
To: qemu-devel@nongnu.org
Cc: "Marc-André Lureau" <marcandre.lureau@redhat.com>,
	kraxel@redhat.com, fziglio@redhat.com
Subject: [PATCH] spice: remove obsolete callback
Date: Fri, 18 Sep 2020 14:07:37 +0400	[thread overview]
Message-ID: <20200918100737.91646-1-marcandre.lureau@redhat.com> (raw)

From: Marc-André Lureau <marcandre.lureau@redhat.com>

The "attach_worker" callbacks aren't doing anything in QEMU, but they
were mandatory until Spice server commit
6aa1a17c69dc3cc02f338a78b3266e4c00ea1c1a ("spice-qxl: Remove QXLWorker
definition").

Furthermore, the old spelling is deprecated since commit
974692bda1e77af92b71ed43b022439448492cb9 ("spice-qxl: Fix typo in
callback name and remove obsolete parameter")

Compile that code out if Spice server version is recent enough.

Fix compiler deprecation warnings with Spice > 0.14.3 (not released
yet). We may want to wait until newer version is actually released to
apply the patch.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 hw/display/qxl.c   | 4 ++++
 ui/spice-display.c | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/hw/display/qxl.c b/hw/display/qxl.c
index 11871340e7..a02072dee0 100644
--- a/hw/display/qxl.c
+++ b/hw/display/qxl.c
@@ -518,12 +518,14 @@ static int qxl_track_command(PCIQXLDevice *qxl, struct QXLCommandExt *ext)
 
 /* spice display interface callbacks */
 
+#if SPICE_SERVER_VERSION < 0x000e04 /* release 0.14.4 */
 static void interface_attach_worker(QXLInstance *sin, QXLWorker *qxl_worker)
 {
     PCIQXLDevice *qxl = container_of(sin, PCIQXLDevice, ssd.qxl);
 
     trace_qxl_interface_attach_worker(qxl->id);
 }
+#endif
 
 static void interface_set_compression_level(QXLInstance *sin, int level)
 {
@@ -1156,7 +1158,9 @@ static const QXLInterface qxl_interface = {
     .base.major_version      = SPICE_INTERFACE_QXL_MAJOR,
     .base.minor_version      = SPICE_INTERFACE_QXL_MINOR,
 
+#if SPICE_SERVER_VERSION < 0x000e04 /* release 0.14.4 */
     .attache_worker          = interface_attach_worker,
+#endif
     .set_compression_level   = interface_set_compression_level,
 #if SPICE_NEEDS_SET_MM_TIME
     .set_mm_time             = interface_set_mm_time,
diff --git a/ui/spice-display.c b/ui/spice-display.c
index 19632fdf6c..811936ff7f 100644
--- a/ui/spice-display.c
+++ b/ui/spice-display.c
@@ -500,10 +500,12 @@ void qemu_spice_display_refresh(SimpleSpiceDisplay *ssd)
 
 /* spice display interface callbacks */
 
+#if SPICE_SERVER_VERSION < 0x000e04 /* release 0.14.4 */
 static void interface_attach_worker(QXLInstance *sin, QXLWorker *qxl_worker)
 {
     /* nothing to do */
 }
+#endif
 
 static void interface_set_compression_level(QXLInstance *sin, int level)
 {
@@ -709,7 +711,9 @@ static const QXLInterface dpy_interface = {
     .base.major_version      = SPICE_INTERFACE_QXL_MAJOR,
     .base.minor_version      = SPICE_INTERFACE_QXL_MINOR,
 
+#if SPICE_SERVER_VERSION < 0x000e04 /* release 0.14.4 */
     .attache_worker          = interface_attach_worker,
+#endif
     .set_compression_level   = interface_set_compression_level,
 #if SPICE_NEEDS_SET_MM_TIME
     .set_mm_time             = interface_set_mm_time,
-- 
2.26.2



             reply	other threads:[~2020-09-18 10:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-18 10:07 marcandre.lureau [this message]
2020-09-18 10:19 ` [PATCH] spice: remove obsolete callback Philippe Mathieu-Daudé
2020-09-18 11:24 ` Frediano Ziglio
2020-09-21  8:02 ` Gerd Hoffmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200918100737.91646-1-marcandre.lureau@redhat.com \
    --to=marcandre.lureau@redhat.com \
    --cc=fziglio@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).