[Compile Regression in 2.4.25-pre8][PATCH 30/42]

Kronos
2004-02-02T20:43:47Z

meye.c:212: warning: passing arg 3 of `dma_alloc_coherent' from incompatible pointer type

dma_addr_t is not u32!

diff -Nru -X dontdiff linux-2.4-vanilla/drivers/media/video/meye.c linux-2.4/drivers/media/video/meye.c
--- linux-2.4-vanilla/drivers/media/video/meye.c Tue Nov 11 17:51:38 2003
+++ linux-2.4/drivers/media/video/meye.c Sat Jan 31 18:27:19 2004
@@ -190,7 +190,7 @@

/* return a page table pointing to N pages of locked memory */
static int ptable_alloc(void) {
- u32 *pt;
+ dma_addr_t *pt;
int i;

memset(meye.mchip_ptable, 0, sizeof(meye.mchip_ptable));
@@ -204,7 +204,7 @@
return -1;
}

- pt = (u32 *)meye.mchip_ptable[MCHIP_NB_PAGES];
+ pt = (dma_addr_t *)meye.mchip_ptable[MCHIP_NB_PAGES];
for (i = 0; i < MCHIP_NB_PAGES; i++) {
meye.mchip_ptable[i] = dma_alloc_coherent(meye.mchip_dev,
PAGE_SIZE,
@@ -212,7 +212,7 @@
GFP_KERNEL);
if (!meye.mchip_ptable[i]) {
int j;
- pt = (u32 *)meye.mchip_ptable[MCHIP_NB_PAGES];
+ pt = (dma_addr_t *)meye.mchip_ptable[MCHIP_NB_PAGES];
for (j = 0; j < i; ++j) {
dma_free_coherent(meye.mchip_dev,
PAGE_SIZE,
@@ -228,10 +228,10 @@
}

static void ptable_free(void) {
- u32 *pt;
+ dma_addr_t *pt;
int i;

- pt = (u32 *)meye.mchip_ptable[MCHIP_NB_PAGES];
+ pt = (dma_addr_t *)meye.mchip_ptable[MCHIP_NB_PAGES];
for (i = 0; i < MCHIP_NB_PAGES; i++) {
if (meye.mchip_ptable[i])
dma_free_coherent(meye.mchip_dev,

--
Reply-To: kronos@kronoz.cjb.net
Home: http://kronoz.cjb.net
Il dottore mi ha detto di smettere di fare cene intime per quattro.
A meno che non ci siamo altre tre persone.