NetBSD-Bugs archive

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

kern/42792: Failure to build kernel with SIOP_DEBUG

>Number:         42792
>Category:       kern
>Synopsis:       Error when building kernel with SIOP_DEBUG
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Feb 12 04:20:00 +0000 2010
>Originator:     Chris Ross
>Release:        NetBSD 5.99.24 (February 11, 2010)
System: NetBSD 5.99.24 NetBSD 5.99.24 (GENERIC) #0: Tue Feb 9 
03:36:40 EST 2010
Architecture: i386
Machine: i386
When building a kernel that includes an esiop device, and uncommenting the
SIOP_DEBUG option in the kernel configuration file, the kernel will fail to
build.  This is an issue that I ran into a couple/few years ago as well, but
clearly failed to report it in the correct way, and clearly affects noone
in the "normal" case.
Modify a GENERIC kernel configuration for sparc64 to uncomment the following

#options SIOP_DEBUG

.. or add that option to any other kernel configuration which has an esiop
driver configured in it.

Attempt to build this kernel.  The following error will be produced:

#   compile  INSTALL/esiop.o
cc1: warnings being treated as errors
/data/NetBSD/src/sys/dev/ic/esiop.c: In function 'esiop_timeout':
/data/NetBSD/src/sys/dev/ic/esiop.c:1822: warning: value computed is not used

The following patch works around the problem.  Whether it's the best solution
I'm not 100% certain.

Index: sys/dev/ic/esiop.c
RCS file: /cvsroot/src/sys/dev/ic/esiop.c,v
retrieving revision 1.49
diff -u -r1.49 esiop.c
--- sys/dev/ic/esiop.c  19 Oct 2009 18:41:12 -0000      1.49
+++ sys/dev/ic/esiop.c  12 Feb 2010 02:21:51 -0000
@@ -1819,7 +1819,7 @@
            (u_long)(bus_space_read_4(sc->sc_c.sc_rt, sc->sc_c.sc_rh, SIOP_DSP)
            - sc->sc_c.sc_scriptaddr),
            bus_space_read_4(sc->sc_c.sc_rt, sc->sc_c.sc_rh, SIOP_DSA));
-       bus_space_read_1(sc->sc_c.sc_rt, sc->sc_c.sc_rh, SIOP_CTEST2);
+       (void)bus_space_read_1(sc->sc_c.sc_rt, sc->sc_c.sc_rh, SIOP_CTEST2);
        printf("istat 0x%x\n",
            bus_space_read_1(sc->sc_c.sc_rt, sc->sc_c.sc_rh, SIOP_ISTAT));

Home | Main Index | Thread Index | Old Index