* [Qemu-devel] [PATCH v3 0/3] Remove unused functions
@ 2015-02-26 13:28 Thomas Huth
2015-02-26 13:28 ` [Qemu-devel] [PATCH 1/3] ui: Removed " Thomas Huth
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Thomas Huth @ 2015-02-26 13:28 UTC (permalink / raw)
To: qemu-trivial; +Cc: qemu-devel, Thomas Huth
There are quite a lot of completely unused functions scattered
around in the QEMU sources - here are some patches to remove at
least some of them.
I've limited the patches now to the ones which have been ack'ed
by the corresponding subsystem maintainers, so it should be
really save now to apply these patches (I'll maybe re-post the
other patches later again for further discusison).
Michael, can you take these through your trivial-patches repository?
Thomas Huth (3):
ui: Removed unused functions
ui/vnc: Remove vnc_stop_worker_thread()
xen: Remove xen_cmos_set_s3_resume()
include/hw/xen/xen.h | 1 -
include/ui/console.h | 3 ---
ui/console.c | 12 ------------
ui/d3des.c | 9 ---------
ui/d3des.h | 6 ------
ui/input-legacy.c | 6 ------
ui/vnc-jobs.c | 13 -------------
ui/vnc-jobs.h | 1 -
xen-hvm-stub.c | 4 ----
9 files changed, 0 insertions(+), 55 deletions(-)
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Qemu-devel] [PATCH 1/3] ui: Removed unused functions
2015-02-26 13:28 [Qemu-devel] [PATCH v3 0/3] Remove unused functions Thomas Huth
@ 2015-02-26 13:28 ` Thomas Huth
2015-02-26 13:28 ` [Qemu-devel] [PATCH 2/3] ui/vnc: Remove vnc_stop_worker_thread() Thomas Huth
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Thomas Huth @ 2015-02-26 13:28 UTC (permalink / raw)
To: qemu-trivial; +Cc: qemu-devel, Thomas Huth
Remove qemu_console_displaystate(), qemu_remove_kbd_event_handler(),
qemu_different_endianness_pixelformat() and cpkey(), since they are
completely unused.
Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
---
include/ui/console.h | 3 ---
ui/console.c | 12 ------------
ui/d3des.c | 9 ---------
ui/d3des.h | 6 ------
ui/input-legacy.c | 6 ------
5 files changed, 0 insertions(+), 36 deletions(-)
diff --git a/include/ui/console.h b/include/ui/console.h
index 0f97d86..6e5a867 100644
--- a/include/ui/console.h
+++ b/include/ui/console.h
@@ -36,7 +36,6 @@ typedef struct QEMUPutLEDEntry QEMUPutLEDEntry;
QEMUPutKbdEntry *qemu_add_kbd_event_handler(QEMUPutKBDEvent *func,
void *opaque);
-void qemu_remove_kbd_event_handler(QEMUPutKbdEntry *entry);
QEMUPutMouseEntry *qemu_add_mouse_event_handler(QEMUPutMouseEvent *func,
void *opaque, int absolute,
const char *name);
@@ -194,7 +193,6 @@ DisplaySurface *qemu_create_displaysurface_guestmem(int width, int height,
pixman_format_code_t format,
int linesize,
uint64_t addr);
-PixelFormat qemu_different_endianness_pixelformat(int bpp);
PixelFormat qemu_default_pixelformat(int bpp);
DisplaySurface *qemu_create_displaysurface(int width, int height);
@@ -322,7 +320,6 @@ void qemu_console_resize(QemuConsole *con, int width, int height);
void qemu_console_copy(QemuConsole *con, int src_x, int src_y,
int dst_x, int dst_y, int w, int h);
DisplaySurface *qemu_console_surface(QemuConsole *con);
-DisplayState *qemu_console_displaystate(QemuConsole *console);
/* sdl.c */
void sdl_display_init(DisplayState *ds, int full_screen, int no_frame);
diff --git a/ui/console.c b/ui/console.c
index 87574a7..87af6b5 100644
--- a/ui/console.c
+++ b/ui/console.c
@@ -2005,18 +2005,6 @@ DisplaySurface *qemu_console_surface(QemuConsole *console)
return console->surface;
}
-DisplayState *qemu_console_displaystate(QemuConsole *console)
-{
- return console->ds;
-}
-
-PixelFormat qemu_different_endianness_pixelformat(int bpp)
-{
- pixman_format_code_t fmt = qemu_default_pixman_format(bpp, false);
- PixelFormat pf = qemu_pixelformat_from_pixman(fmt);
- return pf;
-}
-
PixelFormat qemu_default_pixelformat(int bpp)
{
pixman_format_code_t fmt = qemu_default_pixman_format(bpp, true);
diff --git a/ui/d3des.c b/ui/d3des.c
index 60c840e..5bc99b8 100644
--- a/ui/d3des.c
+++ b/ui/d3des.c
@@ -121,15 +121,6 @@ static void cookey(register unsigned long *raw1)
return;
}
-void cpkey(register unsigned long *into)
-{
- register unsigned long *from, *endp;
-
- from = KnL, endp = &KnL[32];
- while( from < endp ) *into++ = *from++;
- return;
- }
-
void usekey(register unsigned long *from)
{
register unsigned long *to, *endp;
diff --git a/ui/d3des.h b/ui/d3des.h
index 70cb6b5..773667e 100644
--- a/ui/d3des.h
+++ b/ui/d3des.h
@@ -36,12 +36,6 @@ void usekey(unsigned long *);
* Loads the internal key register with the data in cookedkey.
*/
-void cpkey(unsigned long *);
-/* cookedkey[32]
- * Copies the contents of the internal key register into the storage
- * located at &cookedkey[0].
- */
-
void des(unsigned char *, unsigned char *);
/* from[8] to[8]
* Encrypts/Decrypts (according to the key currently loaded in the
diff --git a/ui/input-legacy.c b/ui/input-legacy.c
index a698a34..2d4ca19 100644
--- a/ui/input-legacy.c
+++ b/ui/input-legacy.c
@@ -143,12 +143,6 @@ QEMUPutKbdEntry *qemu_add_kbd_event_handler(QEMUPutKBDEvent *func, void *opaque)
return entry;
}
-void qemu_remove_kbd_event_handler(QEMUPutKbdEntry *entry)
-{
- qemu_input_handler_unregister(entry->s);
- g_free(entry);
-}
-
static void legacy_mouse_event(DeviceState *dev, QemuConsole *src,
InputEvent *evt)
{
--
1.7.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Qemu-devel] [PATCH 2/3] ui/vnc: Remove vnc_stop_worker_thread()
2015-02-26 13:28 [Qemu-devel] [PATCH v3 0/3] Remove unused functions Thomas Huth
2015-02-26 13:28 ` [Qemu-devel] [PATCH 1/3] ui: Removed " Thomas Huth
@ 2015-02-26 13:28 ` Thomas Huth
2015-02-26 13:28 ` [Qemu-devel] [PATCH 3/3] xen: Remove xen_cmos_set_s3_resume() Thomas Huth
2015-02-28 9:19 ` [Qemu-devel] [PATCH v3 0/3] Remove unused functions Michael Tokarev
3 siblings, 0 replies; 5+ messages in thread
From: Thomas Huth @ 2015-02-26 13:28 UTC (permalink / raw)
To: qemu-trivial; +Cc: qemu-devel, Thomas Huth
This function is not used anymore, let's remove it.
Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
---
ui/vnc-jobs.c | 13 -------------
ui/vnc-jobs.h | 1 -
2 files changed, 0 insertions(+), 14 deletions(-)
diff --git a/ui/vnc-jobs.c b/ui/vnc-jobs.c
index 68f3d77..c8ee203 100644
--- a/ui/vnc-jobs.c
+++ b/ui/vnc-jobs.c
@@ -342,16 +342,3 @@ void vnc_start_worker_thread(void)
QEMU_THREAD_DETACHED);
queue = q; /* Set global queue */
}
-
-void vnc_stop_worker_thread(void)
-{
- if (!vnc_worker_thread_running())
- return ;
-
- /* Remove all jobs and wake up the thread */
- vnc_lock_queue(queue);
- queue->exit = true;
- vnc_unlock_queue(queue);
- vnc_jobs_clear(NULL);
- qemu_cond_broadcast(&queue->cond);
-}
diff --git a/ui/vnc-jobs.h b/ui/vnc-jobs.h
index 31da103..044bf9f 100644
--- a/ui/vnc-jobs.h
+++ b/ui/vnc-jobs.h
@@ -40,7 +40,6 @@ void vnc_jobs_join(VncState *vs);
void vnc_jobs_consume_buffer(VncState *vs);
void vnc_start_worker_thread(void);
-void vnc_stop_worker_thread(void);
/* Locks */
static inline int vnc_trylock_display(VncDisplay *vd)
--
1.7.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Qemu-devel] [PATCH 3/3] xen: Remove xen_cmos_set_s3_resume()
2015-02-26 13:28 [Qemu-devel] [PATCH v3 0/3] Remove unused functions Thomas Huth
2015-02-26 13:28 ` [Qemu-devel] [PATCH 1/3] ui: Removed " Thomas Huth
2015-02-26 13:28 ` [Qemu-devel] [PATCH 2/3] ui/vnc: Remove vnc_stop_worker_thread() Thomas Huth
@ 2015-02-26 13:28 ` Thomas Huth
2015-02-28 9:19 ` [Qemu-devel] [PATCH v3 0/3] Remove unused functions Michael Tokarev
3 siblings, 0 replies; 5+ messages in thread
From: Thomas Huth @ 2015-02-26 13:28 UTC (permalink / raw)
To: qemu-trivial; +Cc: qemu-devel, Thomas Huth
The function is not used anymore, and thus can be deleted.
Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
---
include/hw/xen/xen.h | 1 -
xen-hvm-stub.c | 4 ----
2 files changed, 0 insertions(+), 5 deletions(-)
diff --git a/include/hw/xen/xen.h b/include/hw/xen/xen.h
index b0ed04c..4356af4 100644
--- a/include/hw/xen/xen.h
+++ b/include/hw/xen/xen.h
@@ -32,7 +32,6 @@ int xen_pci_slot_get_pirq(PCIDevice *pci_dev, int irq_num);
void xen_piix3_set_irq(void *opaque, int irq_num, int level);
void xen_piix_pci_write_config_client(uint32_t address, uint32_t val, int len);
void xen_hvm_inject_msi(uint64_t addr, uint32_t data);
-void xen_cmos_set_s3_resume(void *opaque, int irq, int level);
qemu_irq *xen_interrupt_controller_init(void);
diff --git a/xen-hvm-stub.c b/xen-hvm-stub.c
index 2d98696..46867d8 100644
--- a/xen-hvm-stub.c
+++ b/xen-hvm-stub.c
@@ -30,10 +30,6 @@ void xen_hvm_inject_msi(uint64_t addr, uint32_t data)
{
}
-void xen_cmos_set_s3_resume(void *opaque, int irq, int level)
-{
-}
-
void xen_ram_alloc(ram_addr_t ram_addr, ram_addr_t size, MemoryRegion *mr)
{
}
--
1.7.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH v3 0/3] Remove unused functions
2015-02-26 13:28 [Qemu-devel] [PATCH v3 0/3] Remove unused functions Thomas Huth
` (2 preceding siblings ...)
2015-02-26 13:28 ` [Qemu-devel] [PATCH 3/3] xen: Remove xen_cmos_set_s3_resume() Thomas Huth
@ 2015-02-28 9:19 ` Michael Tokarev
3 siblings, 0 replies; 5+ messages in thread
From: Michael Tokarev @ 2015-02-28 9:19 UTC (permalink / raw)
To: Thomas Huth, qemu-trivial; +Cc: qemu-devel
26.02.2015 16:28, Thomas Huth wrote:
> There are quite a lot of completely unused functions scattered
> around in the QEMU sources - here are some patches to remove at
> least some of them.
>
> I've limited the patches now to the ones which have been ack'ed
> by the corresponding subsystem maintainers, so it should be
> really save now to apply these patches (I'll maybe re-post the
> other patches later again for further discusison).
>
> Michael, can you take these through your trivial-patches repository?
Yes, applied this v3 (instead of previous v2) to -trivial now, so
not applying the migration part.
Thanks,
/mjt
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-02-28 9:19 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-26 13:28 [Qemu-devel] [PATCH v3 0/3] Remove unused functions Thomas Huth
2015-02-26 13:28 ` [Qemu-devel] [PATCH 1/3] ui: Removed " Thomas Huth
2015-02-26 13:28 ` [Qemu-devel] [PATCH 2/3] ui/vnc: Remove vnc_stop_worker_thread() Thomas Huth
2015-02-26 13:28 ` [Qemu-devel] [PATCH 3/3] xen: Remove xen_cmos_set_s3_resume() Thomas Huth
2015-02-28 9:19 ` [Qemu-devel] [PATCH v3 0/3] Remove unused functions Michael Tokarev
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).