Skip to contentSkip to conversation

spice: remove QXLWorker interface field

PATCH In review Frediano Ziglio 2 participants 10 messages Nov 22, 2017 – Jan 12, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 spice: remove QXLWorker interface field

This fields points to an old interface that is no more used in the current code.

---
 hw/display/qxl.c           | 1 -
 include/ui/spice-display.h | 1 -
 ui/spice-display.c         | 2 --
 3 files changed, 4 deletions(-)
hw/display/qxl.c +0 -1
index 99365c3e8f..b9fa067f6e 100644
@@ -518,7 +518,6 @@ 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);
-    qxl->ssd.worker = qxl_worker;
 }
 
 static void interface_set_compression_level(QXLInstance *sin, int level)
include/ui/spice-display.h +0 -1
index aaf2019889..6b5c73b21c 100644
@@ -86,7 +86,6 @@ struct SimpleSpiceDisplay {
     DisplayChangeListener dcl;
     void *buf;
     int bufsize;
-    QXLWorker *worker;
     QXLInstance qxl;
     uint32_t unique;
     pixman_image_t *surface;
ui/spice-display.c +0 -2
index ad1ceafb3f..85a72fe76a 100644
@@ -519,7 +519,6 @@ static void interface_attach_worker(QXLInstance *sin, QXLWorker *qxl_worker)
     SimpleSpiceDisplay *ssd = container_of(sin, SimpleSpiceDisplay, qxl);
 
     dprint(1, "%s/%d:\n", __func__, ssd->qxl.id);
-    ssd->worker = qxl_worker;
 }
 
 static void interface_set_compression_level(QXLInstance *sin, int level)
@@ -1028,7 +1027,6 @@ static void qemu_spice_display_init_one(QemuConsole *con)
 
     ssd->qxl.base.sif = &dpy_interface.base;
     qemu_spice_add_display_interface(&ssd->qxl, con);
-    assert(ssd->worker);
     qemu_spice_create_host_memslot(ssd);
 
     register_displaychangelistener(&ssd->dcl);
Signature · 1 line
2.14.3
#1 lore raw

PATCH 2/4 spice: remove unused watch list

---
 ui/spice-core.c | 4 ----
 1 file changed, 4 deletions(-)
ui/spice-core.c +0 -4
index ea04dc69b5..85b9ea2127 100644
@@ -92,9 +92,7 @@ struct SpiceWatch {
     int event_mask;
     SpiceWatchFunc func;
     void *opaque;
-    QTAILQ_ENTRY(SpiceWatch) next;
 };
