From nobody@FreeBSD.org  Tue Feb 13 23:39:26 2007
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 59B7C16A406
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 13 Feb 2007 23:39:26 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [69.147.83.33])
	by mx1.freebsd.org (Postfix) with ESMTP id 4D4AF13C4AC
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 13 Feb 2007 23:39:26 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id l1DNdQFQ066531
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 13 Feb 2007 23:39:26 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id l1DNdQjA066530;
	Tue, 13 Feb 2007 23:39:26 GMT
	(envelope-from nobody)
Message-Id: <200702132339.l1DNdQjA066530@www.freebsd.org>
Date: Tue, 13 Feb 2007 23:39:26 GMT
From: "O. Hartmann"<ohartman@zedat.fu-berlin.de>
To: freebsd-gnats-submit@FreeBSD.org
Subject: snd_envy24ht does not compile into kernel, but module .ko does
X-Send-Pr-Version: www-3.0

>Number:         109147
>Category:       kern
>Synopsis:       snd_envy24ht does not compile into kernel, but module .ko does
>Confidential:   no
>Severity:       non-critical
>Priority:       high
>Responsible:    freebsd-multimedia
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Feb 13 23:40:05 GMT 2007
>Closed-Date:    Wed Feb 14 15:32:56 GMT 2007
>Last-Modified:  Wed Feb 14 15:32:56 GMT 2007
>Originator:     O. Hartmann
>Release:        FreeBSD 7.0-CURRENT/AMD64
>Organization:
Freie UNiversitt Berlin
>Environment:
FreeBSD foo.org 7.0-CURRENT FreeBSD 7.0-CURRENT #91: Tue Feb 13 18:47:14 UTC 2007     root@foo.org:/usr/obj/usr/src/sys/FOO  amd64

>Description:
Trying to compile driver snd_envy24ht into kernel fails (see below), but kernel module compiles well and is loadable. FreeBSD 7.0-CURRENT/AMD64 as cvsupdated and buildworld today:


