aboutsummaryrefslogtreecommitdiff
path: root/hw/audio/ac97.c
diff options
context:
space:
mode:
authorKővágó, Zoltán <dirty.ice.hu@gmail.com>2019-08-19 01:06:54 +0200
committerGerd Hoffmann <kraxel@redhat.com>2019-08-21 09:13:37 +0200
commit589359150365616de479866f8bc594c876480bd8 (patch)
tree3b0413edced2698cd97e18b6cc106df811c0cc2c /hw/audio/ac97.c
parent8692bf7d978aee2329d9449e31043451a8fdb357 (diff)
audio: remove audio_MIN, audio_MAX
There's already a MIN and MAX macro in include/qemu/osdep.h, use them instead. Signed-off-by: Kővágó, Zoltán <DirtY.iCE.hu@gmail.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-id: 303222477df6f7373217e0df768635fab5855745.1566168923.git.DirtY.iCE.hu@gmail.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/audio/ac97.c')
-rw-r--r--hw/audio/ac97.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/hw/audio/ac97.c b/hw/audio/ac97.c
index b4c0b690d7..a136b97f68 100644
--- a/hw/audio/ac97.c
+++ b/hw/audio/ac97.c
@@ -965,7 +965,7 @@ static int write_audio (AC97LinkState *s, AC97BusMasterRegs *r,
uint32_t temp = r->picb << 1;
uint32_t written = 0;
int to_copy = 0;
- temp = audio_MIN (temp, max);
+ temp = MIN (temp, max);
if (!temp) {
*stop = 1;
@@ -974,7 +974,7 @@ static int write_audio (AC97LinkState *s, AC97BusMasterRegs *r,
while (temp) {
int copied;
- to_copy = audio_MIN (temp, sizeof (tmpbuf));
+ to_copy = MIN (temp, sizeof (tmpbuf));
pci_dma_read (&s->dev, addr, tmpbuf, to_copy);
copied = AUD_write (s->voice_po, tmpbuf, to_copy);
dolog ("write_audio max=%x to_copy=%x copied=%x\n",
@@ -1020,7 +1020,7 @@ static void write_bup (AC97LinkState *s, int elapsed)
}
while (elapsed) {
- int temp = audio_MIN (elapsed, sizeof (s->silence));
+ int temp = MIN (elapsed, sizeof (s->silence));
while (temp) {
int copied = AUD_write (s->voice_po, s->silence, temp);
if (!copied)
@@ -1041,7 +1041,7 @@ static int read_audio (AC97LinkState *s, AC97BusMasterRegs *r,
int to_copy = 0;
SWVoiceIn *voice = (r - s->bm_regs) == MC_INDEX ? s->voice_mc : s->voice_pi;
- temp = audio_MIN (temp, max);
+ temp = MIN (temp, max);
if (!temp) {
*stop = 1;
@@ -1050,7 +1050,7 @@ static int read_audio (AC97LinkState *s, AC97BusMasterRegs *r,
while (temp) {
int acquired;
- to_copy = audio_MIN (temp, sizeof (tmpbuf));
+ to_copy = MIN (temp, sizeof (tmpbuf));
acquired = AUD_read (voice, tmpbuf, to_copy);
if (!acquired) {
*stop = 1;