[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 4/9] audio: remove QEMUSoundCard linked list
From: |
Daniel P . Berrangé |
Subject: |
[PATCH 4/9] audio: remove QEMUSoundCard linked list |
Date: |
Fri, 13 Jan 2023 11:21:55 -0500 |
No code ever iterates over the list
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
audio/audio.c | 5 -----
audio/audio.h | 1 -
audio/audio_int.h | 1 -
3 files changed, 7 deletions(-)
diff --git a/audio/audio.c b/audio/audio.c
index 94a16c2dda..217095306f 100644
--- a/audio/audio.c
+++ b/audio/audio.c
@@ -1812,7 +1812,6 @@ static AudioState *audio_init(Audiodev *dev, const char
*name)
qemu_add_vm_change_state_handler (audio_vm_change_state_handler, s);
QTAILQ_INSERT_TAIL(&audio_states, s, list);
- QLIST_INIT (&s->card_head);
vmstate_register (NULL, 0, &vmstate_audio, s);
return s;
}
@@ -1832,14 +1831,10 @@ void AUD_register_card (const char *name, QEMUSoundCard
*card)
if (!card->state) {
card->state = audio_init(NULL, name);
}
-
- memset (&card->entries, 0, sizeof (card->entries));
- QLIST_INSERT_HEAD(&card->state->card_head, card, entries);
}
void AUD_remove_card (QEMUSoundCard *card)
{
- QLIST_REMOVE (card, entries);
}
static struct audio_pcm_ops capture_pcm_ops;
diff --git a/audio/audio.h b/audio/audio.h
index eefb809a54..ebcc540431 100644
--- a/audio/audio.h
+++ b/audio/audio.h
@@ -83,7 +83,6 @@ typedef struct SWVoiceIn SWVoiceIn;
typedef struct AudioState AudioState;
typedef struct QEMUSoundCard {
AudioState *state;
- QLIST_ENTRY (QEMUSoundCard) entries;
} QEMUSoundCard;
typedef struct QEMUAudioTimeStamp {
diff --git a/audio/audio_int.h b/audio/audio_int.h
index b0cc2cd390..ca62e49ee5 100644
--- a/audio/audio_int.h
+++ b/audio/audio_int.h
@@ -225,7 +225,6 @@ typedef struct AudioState {
void *drv_opaque;
QEMUTimer *ts;
- QLIST_HEAD (card_listhead, QEMUSoundCard) card_head;
QLIST_HEAD (hw_in_listhead, HWVoiceIn) hw_head_in;
QLIST_HEAD (hw_out_listhead, HWVoiceOut) hw_head_out;
QLIST_HEAD (cap_listhead, CaptureVoiceOut) cap_head;
--
2.38.1
- [PATCH 0/9] audio: remove deprecated QEMU_AUDIO env support, Daniel P . Berrangé, 2023/01/13
- [PATCH 4/9] audio: remove QEMUSoundCard linked list,
Daniel P . Berrangé <=
- [PATCH 9/9] audio: remove support for QEMU_AUDIO_ env variables, Daniel P . Berrangé, 2023/01/13
- [PATCH 2/9] audio: remove special audio_calloc function, Daniel P . Berrangé, 2023/01/13
- [PATCH 6/9] docs: split the deprecation warning for soundcards vs VNC, Daniel P . Berrangé, 2023/01/13
- [PATCH 5/9] audio: remove empty AUD_remove_card method, Daniel P . Berrangé, 2023/01/13
- [PATCH 7/9] ui/vnc: don't accept VNC_ENCODING_AUDIO without audiodev, Daniel P . Berrangé, 2023/01/13
- [PATCH 3/9] audio: remove unused 'name' in QEMUSoundCard struct, Daniel P . Berrangé, 2023/01/13
- [PATCH 1/9] audio: don't check qemu_add_vm_change_state_handler failure, Daniel P . Berrangé, 2023/01/13