-static QTAILQ_HEAD(, SpiceWatch) watches = QTAILQ_HEAD_INITIALIZER(watches);
 
 static void watch_read(void *opaque)
 {
@@ -131,7 +129,6 @@ static SpiceWatch *watch_add(int fd, int event_mask, SpiceWatchFunc func, void *
     watch->fd     = fd;
     watch->func   = func;
     watch->opaque = opaque;
-    QTAILQ_INSERT_TAIL(&watches, watch, next);
 
     watch_update_mask(watch, event_mask);
     return watch;
@@ -140,7 +137,6 @@ static SpiceWatch *watch_add(int fd, int event_mask, SpiceWatchFunc func, void *
 static void watch_remove(SpiceWatch *watch)
 {
     qemu_set_fd_handler(watch->fd, NULL, NULL, NULL);
-    QTAILQ_REMOVE(&watches, watch, next);
     g_free(watch);
 }
 
Signature · 1 line
2.14.3
#2 lore raw

PATCH 3/4 spice: remove only written event_mask field

In reply to Frediano Ziglio
---
 ui/spice-core.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
ui/spice-core.c +2 -4
index 85b9ea2127..6d579faaae 100644
@@ -89,7 +89,6 @@ static void timer_remove(SpiceTimer *timer)
 
 struct SpiceWatch {
     int fd;
-    int event_mask;
     SpiceWatchFunc func;
     void *opaque;
 };
@@ -111,11 +110,10 @@ static void watch_update_mask(SpiceWatch *watch, int event_mask)
     IOHandler *on_read = NULL;
     IOHandler *on_write = NULL;
 
-    watch->event_mask = event_mask;
-    if (watch->event_mask & SPICE_WATCH_EVENT_READ) {
+    if (event_mask & SPICE_WATCH_EVENT_READ) {
         on_read = watch_read;
     }
-    if (watch->event_mask & SPICE_WATCH_EVENT_WRITE) {
+    if (event_mask & SPICE_WATCH_EVENT_WRITE) {
         on_write = watch_write;
     }
     qemu_set_fd_handler(watch->fd, on_read, on_write, watch);
Signature · 1 line
2.14.3
#3 lore raw

PATCH 4/4 spice: remove unused timer list

In reply to Frediano Ziglio
---
 ui/spice-core.c | 4 ----
 1 file changed, 4 deletions(-)
ui/spice-core.c +0 -4
index 6d579faaae..2baf0c7120 100644
@@ -55,9 +55,7 @@ static QemuThread me;
 
 struct SpiceTimer {
     QEMUTimer *timer;
-    QTAILQ_ENTRY(SpiceTimer) next;
 };
-static QTAILQ_HEAD(, SpiceTimer) timers = QTAILQ_HEAD_INITIALIZER(timers);
 
 static SpiceTimer *timer_add(SpiceTimerFunc func, void *opaque)
 {
@@ -65,7 +63,6 @@ static SpiceTimer *timer_add(SpiceTimerFunc func, void *opaque)
 
     timer = g_malloc0(sizeof(*timer));
     timer->timer = timer_new_ms(QEMU_CLOCK_REALTIME, func, opaque);
-    QTAILQ_INSERT_TAIL(&timers, timer, next);
     return timer;
 }
 
@@ -83,7 +80,6 @@ static void timer_remove(SpiceTimer *timer)
 {
     timer_del(timer->timer);
     timer_free(timer->timer);
-    QTAILQ_REMOVE(&timers, timer, next);
     g_free(timer);
 }
 
Signature · 1 line
2.14.3
#4 lore raw
In reply to Frediano Ziglio

ping the series

Quoted 58 lines

This fields points to an old interface that is no more used in the current code.

---
 hw/display/qxl.c           | 1 -
 include/ui/spice-display.h | 1 -
 ui/spice-display.c         | 2 --
 3 files changed, 4 deletions(-)
hw/display/qxl.c +0 -1
index 99365c3e8f..b9fa067f6e 100644
@@ -518,7 +518,6 @@ 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);
-    qxl->ssd.worker = qxl_worker;
 }
 

static void interface_set_compression_level(QXLInstance *sin, int level)

include/ui/spice-display.h +0 -1
index aaf2019889..6b5c73b21c 100644
@@ -86,7 +86,6 @@ struct SimpleSpiceDisplay {
     DisplayChangeListener dcl;
     void *buf;
     int bufsize;
-    QXLWorker *worker;
     QXLInstance qxl;
     uint32_t unique;
     pixman_image_t *surface;
ui/spice-display.c +0 -1
index ad1ceafb3f..85a72fe76a 100644
@@ -519,7 +519,6 @@ static void interface_attach_worker(QXLInstance *sin,
 QXLWorker *qxl_worker)
     SimpleSpiceDisplay *ssd = container_of(sin, SimpleSpiceDisplay, qxl);
 
     dprint(1, "%s/%d:\n", __func__, ssd->qxl.id);
-    ssd->worker = qxl_worker;
 }
 

static void interface_set_compression_level(QXLInstance *sin, int level)

ui/spice-display.c +0 -1
@@ -1028,7 +1027,6 @@ static void qemu_spice_display_init_one(QemuConsole
 *con)
 
     ssd->qxl.base.sif = &dpy_interface.base;
     qemu_spice_add_display_interface(&ssd->qxl, con);
-    assert(ssd->worker);
     qemu_spice_create_host_memslot(ssd);
 
     register_displaychangelistener(&ssd->dcl);
#5 lore raw

ping

Quoted 63 lines

ping the series

Quoted 58 lines

This fields points to an old interface that is no more used in the current code.

---
 hw/display/qxl.c           | 1 -
 include/ui/spice-display.h | 1 -
 ui/spice-display.c         | 2 --
 3 files changed, 4 deletions(-)
hw/display/qxl.c +0 -1
index 99365c3e8f..b9fa067f6e 100644
@@ -518,7 +518,6 @@ 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);
-    qxl->ssd.worker = qxl_worker;
 }
 

static void interface_set_compression_level(QXLInstance *sin, int level)

include/ui/spice-display.h +0 -1
index aaf2019889..6b5c73b21c 100644
@@ -86,7 +86,6 @@ struct SimpleSpiceDisplay {
     DisplayChangeListener dcl;
     void *buf;
     int bufsize;
-    QXLWorker *worker;
     QXLInstance qxl;
     uint32_t unique;
     pixman_image_t *surface;
ui/spice-display.c +0 -1
index ad1ceafb3f..85a72fe76a 100644
@@ -519,7 +519,6 @@ static void interface_attach_worker(QXLInstance *sin,
 QXLWorker *qxl_worker)
     SimpleSpiceDisplay *ssd = container_of(sin, SimpleSpiceDisplay, qxl);
 
     dprint(1, "%s/%d:\n", __func__, ssd->qxl.id);
-    ssd->worker = qxl_worker;
 }
 

static void interface_set_compression_level(QXLInstance *sin, int level)

ui/spice-display.c +0 -1
@@ -1028,7 +1027,6 @@ static void qemu_spice_display_init_one(QemuConsole
 *con)
 
     ssd->qxl.base.sif = &dpy_interface.base;
     qemu_spice_add_display_interface(&ssd->qxl, con);
-    assert(ssd->worker);
     qemu_spice_create_host_memslot(ssd);
 
     register_displaychangelistener(&ssd->dcl);
#6 lore raw

ping

Quoted 69 lines

ping

Quoted 64 lines

ping the series

Quoted 59 lines

This fields points to an old interface that is no more used in the current code.

---
 hw/display/qxl.c           | 1 -
 include/ui/spice-display.h | 1 -
 ui/spice-display.c         | 2 --
 3 files changed, 4 deletions(-)
hw/display/qxl.c +0 -1
index 99365c3e8f..b9fa067f6e 100644
@@ -518,7 +518,6 @@ 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);
-    qxl->ssd.worker = qxl_worker;
 }
 

