Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

compiling kernel for cubietruck w/o "options DIAGNOSTIC"



Hi,

removing "options         DIAGNOSTIC" from .../conf/CUBIEBOARD
leads to some "undefined variable" warnings when compiling a new
kernel.

With the patches below, a kernel for CUBIETRUCK (which includes
CUBIEBOARD) compiles fine and is (still ;-) working w/o problems.

Kurt

cvs diff: Diffing sys/arch/arm/allwinner
Index: sys/arch/arm/allwinner/awin_eth.c
===================================================================
RCS file: /cvsroot/src/sys/arch/arm/allwinner/awin_eth.c,v
retrieving revision 1.7
diff -u -r1.7 awin_eth.c
--- sys/arch/arm/allwinner/awin_eth.c	6 Sep 2014 19:00:50 -0000	1.7
+++ sys/arch/arm/allwinner/awin_eth.c	15 Mar 2015 08:09:43 -0000
@@ -141,8 +141,8 @@
 static int
 awin_eth_match(device_t parent, cfdata_t cf, void *aux)
 {
-	struct awinio_attach_args * const aio = aux;
 #ifdef DIAGNOSTIC
+	struct awinio_attach_args * const aio = aux;
 	const struct awin_locators * const loc = &aio->aio_loc;
 #endif
 	const struct awin_gpio_pinset * const pinset =
Index: sys/arch/arm/allwinner/awin_gige.c
===================================================================
RCS file: /cvsroot/src/sys/arch/arm/allwinner/awin_gige.c,v
retrieving revision 1.21
diff -u -r1.21 awin_gige.c
--- sys/arch/arm/allwinner/awin_gige.c	7 Dec 2014 00:37:52 -0000	1.21
+++ sys/arch/arm/allwinner/awin_gige.c	15 Mar 2015 08:09:43 -0000
@@ -90,11 +90,11 @@
 static int
 awin_gige_match(device_t parent, cfdata_t cf, void *aux)
 {
-	struct awinio_attach_args * const aio = aux;
 	const struct awin_gpio_pinset *pinset =
 	    awin_chip_id() == AWIN_CHIP_ID_A31 ?
 	    &awin_gige_gpio_pinset_a31 : &awin_gige_gpio_pinset;
 #ifdef DIAGNOSTIC
+	struct awinio_attach_args * const aio = aux;
 	const struct awin_locators * const loc = &aio->aio_loc;
 #endif
 	if (cf->cf_flags & 1)
Index: sys/arch/arm/allwinner/awin_gpio.c
===================================================================
RCS file: /cvsroot/src/sys/arch/arm/allwinner/awin_gpio.c,v
retrieving revision 1.16
diff -u -r1.16 awin_gpio.c
--- sys/arch/arm/allwinner/awin_gpio.c	7 Dec 2014 18:32:13 -0000	1.16
+++ sys/arch/arm/allwinner/awin_gpio.c	15 Mar 2015 08:09:43 -0000
@@ -254,8 +254,10 @@
 static int
 awin_gpio_match(device_t parent, cfdata_t cf, void *aux)
 {
+#ifdef DIAGNOSTIC
 	struct awinio_attach_args * const aio = aux;
 	const struct awin_locators * const loc = &aio->aio_loc;
+#endif
 
 	KASSERT(!strcmp(cf->cf_name, loc->loc_name));
 	KASSERT(loc->loc_port == AWINIOCF_PORT_DEFAULT);
Index: sys/arch/arm/allwinner/awin_usb.c
===================================================================
RCS file: /cvsroot/src/sys/arch/arm/allwinner/awin_usb.c,v
retrieving revision 1.19
diff -u -r1.19 awin_usb.c
--- sys/arch/arm/allwinner/awin_usb.c	7 Dec 2014 16:20:33 -0000	1.19
+++ sys/arch/arm/allwinner/awin_usb.c	15 Mar 2015 08:09:44 -0000
@@ -403,8 +403,10 @@
 int
 awinusb_match(device_t parent, cfdata_t cf, void *aux)
 {
+#ifdef DIAGNOSTIC
 	struct awinio_attach_args * const aio = aux;
 	const struct awin_locators * const loc = &aio->aio_loc;
+#endif
 
 	KASSERT(loc->loc_port != AWINIOCF_PORT_DEFAULT);
 	KASSERT(!strcmp(cf->cf_name, loc->loc_name));



Home | Main Index | Thread Index | Old Index