summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorTobias Diedrich <ranma+coreboot@tdiedrich.de>2010-06-03 18:29:06 +0000
committerTobias Diedrich <ranma+coreboot@tdiedrich.de>2010-06-03 18:29:06 +0000
commit3f44f1c151fd47689719676f40fdda58a2ac837f (patch)
tree608a2a5205113d882238b9213cae40490fc34606 /firmware
parent9cc7c53577d7d1de34a0069aaff7ff7dea835784 (diff)
Using void instead of unsigned char fixes the strict-aliasing warnings with -Os and gets rid of some casts. And we already use void pointer arithmetic in several other places.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26518 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/target/arm/as3525/pcm-as3525.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/firmware/target/arm/as3525/pcm-as3525.c b/firmware/target/arm/as3525/pcm-as3525.c
index 9f31d623fe..6794875e49 100644
--- a/firmware/target/arm/as3525/pcm-as3525.c
+++ b/firmware/target/arm/as3525/pcm-as3525.c
@@ -35,7 +35,7 @@
* and the number of 32bits words has to
* fit in 11 bits of DMA register */
-static unsigned char *dma_start_addr;
+static void *dma_start_addr;
static size_t dma_size; /* in 4*32 bits */
static void dma_callback(void);
static int locked = 0;
@@ -89,7 +89,7 @@ static void dma_callback(void)
if(!dma_size)
{
- pcm_play_get_more_callback((void **)&dma_start_addr, &dma_size);
+ pcm_play_get_more_callback(&dma_start_addr, &dma_size);
if (!dma_size)
return;
@@ -188,7 +188,7 @@ size_t pcm_get_bytes_waiting(void)
const void * pcm_play_dma_get_peak_buffer(int *count)
{
pcm_play_lock();
- unsigned char *addr = (void*)DMAC_CH_SRC_ADDR(1);
+ void *addr = (void*)DMAC_CH_SRC_ADDR(1);
*count = (dma_size - (addr - dma_start_addr)) >> 2;
pcm_play_unlock();
return AS3525_UNCACHED_ADDR(addr);
@@ -212,7 +212,7 @@ void * pcm_dma_addr(void *addr)
static int rec_locked = 0;
static bool is_recording = false;
static bool rec_callback_pending = false;
-static unsigned char *rec_dma_start_addr;
+static void *rec_dma_start_addr;
static size_t rec_dma_size, rec_dma_transfer_size;
static void rec_dma_callback(void);
#if CONFIG_CPU == AS3525
@@ -315,7 +315,7 @@ static void rec_dma_callback(void)
if(!rec_dma_size)
{
- pcm_rec_more_ready_callback(0, (void **)&rec_dma_start_addr,
+ pcm_rec_more_ready_callback(0, &rec_dma_start_addr,
&rec_dma_size);
if(rec_dma_size == 0)