Remove more unused functions
v2 cover Remove more unused functions
Here are some more patches to remove completely unused functions from QEMU. Please review carefully, some of the functions might still get usefull in the future again, so if you discover one, please let me know, then I'll remove it from the patch series again.
v2: Changed series according to review comment from v1:
- Dropped the patch to remove portio_list_destroy() and portio_list_del()
- Keep the ARI functions in the pci patch since they might get useful again
Thomas Huth (7):
migration: Remove unused functions
vmxnet: Remove unused function vmxnet_rx_pkt_get_num_frags()
pci: Remove unused function ich9_d2pbr_init()
monitor: Remove unused functions
usb: Remove unused functions
util: Remove unused functions
Remove various unused functions
backends/tpm.c | 11 ------ hmp.h | 1 - hw/char/serial.c | 7 ---- hw/net/vmxnet_rx_pkt.c | 7 ---- hw/net/vmxnet_rx_pkt.h | 9 ----- hw/pci-bridge/i82801b11.c | 21 ------------ hw/usb/core.c | 41 ----------------------- include/hw/char/serial.h | 1 - include/hw/i386/ich9.h | 1 - include/hw/usb.h | 5 --- include/migration/migration.h | 1 - include/migration/qemu-file.h | 2 - include/monitor/monitor.h | 1 - include/qemu-common.h | 4 -- include/qemu/compatfd.h | 1 - include/sysemu/iothread.h | 1 - include/sysemu/tpm_backend_int.h | 2 - iothread.c | 12 ------- migration/migration.c | 9 ----- migration/qemu-file-buf.c | 53 ------------------------------ monitor.c | 13 ------- util/compatfd.c | 19 ----------- util/osdep.c | 66 -------------------------------------- 23 files changed, 0 insertions(+), 288 deletions(-)
PATCH v2 1/7 migration: Remove unused functions
migrate_rdma_pin_all(), qsb_clone() and qsb_set_length() are completely unused and thus can be deleted.
--- include/migration/migration.h | 1 - include/migration/qemu-file.h | 2 - migration/migration.c | 9 ------- migration/qemu-file-buf.c | 53 ----------------------------------------- 4 files changed, 0 insertions(+), 65 deletions(-)
include/migration/migration.h +0 -1
@@ -139,7 +139,6 @@ void migrate_add_blocker(Error *reason);*/ void migrate_del_blocker (Error *reason); -bool migrate_rdma_pin_all (void );bool migrate_zero_blocks (void );bool migrate_auto_converge (void );
include/migration/qemu-file.h +0 -2
@@ -133,9 +133,7 @@ bool qemu_file_mode_is_not_valid(const char *mode);bool qemu_file_is_writable (QEMUFile *f);QEMUSizedBuffer *qsb_create (const uint8_t *buffer,size_t len); -QEMUSizedBuffer *qsb_clone (const QEMUSizedBuffer *);void qsb_free (QEMUSizedBuffer *); -size_t qsb_set_length (QEMUSizedBuffer *qsb,size_t length);size_t qsb_get_length (const QEMUSizedBuffer *qsb);ssize_t qsb_get_buffer (const QEMUSizedBuffer *,off_t start,size_t count,uint8_t *buf);
migration/migration.c +0 -9
@@ -540,15 +540,6 @@ void qmp_migrate_set_downtime(double value, Error **errp) max_downtime = (uint64_t )value; } -bool migrate_rdma_pin_all (void ) -{ -MigrationState *s; - - s =migrate_get_current (); - -return s->enabled_capabilities[MIGRATION_CAPABILITY_RDMA_PIN_ALL ]; -} -bool migrate_auto_converge (void ) {MigrationState *s;
migration/qemu-file-buf.c +0 -53
65 lines not on this page · raw message
Signature · 1 line
1.7.1
Juan Quintela
AppliedRe: [Qemu-devel] [PATCH v2 1/7] migration: Remove unused functions
Quoted 9 lines · Thomas Huth
migrate_rdma_pin_all(),qsb_clone()andqsb_set_length()are completely unused and thus can be deleted.Signed-off-by Thomas Huth <[email protected]>Cc Juan Quintela <[email protected]>Cc Amit Shah <[email protected]>void
migrate_del_blocker(Error *reason);-bool
migrate_rdma_pin_all(void);
Removed
include/migration/qemu-file.h bool qemu_file_mode_is_not_valid(const char *mode); · line 136
Quoted 9 lines
include/migration/qemu-file.h +0
-1@@ -133,9 +133,7 @@ bool qemu_file_mode_is_not_valid(const char *mode);bool qemu_file_is_writable (QEMUFile *f);QEMUSizedBuffer *qsb_create (const uint8_t *buffer,size_t len); -QEMUSizedBuffer *qsb_clone (const QEMUSizedBuffer *);
Removed
include/migration/qemu-file.h bool qemu_file_mode_is_not_valid(const char *mode); · line 138
Quoted 2 lines
include/migration/qemu-file.h +0
-1void qsb_free (QEMUSizedBuffer *); -size_t qsb_set_length (QEMUSizedBuffer *qsb,size_t length);
Being used in the COLO patches (posted on the list)
Adjusted the removal by hand, thanks.
Applied, thanks.
PATCH v2 2/7 vmxnet: Remove unused function vmxnet_rx_pkt_get_num_frags()
In reply to Thomas HuthThe function is not used anymore and thus can be deleted.
--- hw/net/vmxnet_rx_pkt.c | 7 ------- hw/net/vmxnet_rx_pkt.h | 9 --------- 2 files changed, 0 insertions(+), 16 deletions(-)
hw/net/vmxnet_rx_pkt.c +0 -7
@@ -172,13 +172,6 @@ bool vmxnet_rx_pkt_has_virt_hdr(struct VmxnetRxPkt *pkt)return pkt->has_virt_hdr; } -uint16_t vmxnet_rx_pkt_get_num_frags (struct VmxnetRxPkt *pkt) -{ -assert (pkt); - -return pkt->vec_len; -} -uint16_t vmxnet_rx_pkt_get_vlan_tag (struct VmxnetRxPkt *pkt) {assert (pkt);
hw/net/vmxnet_rx_pkt.h +0 -9
@@ -114,15 +114,6 @@ bool vmxnet_rx_pkt_is_vlan_stripped(struct VmxnetRxPkt *pkt);bool vmxnet_rx_pkt_has_virt_hdr (struct VmxnetRxPkt *pkt);/** -* returns number of frags attached to the packet -* -* @pkt: packet -* @ret: number of frags -* -*/ -uint16_t vmxnet_rx_pkt_get_num_frags (struct VmxnetRxPkt *pkt); - -/** * attach data to rx packet * * @pkt: packet
Signature · 1 line
1.7.1
Re: [Qemu-devel] [PATCH v2 2/7] vmxnet: Remove unused function vmxnet_rx_pkt_get_num_frags()
Looks good. Thanks.
Quoted 52 lines · Thomas Huth
The function is not used anymore and thus can be deleted.
Signed-off-by Thomas Huth <[email protected]>Cc Dmitry Fleytman <[email protected]>---
hw/net/vmxnet_rx_pkt.c | 7 ------- hw/net/vmxnet_rx_pkt.h | 9 --------- 2 files changed, 0 insertions(+), 16 deletions(-)hw/net/vmxnet_rx_pkt.c +0
-7@@ -172,13 +172,6 @@ bool vmxnet_rx_pkt_has_virt_hdr(struct VmxnetRxPkt *pkt)return pkt->has_virt_hdr; } -uint16_t vmxnet_rx_pkt_get_num_frags (struct VmxnetRxPkt *pkt) -{ -assert (pkt); - -return pkt->vec_len; -} -uint16_t vmxnet_rx_pkt_get_vlan_tag (struct VmxnetRxPkt *pkt) {assert (pkt);hw/net/vmxnet_rx_pkt.h +0
-9@@ -114,15 +114,6 @@ bool vmxnet_rx_pkt_is_vlan_stripped(struct VmxnetRxPkt *pkt);bool vmxnet_rx_pkt_has_virt_hdr (struct VmxnetRxPkt *pkt);/** -* returns number of frags attached to the packet -* -* @pkt: packet -* @ret: number of frags -* -*/ -uint16_t vmxnet_rx_pkt_get_num_frags (struct VmxnetRxPkt *pkt); - -/** * attach data to rx packet * * @pkt: packet Signature · 1 line
1.7.1
PATCH v2 3/7 pci: Remove unused function ich9_d2pbr_init()
In reply to Thomas HuthThe function ich9_d2pbr_init() is completely unused and thus can be deleted.
--- hw/pci-bridge/i82801b11.c | 21 --------------------- include/hw/i386/ich9.h | 1 - 2 files changed, 0 insertions(+), 22 deletions(-)
hw/pci-bridge/i82801b11.c +0 -21
@@ -101,27 +101,6 @@ static const TypeInfo i82801b11_bridge_info = { .class_init = i82801b11_bridge_class_init, }; -PCIBus *ich9_d2pbr_init (PCIBus *bus,int devfn,int sec_bus) -{ -PCIDevice *d; -PCIBridge *br; -char buf[16 ]; -DeviceState *qdev; - - d =pci_create_multifunction (bus, devfn, true,"i82801b11-bridge" ); -if (!d) { -return NULL ; - } - br =PCI_BRIDGE (d); - qdev =DEVICE (d); - -snprintf (buf,sizeof (buf),"pci.%d" , sec_bus); -pci_bridge_map_irq (br, buf, pci_swizzle_map_irq_fn); -qdev_init_nofail (qdev); - -return pci_bridge_get_sec_bus (br); -} -static void d2pbr_register (void ) {type_register_static (&i82801b11_bridge_info);
include/hw/i386/ich9.h +0 -1
@@ -19,7 +19,6 @@ void ich9_lpc_set_irq(void *opaque, int irq_num, int level);int ich9_lpc_map_irq (PCIDevice *pci_dev,int intx);PCIINTxRoute ich9_route_intx_pin_to_irq (void *opaque,int pirq_pin);void ich9_lpc_pm_init (PCIDevice *pci_lpc); -PCIBus *ich9_d2pbr_init (PCIBus *bus,int devfn,int sec_bus);I2CBus *ich9_smb_init (PCIBus *bus,int devfn,uint32_t smb_io_base);#define ICH9_CC_SIZE (16 * 1024)/* 16KB */
Signature · 1 line
1.7.1
Re: [Qemu-devel] [PATCH v2 3/7] pci: Remove unused function ich9_d2pbr_init()
Quoted 5 lines · Thomas Huth
The function
ich9_d2pbr_init()is completely unused and thus can be deleted.Signed-off-by Thomas Huth <[email protected]>Cc Michael S. Tsirkin <[email protected]>
I assume all this will go in for 2.4 through the trivial tree?
Quoted 52 lines
--- hw/pci-bridge/i82801b11.c | 21 --------------------- include/hw/i386/ich9.h | 1 - 2 files changed, 0 insertions(+), 22 deletions(-)hw/pci-bridge/i82801b11.c +0
-21@@ -101,27 +101,6 @@ static const TypeInfo i82801b11_bridge_info = { .class_init = i82801b11_bridge_class_init, }; -PCIBus *ich9_d2pbr_init (PCIBus *bus,int devfn,int sec_bus) -{ -PCIDevice *d; -PCIBridge *br; -char buf[16 ]; -DeviceState *qdev; - - d =pci_create_multifunction (bus, devfn, true,"i82801b11-bridge" ); -if (!d) { -return NULL ; - } - br =PCI_BRIDGE (d); - qdev =DEVICE (d); - -snprintf (buf,sizeof (buf),"pci.%d" , sec_bus); -pci_bridge_map_irq (br, buf, pci_swizzle_map_irq_fn); -qdev_init_nofail (qdev); - -return pci_bridge_get_sec_bus (br); -} -static void d2pbr_register (void ) {type_register_static (&i82801b11_bridge_info);include/hw/i386/ich9.h +0
-1@@ -19,7 +19,6 @@ void ich9_lpc_set_irq(void *opaque, int irq_num, int level);int ich9_lpc_map_irq (PCIDevice *pci_dev,int intx);PCIINTxRoute ich9_route_intx_pin_to_irq (void *opaque,int pirq_pin);void ich9_lpc_pm_init (PCIDevice *pci_lpc); -PCIBus *ich9_d2pbr_init (PCIBus *bus,int devfn,int sec_bus);I2CBus *ich9_smb_init (PCIBus *bus,int devfn,uint32_t smb_io_base);#define ICH9_CC_SIZE (16 * 1024)/* 16KB */ Signature · 1 line
1.7.1
Re: [Qemu-devel] [PATCH v2 3/7] pci: Remove unused function ich9_d2pbr_init()
Quoted 10 lines · On Wed, 18 Mar 2015 14:20:41 +0100 "Michael S. Tsirkin" <[email protected]> wrote:
Quoted 5 lines · Thomas Huth
The function
ich9_d2pbr_init()is completely unused and thus can be deleted.Signed-off-by Thomas Huth <[email protected]>Cc Michael S. Tsirkin <[email protected]>Reviewed-by Michael S. Tsirkin <[email protected]>I assume all this will go in for 2.4 through the trivial tree?
The patch that removes unused functions from the migration code has already been picked up in the migration tree ... so I also don't mind whether you want to take this through the pci tree or not. Just if the patches are not picked up through other trees, they should finally go through trivial, I think.
Thomas
PATCH v2 4/7 monitor: Remove unused functions
In reply to Thomas HuthThe functions ringbuf_read_completion() and monitor_get_rs() are not used anywhere anymore, so let's remove them.
--- hmp.h | 1 - include/monitor/monitor.h | 1 - monitor.c | 13 ------------- 3 files changed, 0 insertions(+), 15 deletions(-)
hmp.h +0 -1
@@ -106,7 +106,6 @@ void set_link_completion(ReadLineState *rs, int nb_args, const char *str);void netdev_add_completion (ReadLineState *rs,int nb_args,const char *str);void netdev_del_completion (ReadLineState *rs,int nb_args,const char *str);void ringbuf_write_completion (ReadLineState *rs,int nb_args,const char *str); -void ringbuf_read_completion (ReadLineState *rs,int nb_args,const char *str);void watchdog_action_completion (ReadLineState *rs,int nb_args,const char *str); void migrate_set_capability_completion(ReadLineState *rs, int nb_args,
include/monitor/monitor.h +0 -1
@@ -47,7 +47,6 @@ typedef void (MonitorCompletion)(void *opaque, QObject *ret_data);void monitor_set_error (Monitor *mon,QError *qerror);void monitor_read_command (Monitor *mon,int show_prompt); -ReadLineState *monitor_get_rs (Monitor *mon);int monitor_read_password (Monitor *mon,ReadLineFunc *readline_func,void *opaque);
monitor.c +0 -13
@@ -4385,14 +4385,6 @@ static void ringbuf_completion(ReadLineState *rs, const char *str)qapi_free_ChardevInfoList (start); } -void ringbuf_read_completion (ReadLineState *rs,int nb_args,const char *str) -{ -if (nb_args !=2 ) { -return ; - } -ringbuf_completion (rs, str); -} -void ringbuf_write_completion (ReadLineState *rs,int nb_args,const char *str) {if (nb_args !=2 ) {
@@ -5370,11 +5362,6 @@ static void bdrv_password_cb(void *opaque, const char *password,monitor_read_command (mon,1 ); } -ReadLineState *monitor_get_rs (Monitor *mon) -{ -return mon->rs; -} -int monitor_read_bdrv_key_start (Monitor *mon,BlockDriverState *bs,BlockCompletionFunc *completion_cb,void *opaque)
Signature · 1 line
1.7.1
PATCH v2 5/7 usb: Remove unused functions
In reply to Thomas HuthDelete set_usb_string(), usb_ep_get_ifnum(), usb_ep_get_max_packet_size() usb_ep_get_max_streams() and usb_ep_set_pipeline() since they are not used anymore.
--- hw/usb/core.c | 41 ----------------------------------------- include/hw/usb.h | 5 ----- 2 files changed, 0 insertions(+), 46 deletions(-)
hw/usb/core.c +0 -41
@@ -331,23 +331,6 @@ void usb_generic_async_ctrl_complete(USBDevice *s, USBPacket *p)usb_packet_complete (s, p); } -/* XXX: fix overflow */ -int set_usb_string (uint8_t *buf,const char *str) -{ -int len, i; -uint8_t *q; - - q = buf; - len =strlen (str); - *q++ =2 * len +2 ; - *q++ =3 ; -for (i =0 ; i < len; i++) { - *q++ = str[i]; - *q++ =0 ; - } -return q - buf; -} -USBDevice *usb_find_device (USBPort *port,uint8_t addr) {USBDevice *dev = port->dev;
@@ -749,12 +732,6 @@ void usb_ep_set_type(USBDevice *dev, int pid, int ep, uint8_t type) uep->type = type; } -uint8_t usb_ep_get_ifnum (USBDevice *dev,int pid,int ep) -{ -struct USBEndpoint *uep =usb_ep_get (dev, pid, ep); -return uep->ifnum; -} -void usb_ep_set_ifnum (USBDevice *dev,int pid,int ep,uint8_t ifnum) {struct USBEndpoint *uep =usb_ep_get (dev, pid, ep);
@@ -782,12 +759,6 @@ void usb_ep_set_max_packet_size(USBDevice *dev, int pid, int ep, uep->max_packet_size = size * microframes; } -int usb_ep_get_max_packet_size (USBDevice *dev,int pid,int ep) -{ -struct USBEndpoint *uep =usb_ep_get (dev, pid, ep); -return uep->max_packet_size; -} -void usb_ep_set_max_streams (USBDevice *dev,int pid,int ep,uint8_t raw) {struct USBEndpoint *uep =usb_ep_get (dev, pid, ep);
@@ -801,18 +772,6 @@ void usb_ep_set_max_streams(USBDevice *dev, int pid, int ep, uint8_t raw) } } -int usb_ep_get_max_streams (USBDevice *dev,int pid,int ep) -{ -struct USBEndpoint *uep =usb_ep_get (dev, pid, ep); -return uep->max_streams; -} - -void usb_ep_set_pipeline (USBDevice *dev,int pid,int ep,bool enabled) -{ -struct USBEndpoint *uep =usb_ep_get (dev, pid, ep); - uep->pipeline = enabled; -} -void usb_ep_set_halted (USBDevice *dev,int pid,int ep,bool halted) {struct USBEndpoint *uep =usb_ep_get (dev, pid, ep);
include/hw/usb.h +0 -5
@@ -445,15 +445,11 @@ void usb_ep_reset(USBDevice *dev);void usb_ep_dump (USBDevice *dev);struct USBEndpoint *usb_ep_get (USBDevice *dev,int pid,int ep);uint8_t usb_ep_get_type (USBDevice *dev,int pid,int ep); -uint8_t usb_ep_get_ifnum (USBDevice *dev,int pid,int ep);void usb_ep_set_type (USBDevice *dev,int pid,int ep,uint8_t type);void usb_ep_set_ifnum (USBDevice *dev,int pid,int ep,uint8_t ifnum);void usb_ep_set_max_packet_size (USBDevice *dev,int pid,int ep,uint16_t raw); -int usb_ep_get_max_packet_size (USBDevice *dev,int pid,int ep);void usb_ep_set_max_streams (USBDevice *dev,int pid,int ep,uint8_t raw); -int usb_ep_get_max_streams (USBDevice *dev,int pid,int ep); -void usb_ep_set_pipeline (USBDevice *dev,int pid,int ep,bool enabled);void usb_ep_set_halted (USBDevice *dev,int pid,int ep,bool halted);USBPacket *usb_ep_find_packet_by_id (USBDevice *dev,int pid,int ep,uint64_t id);
@@ -469,7 +465,6 @@ void usb_port_reset(USBPort *port);void usb_device_reset (USBDevice *dev);void usb_wakeup (USBEndpoint *ep,unsigned int stream);void usb_generic_async_ctrl_complete (USBDevice *s,USBPacket *p); -int set_usb_string (uint8_t *buf,const char *str);/* usb-linux.c */ USBDevice *usb_host_device_open (USBBus *bus,const char *devname);
Signature · 1 line
1.7.1
PATCH v2 6/7 util: Remove unused functions
In reply to Thomas HuthDelete the unused functions qemu_signalfd_available(), qemu_send_full() and qemu_recv_full().
--- include/qemu-common.h | 4 --- include/qemu/compatfd.h | 1 - util/compatfd.c | 19 ------------- util/osdep.c | 66 ----------------------------------------------- 4 files changed, 0 insertions(+), 90 deletions(-)
include/qemu-common.h +0 -4
@@ -217,10 +217,6 @@ void *qemu_oom_check(void *ptr); ssize_t qemu_write_full(int fd, const void *buf, size_t count) QEMU_WARN_UNUSED_RESULT; -ssize_t qemu_send_full(int fd, const void *buf, size_t count, int flags) - QEMU_WARN_UNUSED_RESULT; -ssize_t qemu_recv_full(int fd, void *buf, size_t count, int flags) - QEMU_WARN_UNUSED_RESULT;#ifndef _WIN32int qemu_pipe (int pipefd[2 ]);
include/qemu/compatfd.h +0 -1
@@ -39,6 +39,5 @@ struct qemu_signalfd_siginfo { };int qemu_signalfd (const sigset_t *mask); -bool qemu_signalfd_available (void );#endif
util/compatfd.c +0 -19
@@ -108,22 +108,3 @@ int qemu_signalfd(const sigset_t *mask)return qemu_signalfd_compat (mask); } - -bool qemu_signalfd_available (void ) -{ -#ifdef CONFIG_SIGNALFD -sigset_t mask; -int fd; -bool ok; -sigemptyset (&mask); - errno =0 ; - fd =syscall (SYS_signalfd,-1 , &mask, _NSIG /8 ); - ok = (errno !=ENOSYS ); -if (fd >=0 ) { -close (fd); - } -return ok; -#else -return false; -#endif -}
util/osdep.c +0 -66
72 lines not on this page · raw message
Signature · 1 line
1.7.1
PATCH v2 7/7 Remove various unused functions
In reply to Thomas HuthThe functions tpm_backend_thread_tpm_reset(), serial_set_frequency() and iothread_find() are completely unused, let's remove them.
--- backends/tpm.c | 11 ----------- hw/char/serial.c | 7 ------- include/hw/char/serial.h | 1 - include/sysemu/iothread.h | 1 - include/sysemu/tpm_backend_int.h | 2 -- iothread.c | 12 ------------ 6 files changed, 0 insertions(+), 34 deletions(-)
backends/tpm.c +0 -11
@@ -165,17 +165,6 @@ void tpm_backend_thread_end(TPMBackendThread *tbt) } } -void tpm_backend_thread_tpm_reset (TPMBackendThread *tbt, -GFunc func,gpointer user_data) -{ -if (!tbt->pool) { -tpm_backend_thread_create (tbt, func, user_data); - }else { -g_thread_pool_push (tbt->pool, (gpointer )TPM_BACKEND_CMD_TPM_RESET , -NULL ); - } -} -static const TypeInfo tpm_backend_info = { .name =TYPE_TPM_BACKEND , .parent =TYPE_OBJECT ,
hw/char/serial.c +0 -7
@@ -876,13 +876,6 @@ void serial_exit_core(SerialState *s)qemu_unregister_reset (serial_reset, s); } -/* Change the main reference oscillator frequency. */ -void serial_set_frequency (SerialState *s,uint32_t frequency) -{ - s->baudbase = frequency; -serial_update_parameters (s); -} -const MemoryRegionOps serial_io_ops = { .read = serial_ioport_read, .write = serial_ioport_write,
include/hw/char/serial.h +0 -1
@@ -80,7 +80,6 @@ extern const MemoryRegionOps serial_io_ops;void serial_realize_core (SerialState *s,Error **errp);void serial_exit_core (SerialState *s); -void serial_set_frequency (SerialState *s,uint32_t frequency);/* legacy pre qom */ SerialState *serial_init(int base, qemu_irq irq, int baudbase,
include/sysemu/iothread.h +0 -1
@@ -33,7 +33,6 @@ typedef struct {#define IOTHREAD (obj) \ OBJECT_CHECK(IOThread, obj, TYPE_IOTHREAD) -IOThread *iothread_find (const char *id);char *iothread_get_id (IOThread *iothread);AioContext *iothread_get_aio_context (IOThread *iothread);
include/sysemu/tpm_backend_int.h +0 -2
@@ -32,8 +32,6 @@ void tpm_backend_thread_deliver_request(TPMBackendThread *tbt);void tpm_backend_thread_create (TPMBackendThread *tbt,GFunc func,gpointer user_data);void tpm_backend_thread_end (TPMBackendThread *tbt); -void tpm_backend_thread_tpm_reset (TPMBackendThread *tbt, -GFunc func,gpointer user_data); typedef enum TPMBackendCmd { TPM_BACKEND_CMD_INIT = 1,
iothread.c +0 -12
@@ -121,18 +121,6 @@ static void iothread_register_types(void)type_init (iothread_register_types) -IOThread *iothread_find(const char *id) -{ -Object *container =container_get (object_get_root (),IOTHREADS_PATH ); -Object *child; - - child =object_property_get_link (container, id,NULL ); -if (!child) { -return NULL ; - } -return (IOThread *)object_dynamic_cast (child,TYPE_IOTHREAD ); -} - char *iothread_get_id(IOThread *iothread) {return object_get_canonical_path_component (OBJECT (iothread));
Signature · 1 line
1.7.1
Michael Tokarev
AppliedQuoted 5 lines · Thomas Huth
Here are some more patches to remove completely unused functions from QEMU. Please review carefully, some of the functions might still get usefull in the future again, so if you discover one, please let me know, then I'll remove it from the patch series again.
Applied to -trivial, thank you!
/mjt
Am 27.04.2015 um 13:27 schrieb Michael Tokarev:
Quoted 9 lines
Quoted 5 lines · Thomas Huth
Here are some more patches to remove completely unused functions from QEMU. Please review carefully, some of the functions might still get usefull in the future again, so if you discover one, please let me know, then I'll remove it from the patch series again.
Applied to -trivial, thank you!
/mjt
I'm sorry that I did not notice this series earlier.
The function serial_set_frequency() is used in my personal branch for MIPS AR7. That's not a sufficient reason to keep it, but I think that other (maybe most) systems have a serial clock with a typical frequency which can be changed by software (as it is the case for AR7). So if this function is currently unused, this simply means that the serial device emulations are incomplete.
Regards
Stefan