cc -c -O2 -frename-registers -pipe -fno-strict-aliasing -march=opteron -std=c99  -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef -fformat-extensions -nostdinc -I-  -I. -I/usr/src/sys -I/usr/src/sys/contrib/altq -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000  -mcmodel=kernel -mno-red-zone  -mfpmath=387 -mno-sse -mno-sse2 -mno-mmx -mno-3dnow  -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -Werror  /usr/src/sys/dev/sound/pci/envy24ht.c
/usr/src/sys/dev/sound/pci/envy24ht.c: In function `envy24htchan_init':
/usr/src/sys/dev/sound/pci/envy24ht.c:1426: warning: dereferencing `void *' pointer
/usr/src/sys/dev/sound/pci/envy24ht.c:1426: error: request for member `mtx_lock' in something not a structure or union
/usr/src/sys/dev/sound/pci/envy24ht.c:1450: warning: dereferencing `void *' pointer
/usr/src/sys/dev/sound/pci/envy24ht.c:1450: error: request for member `mtx_lock' in something not a structure or union
/usr/src/sys/dev/sound/pci/envy24ht.c:1452: warning: dereferencing `void *' pointer
/usr/src/sys/dev/sound/pci/envy24ht.c:1452: error: request for member `mtx_lock' in something not a structure or union
/usr/src/sys/dev/sound/pci/envy24ht.c:1457: warning: dereferencing `void *' pointer
/usr/src/sys/dev/sound/pci/envy24ht.c:1457: error: request for member `mtx_lock' in something not a structure or union
/usr/src/sys/dev/sound/pci/envy24ht.c: In function `envy24htchan_free':
/usr/src/sys/dev/sound/pci/envy24ht.c:1471: warning: dereferencing `void *' pointer
/usr/src/sys/dev/sound/pci/envy24ht.c:1471: error: request for member `mtx_lock' in something not a structure or union
/usr/src/sys/dev/sound/pci/envy24ht.c:1476: warning: dereferencing `void *' pointer
/usr/src/sys/dev/sound/pci/envy24ht.c:1476: error: request for member `mtx_lock' in something not a structure or union
/usr/src/sys/dev/sound/pci/envy24ht.c: In function `envy24htchan_setformat':
/usr/src/sys/dev/sound/pci/envy24ht.c:1493: warning: dereferencing `void *' pointer
/usr/src/sys/dev/sound/pci/envy24ht.c:1493: error: request for member `mtx_lock' in something not a structure or union
/usr/src/sys/dev/sound/pci/envy24ht.c:1500: warning: dereferencing `void *' pointer
/usr/src/sys/dev/sound/pci/envy24ht.c:1500: error: request for member `mtx_lock' in something not a structure or union
/usr/src/sys/dev/sound/pci/envy24ht.c:1507: warning: dereferencing `void *' pointer
/usr/src/sys/dev/sound/pci/envy24ht.c:1507: error: request for member `mtx_lock' in something not a structure or union
/usr/src/sys/dev/sound/pci/envy24ht.c:1531: warning: dereferencing `void *' pointer
/usr/src/sys/dev/sound/pci/envy24ht.c:1531: error: request for member `mtx_lock' in something not a structure or union
/usr/src/sys/dev/sound/pci/envy24ht.c: In function `envy24htchan_trigger':
/usr/src/sys/dev/sound/pci/envy24ht.c:1627: warning: dereferencing `void *' pointer
/usr/src/sys/dev/sound/pci/envy24ht.c:1627: error: request for member `mtx_lock' in something not a structure or union
/usr/src/sys/dev/sound/pci/envy24ht.c:1711: warning: dereferencing `void *' pointer
/usr/src/sys/dev/sound/pci/envy24ht.c:1711: error: request for member `mtx_lock' in something not a structure or union
/usr/src/sys/dev/sound/pci/envy24ht.c: In function `envy24htchan_getptr':
/usr/src/sys/dev/sound/pci/envy24ht.c:1727: warning: dereferencing `void *' pointer
/usr/src/sys/dev/sound/pci/envy24ht.c:1727: error: request for member `mtx_lock' in something not a structure or union
/usr/src/sys/dev/sound/pci/envy24ht.c:1730: warning: dereferencing `void *' pointer
/usr/src/sys/dev/sound/pci/envy24ht.c:1730: error: request for member `mtx_lock' in something not a structure or union
/usr/src/sys/dev/sound/pci/envy24ht.c: In function `envy24htchan_getcaps':
/usr/src/sys/dev/sound/pci/envy24ht.c:1749: warning: dereferencing `void *' pointer
/usr/src/sys/dev/sound/pci/envy24ht.c:1749: error: request for member `mtx_lock' in something not a structure or union
/usr/src/sys/dev/sound/pci/envy24ht.c:1762: warning: dereferencing `void *' pointer
/usr/src/sys/dev/sound/pci/envy24ht.c:1762: error: request for member `mtx_lock' in something not a structure or union
/usr/src/sys/dev/sound/pci/envy24ht.c: In function `envy24htmixer_init':
/usr/src/sys/dev/sound/pci/envy24ht.c:1796: warning: dereferencing `void *' pointer
/usr/src/sys/dev/sound/pci/envy24ht.c:1796: error: request for member `mtx_lock' in something not a structure or union

>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-multimedia 
Responsible-Changed-By: remko 
Responsible-Changed-When: Wed Feb 14 06:42:53 UTC 2007 
Responsible-Changed-Why:  
Over to maintainer. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=109147 

From: Ariff Abdullah <ariff@FreeBSD.org>
To: bug-followup@FreeBSD.org,ohartman@zedat.fu-berlin.de
Cc:  
Subject: Re: kern/109147: snd_envy24ht does not compile into kernel,  but
 module .ko does
Date: Wed, 14 Feb 2007 14:51:09 +0800

 This is a multi-part message in MIME format.
 
 --Multipart=_Wed__14_Feb_2007_14_51_09_+0800_RotbK_zyYFyupGZz
 Content-Type: text/plain; charset=US-ASCII
 Content-Transfer-Encoding: 7bit
 
 This patch should fix it.
 
 
 --
 Ariff Abdullah
 FreeBSD
 
 ... Recording in stereo is obviously too advanced
     and confusing for us idiot ***** users :P ........
 
 --Multipart=_Wed__14_Feb_2007_14_51_09_+0800_RotbK_zyYFyupGZz
 Content-Type: text/x-diff;
  name="envy24.diff"
 Content-Disposition: attachment;
  filename="envy24.diff"
 Content-Transfer-Encoding: 7bit
 
 Index: src/sys/dev/sound/pci/envy24.c
 ===================================================================
 RCS file: /home/ncvs/src/sys/dev/sound/pci/envy24.c,v
 retrieving revision 1.5
 diff -u -r1.5 envy24.c
 --- src/sys/dev/sound/pci/envy24.c	17 Dec 2006 16:06:45 -0000	1.5
 +++ src/sys/dev/sound/pci/envy24.c	14 Feb 2007 06:44:59 -0000
 @@ -109,7 +109,7 @@
  /* device private data */
  struct sc_info {
  	device_t	dev;
 -	void		*lock;
 +	struct mtx	*lock;
  
  	/* Control/Status registor */
  	struct resource *cs;
 Index: src/sys/dev/sound/pci/envy24ht.c
 ===================================================================
 RCS file: /home/ncvs/src/sys/dev/sound/pci/envy24ht.c,v
 retrieving revision 1.6
 diff -u -r1.6 envy24ht.c
 --- src/sys/dev/sound/pci/envy24ht.c	17 Dec 2006 16:06:45 -0000	1.6
 +++ src/sys/dev/sound/pci/envy24ht.c	14 Feb 2007 06:45:00 -0000
 @@ -110,7 +110,7 @@
  /* device private data */
  struct sc_info {
  	device_t	dev;
 -	void		*lock;
 +	struct mtx	*lock;
  
  	/* Control/Status registor */
  	struct resource *cs;
 Index: src/sys/dev/sound/pci/spicds.c
 ===================================================================
 RCS file: /home/ncvs/src/sys/dev/sound/pci/spicds.c,v
 retrieving revision 1.4
 diff -u -r1.4 spicds.c
 --- src/sys/dev/sound/pci/spicds.c	30 Sep 2006 16:53:40 -0000	1.4
 +++ src/sys/dev/sound/pci/spicds.c	14 Feb 2007 06:45:00 -0000
 @@ -45,7 +45,7 @@
  	unsigned int dvc;    /* De-emphasis and Volume Control */
  	unsigned int left, right;
  	char name[SPICDS_NAMELEN];
 -	void *lock;
 +	struct mtx *lock;
  };
  
  static void
 
 --Multipart=_Wed__14_Feb_2007_14_51_09_+0800_RotbK_zyYFyupGZz--

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/109147: commit references a PR
Date: Wed, 14 Feb 2007 15:23:51 +0000 (UTC)

 ariff       2007-02-14 15:23:44 UTC
 
   FreeBSD src repository
 
   Modified files:
     sys/dev/sound/pci    envy24.c envy24ht.c spicds.c 
   Log:
   Fix compilation for statically linked snd_envy24{ht}/spicds. Use explicit
   struct mtx rather than void pointer.
   
   PR:     kern/109147
   
   Revision  Changes    Path
   1.6       +1 -1      src/sys/dev/sound/pci/envy24.c
   1.7       +1 -1      src/sys/dev/sound/pci/envy24ht.c
   1.5       +1 -1      src/sys/dev/sound/pci/spicds.c
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: open->closed 
State-Changed-By: ariff 
State-Changed-When: Wed Feb 14 15:32:29 UTC 2007 
State-Changed-Why:  
Fix committed. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=109147 
>Unformatted:
