Subject: kernel compile error in ray(4)
To: None <current-users@netbsd.org>
From: KIYOHARA Takashi <kiyohara@kk.iij4u.or.jp>
List: current-users
Date: 09/09/2005 02:51:51
----Next_Part(Fri_Sep__9_02:51:51_2005_499)--
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hi! all,


I can't cross compile if_ray.c, because about arg type mismatch.  Its
target is evbppc.

See send-pr kern/29668

  http://www.netbsd.org/cgi-bin/query-pr-single.pl?number=29668


Please Fix !!!  ;-)


error messeges --

root@highpriestess: {13} /usr/src/cross/powerpc/bin/nbmake-evbppc
#   compile  OPENBLOCKS266_OPT/if_ray.o
/usr/src/cross/powerpc/bin/powerpc--netbsd-gcc -mcpu=403 -msoft-float -Wa,-maltivec -ffreestanding -g -O2 -Wreturn-type -Werror -Wall -Wno-main -Wno-format-zero-length -Wpointer-arith -Wmissing-prototypes -Wstrict-prototypes -Wreturn-type -Wswitch -Wshadow -Wcast-qual -Wwrite-strings -Wno-sign-compare -fno-zero-initialized-in-bss -D__obs405__ -Devbppc=evbppc -I. -I../../../../arch -I../../../.. -nostdinc -DPPC_INTR_IMPL=<powerpc/ibm4xx/ibm4xx_intr.h> -DPPC_PCI_MACHDEP_IMPL=<powerpc/ibm4xx/pci_machdep.h> -DKERNBASE=0x25000 -DSPILLSTK=1024 -DDEBUG -DTRAP_PANICWAIT -DEXT2FS_SYSTEM_FLAGS -DEMAC_EVENT_COUNTERS -DMAXUSERS=32 -D_KERNEL -D_KERNEL_OPT -I../../../../dist/ipf -c ../../../../dev/pcmcia/if_ray.c
../../../../dev/pcmcia/if_ray.c: In function `ray_fill_in_tx_ccs':
../../../../dev/pcmcia/if_ray.c:1742: warning: long unsigned int format, bus_size_t arg (arg 3)
../../../../dev/pcmcia/if_ray.c: In function `ray_check_ccs':
../../../../dev/pcmcia/if_ray.c:1869: warning: long unsigned int format, bus_size_t arg (arg 4)
../../../../dev/pcmcia/if_ray.c: In function `ray_ccs_done':
../../../../dev/pcmcia/if_ray.c:1950: warning: long int format, bus_size_t arg (arg 3)
../../../../dev/pcmcia/if_ray.c: In function `ray_rccs_intr':
../../../../dev/pcmcia/if_ray.c:2051: warning: long int format, bus_size_t arg (arg 3)
../../../../dev/pcmcia/if_ray.c: In function `ray_free_ccs':
../../../../dev/pcmcia/if_ray.c:2171: warning: long int format, bus_size_t arg (arg 3)

*** Failed target:  if_ray.o
*** Failed command: echo '# ' "compile OPENBLOCKS266_OPT/if_ray.o"; echo /usr/src/cross/powerpc/bin/powerpc--netbsd-gcc -mcpu=403 -msoft-float -Wa,-maltivec -ffreestanding -g -O2 -Wreturn-type -Werror -Wall -Wno-main -Wno-format-zero-length -Wpointer-arith -Wmissing-prototypes -Wstrict-prototypes -Wreturn-type -Wswitch -Wshadow -Wcast-qual -Wwrite-strings -Wno-sign-compare -fno-zero-initialized-in-bss -D__obs405__ -Devbppc=evbppc -I. -I../../../../arch -I../../../.. -nostdinc -DPPC_INTR_IMPL="<powerpc/ibm4xx/ibm4xx_intr.h>" -DPPC_PCI_MACHDEP_IMPL="<powerpc/ibm4xx/pci_machdep.h>" -DKERNBASE="0x25000" -DSPILLSTK="1024" -DDEBUG -DTRAP_PANICWAIT -DEXT2FS_SYSTEM_FLAGS -DEMAC_EVENT_COUNTERS -DMAXUSERS=32 -D_KERNEL -D_KERNEL_OPT -I../../../../dist/ipf -c ../../../../dev/pcmcia/if_ray.c; /usr/src/cross/powerpc/bin/powerpc--netbsd-gcc -mcpu=403 -msoft-float -Wa,-maltivec -ffreestanding -g -O2 -Wreturn-type -Werror -Wall -Wno-main -Wno-format-zero-length -Wpointer-arith -Wmissing-prot!
 otypes -Wstrict-prototypes -Wreturn-type -Wswitch -Wshadow -Wcast-qual -Wwrite-strings -Wno-sign-compare -fno-zero-initialized-in-bss -D__obs405__ -Devbppc=evbppc -I. -I../../../../arch -I../../../.. -nostdinc -DPPC_INTR_IMPL="<powerpc/ibm4xx/ibm4xx_intr.h>" -DPPC_PCI_MACHDEP_IMPL="<powerpc/ibm4xx/pci_machdep.h>" -DKERNBASE="0x25000" -DSPILLSTK="1024" -DDEBUG -DTRAP_PANICWAIT -DEXT2FS_SYSTEM_FLAGS -DEMAC_EVENT_COUNTERS -DMAXUSERS=32 -D_KERNEL -D_KERNEL_OPT -I../../../../dist/ipf -c ../../../../dev/pcmcia/if_ray.c
*** Error code 1

Stop.
nbmake: stopped in /usr/src/sys/arch/evbppc/compile/OPENBLOCKS266_OPT

--
kiyohara


----Next_Part(Fri_Sep__9_02:51:51_2005_499)--
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="ray.diff"

Index: if_ray.c
===================================================================
RCS file: /cvsroot/src/sys/dev/pcmcia/if_ray.c,v
retrieving revision 1.57
diff -u -r1.57 if_ray.c
--- if_ray.c	30 May 2005 04:28:49 -0000	1.57
+++ if_ray.c	8 Sep 2005 17:30:33 -0000
@@ -1740,7 +1740,7 @@
 		SRAM_WRITE_FIELD_1(sc, RAY_GET_CCS(pi), ray_cmd_tx, c_link, i);
 
 	RAY_DPRINTF(("%s: ray_alloc_tx_ccs bufp 0x%lx idx %d pidx %d \n",
-	    sc->sc_xname, bufp, i, pi));
+	    sc->sc_xname, (long)bufp, i, pi));
 
 	return (bufp + RAY_TX_PHY_SIZE);
 }
@@ -1868,7 +1868,7 @@
 			stat = SRAM_READ_FIELD_1(sc, ccs, ray_cmd, c_status);
 			RAY_DPRINTF(("%s: check ccs idx %d ccs 0x%lx "
 			    "cmd 0x%x stat %d\n", sc->sc_xname, i,
-			    ccs, cmd, stat));
+			    (long)ccs, cmd, stat));
 			goto breakout;
 		}
 	}
@@ -1948,7 +1948,7 @@
 	stat = SRAM_READ_FIELD_1(sc, ccs, ray_cmd, c_status);
 
 	RAY_DPRINTF(("%s: ray_ccs_done idx %ld cmd 0x%x stat %d\n",
-	    sc->sc_xname, RAY_GET_INDEX(ccs), cmd, stat));
+	    sc->sc_xname, (long)RAY_GET_INDEX(ccs), cmd, stat));
 
 	rcmd = 0;
 	switch (cmd) {
@@ -2049,7 +2049,7 @@
 	stat = SRAM_READ_FIELD_1(sc, ccs, ray_cmd, c_status);
 
 	RAY_DPRINTF(("%s: ray_rccs_intr idx %ld cmd 0x%x stat %d\n",
-	    sc->sc_xname, RAY_GET_INDEX(ccs), cmd, stat));
+	    sc->sc_xname, (long)RAY_GET_INDEX(ccs), cmd, stat));
 
 	rcmd = 0;
 	switch (cmd) {
@@ -2169,7 +2169,7 @@
 	u_int8_t stat;
 
 	RAY_DPRINTF(("%s: free_ccs idx %ld\n", sc->sc_xname,
-	    RAY_GET_INDEX(ccs)));
+	    (long)RAY_GET_INDEX(ccs)));
 
 	stat = SRAM_READ_FIELD_1(sc, ccs, ray_cmd, c_status);
 	SRAM_WRITE_FIELD_1(sc, ccs, ray_cmd, c_status, RAY_CCS_STATUS_FREE);

----Next_Part(Fri_Sep__9_02:51:51_2005_499)----