static void interface_set_compression_level(QXLInstance *sin, int level)

include/ui/spice-display.h +0 -1
index aaf2019889..6b5c73b21c 100644
@@ -86,7 +86,6 @@ struct SimpleSpiceDisplay {
     DisplayChangeListener dcl;
     void *buf;
     int bufsize;
-    QXLWorker *worker;
     QXLInstance qxl;
     uint32_t unique;
     pixman_image_t *surface;
ui/spice-display.c +0 -1
index ad1ceafb3f..85a72fe76a 100644
@@ -519,7 +519,6 @@ static void interface_attach_worker(QXLInstance *sin,
 QXLWorker *qxl_worker)
     SimpleSpiceDisplay *ssd = container_of(sin, SimpleSpiceDisplay,
     qxl);
 
     dprint(1, "%s/%d:\n", __func__, ssd->qxl.id);
-    ssd->worker = qxl_worker;
 }

static void interface_set_compression_level(QXLInstance *sin, int level)

ui/spice-display.c +0 -1
@@ -1028,7 +1027,6 @@ static void qemu_spice_display_init_one(QemuConsole
 *con)
 
     ssd->qxl.base.sif = &dpy_interface.base;
     qemu_spice_add_display_interface(&ssd->qxl, con);
-    assert(ssd->worker);
     qemu_spice_create_host_memslot(ssd);
 
     register_displaychangelistener(&ssd->dcl);
#7 lore raw
Quoted 8 lines · Frediano Ziglio

ping

Quoted 6 lines

ping

Quoted 3 lines

ping the series

Was on sick leave for a few weeks, back now, will process asap but will probably take a while nevertheless due to the big backlog I have now.

cheers,
Gerd

#8 lore raw

Thanks.
How is your hand?

Frediano

----- Original Message -----

Quoted 19 lines · Frediano Ziglio
Quoted 8 lines

ping

Quoted 6 lines

ping

Quoted 3 lines

ping the series

Was on sick leave for a few weeks, back now, will process asap but will probably take a while nevertheless due to the big backlog I have now.

cheers,
Gerd