NetBSD Problem Report #42792

From cross@distal.com  Fri Feb 12 04:16:40 2010
Return-Path: <cross@distal.com>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id 919F863B896
	for <gnats-bugs@gnats.netbsd.org>; Fri, 12 Feb 2010 04:16:40 +0000 (UTC)
Message-Id: <20100212041635.14E781FF4@skaro.distal.com>
Date: Thu, 11 Feb 2010 23:16:35 -0500 (EST)
From: cross+netbsd@distal.com
Reply-To: cross+netbsd@distal.com
To: gnats-bugs@gnats.NetBSD.org
Subject: Failure to build kernel with SIOP_DEBUG
X-Send-Pr-Version: 3.95

>Number:         42792
>Category:       kern
>Synopsis:       Error when building kernel with SIOP_DEBUG
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    kern-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Feb 12 04:20:00 +0000 2010
>Closed-Date:    Fri Feb 12 06:47:25 +0000 2010
>Last-Modified:  Fri Feb 12 06:47:25 +0000 2010
>Originator:     Chris Ross
>Release:        NetBSD 5.99.24 (February 11, 2010)
>Organization:
>Environment:
System: NetBSD skaro.distal.com 5.99.24 NetBSD 5.99.24 (GENERIC) #0: Tue Feb 9 03:36:40 EST 2010 cross@skaro.distal.com:/data/obj/NetBSD.i386/data/NetBSD/src/sys/arch/i386/compile/GENERIC i386
Architecture: i386
Machine: i386
>Description:
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.
>How-To-Repeat:
Modify a GENERIC kernel configuration for sparc64 to uncomment the following
line:

#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

>Fix:
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));
 #else

>Release-Note:

>Audit-Trail:
From: Chris Ross <cross+netbsd@distal.com>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/42792: Failure to build kernel with SIOP_DEBUG
Date: Thu, 11 Feb 2010 23:29:09 -0500

    Apologies.  Since sending in the initial report, I've realized that  
 options SIOP_DEBUG is in fact not in the sparc64 GENERIC kernel,  
 commented out or otherwise.  I simply added it there in my copy of the  
 config.  The original issue applies, however, for any config one adds  
 that option to.

    Thanks.

       - Chris

 On Feb 11, 2010, at 23:20, gnats-admin@NetBSD.org wrote:

 > Thank you very much for your problem report.
 > It has the internal identification `kern/42792'.
 > The individual assigned to look at your
 > report is: kern-bug-people.
 >
 >> Category:       kern
 >> Responsible:    kern-bug-people
 >> Synopsis:       Error when building kernel with SIOP_DEBUG
 >> Arrival-Date:   Fri Feb 12 04:20:00 +0000 2010

From: "David A. Holland" <dholland@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/42792 CVS commit: src/sys/dev/ic
Date: Fri, 12 Feb 2010 06:40:53 +0000

 Module Name:	src
 Committed By:	dholland
 Date:		Fri Feb 12 06:40:53 UTC 2010

 Modified Files:
 	src/sys/dev/ic: esiop.c

 Log Message:
 Make ESIOP_DEBUG compile (on some platforms? depends on bus definitions...)
 From Chris Ross in PR 42792.


 To generate a diff of this commit:
 cvs rdiff -u -r1.49 -r1.50 src/sys/dev/ic/esiop.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Fri, 12 Feb 2010 06:47:25 +0000
State-Changed-Why:
fixed, thanks


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.