summaryrefslogtreecommitdiff
path: root/drivers/dahdi/voicebus
diff options
context:
space:
mode:
authorShaun Ruffell <sruffell@digium.com>2010-06-29 20:20:20 +0000
committerShaun Ruffell <sruffell@digium.com>2010-06-29 20:20:20 +0000
commit7cadac1fead05e812316f76ac8f7f8489ec1a4d3 (patch)
treea2f887b32dd1921f9c421d3aefa78bcaaaa4d75d /drivers/dahdi/voicebus
parentb704620f4723debac4a4a59ef47a34fecaa0fd44 (diff)
wctdm24xxp, wcte12xp: Fix "operation on may be undefined" warning.
gcc 4.5.0 generates a warning on the changed lines and http://gcc.gnu.org/ml/gcc/2004-10/msg00032.html explains why. Essentially, the only thing guaranteed with the preincrement operator is that the value will be incremented before the assignment. It's undefined where in the sequence the mask will be applied. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8832 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers/dahdi/voicebus')
-rw-r--r--drivers/dahdi/voicebus/voicebus.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/dahdi/voicebus/voicebus.c b/drivers/dahdi/voicebus/voicebus.c
index 8e50332..eeceddc 100644
--- a/drivers/dahdi/voicebus/voicebus.c
+++ b/drivers/dahdi/voicebus/voicebus.c
@@ -614,7 +614,7 @@ int voicebus_transmit(struct voicebus *vb, struct vbb *vbb)
dl->pending[dl->tail] = vbb;
d->buffer1 = dma_map_single(&vb->pdev->dev, vbb->data,
sizeof(vbb->data), DMA_TO_DEVICE);
- dl->tail = (++(dl->tail)) & DRING_MASK;
+ dl->tail = (dl->tail + 1) & DRING_MASK;
SET_OWNED(d); /* That's it until the hardware is done with it. */
atomic_inc(&dl->count);
return 0;
@@ -1309,7 +1309,7 @@ static void vb_tasklet_normal(unsigned long data)
if (d->buffer1 != vb->idle_vbb_dma_addr)
goto tx_error_exit;
SET_OWNED(d);
- dl->head = ++dl->head & DRING_MASK;
+ dl->head = (dl->head + 1) & DRING_MASK;
d = vb_descriptor(dl, dl->head);
++behind;
}
@@ -1334,7 +1334,7 @@ static void vb_tasklet_normal(unsigned long data)
if (d->buffer1 != vb->idle_vbb_dma_addr)
goto tx_error_exit;
SET_OWNED(d);
- dl->head = ++dl->head & DRING_MASK;
+ dl->head = (dl->head + 1) & DRING_MASK;
d = vb_descriptor(dl, dl->head);
++behind;
}
@@ -1344,7 +1344,7 @@ static void vb_tasklet_normal(unsigned long data)
d->buffer1 = vb->idle_vbb_dma_addr;
dl->pending[dl->head] = vb->idle_vbb;
d->des0 |= OWN_BIT;
- dl->head = ++dl->head & DRING_MASK;
+ dl->head = (dl->head + 1) & DRING_MASK;
}
dl->tail = dl->head;
}