All of lore.kernel.org
 help / color / mirror / Atom feed
* CVS compile issue
@ 2005-07-16  2:49 Lee Revell
  2005-07-17  3:58 ` Raymond
  2005-08-11 11:17 ` Raymond
  0 siblings, 2 replies; 8+ messages in thread
From: Lee Revell @ 2005-07-16  2:49 UTC (permalink / raw)
  To: alsa-devel

Kernel is 2.6.12-RT-V0.7.51-28.

  CC [M]  /smb/rlrevell/cvs/alsa/alsa-driver/pci/ac97/ac97_codec.o
In file included from /smb/rlrevell/cvs/alsa/alsa-driver/pci/ac97/ac97_codec.c:1:
/smb/rlrevell/cvs/alsa/alsa-driver/pci/ac97/../../alsa-kernel/pci/ac97/ac97_codec.c: In function 'snd_ac97_resume':
/smb/rlrevell/cvs/alsa/alsa-driver/include/adriver.h:644: sorry, unimplemented: inlining failed in call to 'msecs_to_jiffies': function body not available
/smb/rlrevell/cvs/alsa/alsa-driver/pci/ac97/../../alsa-kernel/pci/ac97/ac97_codec.c:2252: sorry, unimplemented: called from here
/smb/rlrevell/cvs/alsa/alsa-driver/include/adriver.h:644: sorry, unimplemented: inlining failed in call to 'msecs_to_jiffies': function body not available
/smb/rlrevell/cvs/alsa/alsa-driver/pci/ac97/../../alsa-kernel/pci/ac97/ac97_codec.c:2264: sorry, unimplemented: called from here
make[4]: *** [/smb/rlrevell/cvs/alsa/alsa-driver/pci/ac97/ac97_codec.o] Error 1
make[3]: *** [/smb/rlrevell/cvs/alsa/alsa-driver/pci/ac97] Error 2
make[2]: *** [/smb/rlrevell/cvs/alsa/alsa-driver/pci] Error 2
make[1]: *** [_module_/smb/rlrevell/cvs/alsa/alsa-driver] Error 2
make[1]: Leaving directory `/smb/rlrevell/kernel-source/linux-2.6.12-c3'
make: *** [compile] Error 2

Lee



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: CVS compile issue
  2005-07-16  2:49 CVS compile issue Lee Revell
@ 2005-07-17  3:58 ` Raymond
  2005-08-11 11:17 ` Raymond
  1 sibling, 0 replies; 8+ messages in thread
From: Raymond @ 2005-07-17  3:58 UTC (permalink / raw)
  To: alsa-devel


http://cvs.sourceforge.net/viewcvs.py/alsa/alsa-driver/pci/au88x0/au88x0.c?r1=1.6&r2=1.7&sortby=date&diff_format=u
* fixed the DMA allocation.
   pci_set_dma_mask() is called together with pci_set_consistent_dma_mask().
   also clean up the double check of mask.
http://cvs.sourceforge.net/viewcvs.py/alsa/alsa-driver/pci/au88x0/au88x0.c?r1=1.8&r2=1.9&sortby=date&diff_format=u
* added snd_card_set_dev() macro.
* sysfsfied more pci, isapnp and usb drivers.


These patches to alsa-driver (related to kernel 2.6) are missing when 
the au88x0 merged into alsa-kernel.

http://cvs.sourceforge.net/viewcvs.py/*checkout*/alsa/alsa-kernel/pci/au88x0/au88x0.c?rev=1.18


Lee Revell wrote:
> Kernel is 2.6.12-RT-V0.7.51-28.
> 
>   CC [M]  /smb/rlrevell/cvs/alsa/alsa-driver/pci/ac97/ac97_codec.o
> In file included from /smb/rlrevell/cvs/alsa/alsa-driver/pci/ac97/ac97_codec.c:1:
> /smb/rlrevell/cvs/alsa/alsa-driver/pci/ac97/../../alsa-kernel/pci/ac97/ac97_codec.c: In function 'snd_ac97_resume':
> /smb/rlrevell/cvs/alsa/alsa-driver/include/adriver.h:644: sorry, unimplemented: inlining failed in call to 'msecs_to_jiffies': function body not available
> /smb/rlrevell/cvs/alsa/alsa-driver/pci/ac97/../../alsa-kernel/pci/ac97/ac97_codec.c:2252: sorry, unimplemented: called from here
> /smb/rlrevell/cvs/alsa/alsa-driver/include/adriver.h:644: sorry, unimplemented: inlining failed in call to 'msecs_to_jiffies': function body not available
> /smb/rlrevell/cvs/alsa/alsa-driver/pci/ac97/../../alsa-kernel/pci/ac97/ac97_codec.c:2264: sorry, unimplemented: called from here
> make[4]: *** [/smb/rlrevell/cvs/alsa/alsa-driver/pci/ac97/ac97_codec.o] Error 1
> make[3]: *** [/smb/rlrevell/cvs/alsa/alsa-driver/pci/ac97] Error 2
> make[2]: *** [/smb/rlrevell/cvs/alsa/alsa-driver/pci] Error 2
> make[1]: *** [_module_/smb/rlrevell/cvs/alsa/alsa-driver] Error 2
> make[1]: Leaving directory `/smb/rlrevell/kernel-source/linux-2.6.12-c3'
> make: *** [compile] Error 2
> 



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: CVS compile issue
  2005-07-16  2:49 CVS compile issue Lee Revell
  2005-07-17  3:58 ` Raymond
@ 2005-08-11 11:17 ` Raymond
  2005-08-11 12:52   ` Takashi Iwai
  1 sibling, 1 reply; 8+ messages in thread
From: Raymond @ 2005-08-11 11:17 UTC (permalink / raw)
  To: alsa-devel

There is a "division by zero" warning for drivers which include
"driver.h" on Kernel 2.4


gcc32 -D__KERNEL__ -DMODULE=1 -I/alsa/cvs/alsa-driver/include
-I/lib/modules/2.4.22-1.2199.nptl/build/include -O2
-mpreferred-stack-boundary=2 -march=i686 -DLINUX -Wall
-Wstrict-prototypes -fomit-frame-pointer -Wno-trigraphs -O2
-fno-strict-aliasing -fno-common -pipe -DALSA_BUILD -nostdinc
-iwithprefix include -DMODVERSIONS -include
/lib/modules/2.4.22-1.2199.nptl/build/include/linux/modversions.h
-DKBUILD_BASENAME=intel8x0   -c -o intel8x0.o intel8x0.c
In file included from /alsa/cvs/alsa-driver/include/sound/driver.h:42,
                  from intel8x0.c:29:
/alsa/cvs/alsa-driver/include/adriver.h: In function `jiffies_to_msecs':
/alsa/cvs/alsa-driver/include/adriver.h:639: warning: division by zero

gcc32 -D__KERNEL__ -DMODULE=1 -I/alsa/cvs/alsa-driver/include
-I/lib/modules/2.4.22-1.2199.nptl/build/include -O2
-mpreferred-stack-boundary=2 -march=i686 -DLINUX -Wall
-Wstrict-prototypes -fomit-frame-pointer -Wno-trigraphs -O2
-fno-strict-aliasing -fno-common -pipe -DALSA_BUILD -nostdinc
-iwithprefix include -DMODVERSIONS -include
/lib/modules/2.4.22-1.2199.nptl/build/include/linux/modversions.h
-DKBUILD_BASENAME=au8830   -c -o au8830.o au8830.c
In file included from /alsa/cvs/alsa-driver/include/sound/driver.h:42,
                  from pci-ids.h:1,
                  from au8830.c:1:
/alsa/cvs/alsa-driver/include/adriver.h: In function `jiffies_to_msecs':
/alsa/cvs/alsa-driver/include/adriver.h:639: warning: division by zero



Lee Revell wrote:
> Kernel is 2.6.12-RT-V0.7.51-28.
> 
>   CC [M]  /smb/rlrevell/cvs/alsa/alsa-driver/pci/ac97/ac97_codec.o
> In file included from /smb/rlrevell/cvs/alsa/alsa-driver/pci/ac97/ac97_codec.c:1:
> /smb/rlrevell/cvs/alsa/alsa-driver/pci/ac97/../../alsa-kernel/pci/ac97/ac97_codec.c: In function 'snd_ac97_resume':
> /smb/rlrevell/cvs/alsa/alsa-driver/include/adriver.h:644: sorry, unimplemented: inlining failed in call to 'msecs_to_jiffies': function body not available
> /smb/rlrevell/cvs/alsa/alsa-driver/pci/ac97/../../alsa-kernel/pci/ac97/ac97_codec.c:2252: sorry, unimplemented: called from here
> /smb/rlrevell/cvs/alsa/alsa-driver/include/adriver.h:644: sorry, unimplemented: inlining failed in call to 'msecs_to_jiffies': function body not available
> /smb/rlrevell/cvs/alsa/alsa-driver/pci/ac97/../../alsa-kernel/pci/ac97/ac97_codec.c:2264: sorry, unimplemented: called from here
> make[4]: *** [/smb/rlrevell/cvs/alsa/alsa-driver/pci/ac97/ac97_codec.o] Error 1
> make[3]: *** [/smb/rlrevell/cvs/alsa/alsa-driver/pci/ac97] Error 2
> make[2]: *** [/smb/rlrevell/cvs/alsa/alsa-driver/pci] Error 2
> make[1]: *** [_module_/smb/rlrevell/cvs/alsa/alsa-driver] Error 2
> make[1]: Leaving directory `/smb/rlrevell/kernel-source/linux-2.6.12-c3'
> make: *** [compile] Error 2
> 
> Lee
> 




-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Re: CVS compile issue
  2005-08-11 11:17 ` Raymond
@ 2005-08-11 12:52   ` Takashi Iwai
  2005-08-11 14:08     ` Clemens Ladisch
  2005-08-11 14:17     ` Raymond
  0 siblings, 2 replies; 8+ messages in thread
From: Takashi Iwai @ 2005-08-11 12:52 UTC (permalink / raw)
  To: Raymond; +Cc: alsa-devel

At Thu, 11 Aug 2005 19:17:12 +0800,
Raymond wrote:
> 
> There is a "division by zero" warning for drivers which include
> "driver.h" on Kernel 2.4
> 
> 
> gcc32 -D__KERNEL__ -DMODULE=1 -I/alsa/cvs/alsa-driver/include
> -I/lib/modules/2.4.22-1.2199.nptl/build/include -O2
> -mpreferred-stack-boundary=2 -march=i686 -DLINUX -Wall
> -Wstrict-prototypes -fomit-frame-pointer -Wno-trigraphs -O2
> -fno-strict-aliasing -fno-common -pipe -DALSA_BUILD -nostdinc
> -iwithprefix include -DMODVERSIONS -include
> /lib/modules/2.4.22-1.2199.nptl/build/include/linux/modversions.h
> -DKBUILD_BASENAME=intel8x0   -c -o intel8x0.o intel8x0.c
> In file included from /alsa/cvs/alsa-driver/include/sound/driver.h:42,
>                   from intel8x0.c:29:
> /alsa/cvs/alsa-driver/include/adriver.h: In function `jiffies_to_msecs':
> /alsa/cvs/alsa-driver/include/adriver.h:639: warning: division by zero

Is it the line:
	else if (HZ > 1000 && !(HZ % 1000))
==>		return (j + (HZ / 1000) - 1)/(HZ / 1000);

??  Where HZ is defined/declared in your kernel?

Takashi


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Re: CVS compile issue
  2005-08-11 12:52   ` Takashi Iwai
@ 2005-08-11 14:08     ` Clemens Ladisch
  2005-08-11 14:35       ` Takashi Iwai
  2005-08-11 14:17     ` Raymond
  1 sibling, 1 reply; 8+ messages in thread
From: Clemens Ladisch @ 2005-08-11 14:08 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: Raymond, alsa-devel

Takashi Iwai wrote:

> Raymond wrote:
> >
> > There is a "division by zero" warning for drivers which include
> > "driver.h" on Kernel 2.4
> >
> > /alsa/cvs/alsa-driver/include/adriver.h: In function `jiffies_to_msecs':
> > /alsa/cvs/alsa-driver/include/adriver.h:639: warning: division by zero
>
> Is it the line:
> 	else if (HZ > 1000 && !(HZ % 1000))
> ==>		return (j + (HZ / 1000) - 1)/(HZ / 1000);
>
> ??  Where HZ is defined/declared in your kernel?

The HZ definition is OK.  The problem is that gcc complains even when
the code gets optimized away.

The equivalent code in the 2.6 kernel uses #if, but that wouldn't work
with the SuSE kernels where HZ is a variable.


Regards,
Clemens



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: CVS compile issue
  2005-08-11 12:52   ` Takashi Iwai
  2005-08-11 14:08     ` Clemens Ladisch
@ 2005-08-11 14:17     ` Raymond
  1 sibling, 0 replies; 8+ messages in thread
From: Raymond @ 2005-08-11 14:17 UTC (permalink / raw)
  To: alsa-devel

Takashi Iwai wrote:
> At Thu, 11 Aug 2005 19:17:12 +0800,
> Raymond wrote:
> 
>>There is a "division by zero" warning for drivers which include
>>"driver.h" on Kernel 2.4
>>
>>
>>gcc32 -D__KERNEL__ -DMODULE=1 -I/alsa/cvs/alsa-driver/include
>>-I/lib/modules/2.4.22-1.2199.nptl/build/include -O2
>>-mpreferred-stack-boundary=2 -march=i686 -DLINUX -Wall
>>-Wstrict-prototypes -fomit-frame-pointer -Wno-trigraphs -O2
>>-fno-strict-aliasing -fno-common -pipe -DALSA_BUILD -nostdinc
>>-iwithprefix include -DMODVERSIONS -include
>>/lib/modules/2.4.22-1.2199.nptl/build/include/linux/modversions.h
>>-DKBUILD_BASENAME=intel8x0   -c -o intel8x0.o intel8x0.c
>>In file included from /alsa/cvs/alsa-driver/include/sound/driver.h:42,
>>                  from intel8x0.c:29:
>>/alsa/cvs/alsa-driver/include/adriver.h: In function `jiffies_to_msecs':
>>/alsa/cvs/alsa-driver/include/adriver.h:639: warning: division by zero
> 
> 
> Is it the line:
> 	else if (HZ > 1000 && !(HZ % 1000))
> ==>		return (j + (HZ / 1000) - 1)/(HZ / 1000);
> 
> ??  

Yes

 > Where HZ is defined/declared in your kernel?
> 

Fedora Core 1

/usr/src/linux/include/asm/param.h


#ifndef HZ
#define HZ 100
#endif



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Re: CVS compile issue
  2005-08-11 14:08     ` Clemens Ladisch
@ 2005-08-11 14:35       ` Takashi Iwai
  2005-08-11 15:13         ` Clemens Ladisch
  0 siblings, 1 reply; 8+ messages in thread
From: Takashi Iwai @ 2005-08-11 14:35 UTC (permalink / raw)
  To: Clemens Ladisch; +Cc: Raymond, alsa-devel

At Thu, 11 Aug 2005 16:08:17 +0200 (METDST),
Clemens Ladisch wrote:
> 
> Takashi Iwai wrote:
> 
> > Raymond wrote:
> > >
> > > There is a "division by zero" warning for drivers which include
> > > "driver.h" on Kernel 2.4
> > >
> > > /alsa/cvs/alsa-driver/include/adriver.h: In function `jiffies_to_msecs':
> > > /alsa/cvs/alsa-driver/include/adriver.h:639: warning: division by zero
> >
> > Is it the line:
> > 	else if (HZ > 1000 && !(HZ % 1000))
> > ==>		return (j + (HZ / 1000) - 1)/(HZ / 1000);
> >
> > ??  Where HZ is defined/declared in your kernel?
> 
> The HZ definition is OK.  The problem is that gcc complains even when
> the code gets optimized away.

Ah, OK.  It's a gcc bug then :)

> The equivalent code in the 2.6 kernel uses #if, but that wouldn't work
> with the SuSE kernels where HZ is a variable.

How about to add #ifdef HZ and provide two version?

#ifdef HZ

static inline jiffies_to_msec() {
#if HZ >= 1000...
#endif
}

#else /* !HZ */

static inline jiffies_to_msec() {
	if (HZ >= 1000) ...
}

#endif /* HZ */


Takashi


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Re: CVS compile issue
  2005-08-11 14:35       ` Takashi Iwai
@ 2005-08-11 15:13         ` Clemens Ladisch
  0 siblings, 0 replies; 8+ messages in thread
From: Clemens Ladisch @ 2005-08-11 15:13 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: Raymond, alsa-devel

Takashi Iwai wrote:

> Clemens Ladisch wrote:
>
> > The equivalent code in the 2.6 kernel uses #if, but that wouldn't work
> > with the SuSE kernels where HZ is a variable.
>
> How about to add #ifdef HZ and provide two version?
>
> #ifdef HZ

This wouldn't work if there is a "#define HZ some_variable".

I've now fixed it in CVS with some evil preprocessor magic.
("#if HZ > 0").


Regards,
Clemens



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2005-08-11 15:13 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-16  2:49 CVS compile issue Lee Revell
2005-07-17  3:58 ` Raymond
2005-08-11 11:17 ` Raymond
2005-08-11 12:52   ` Takashi Iwai
2005-08-11 14:08     ` Clemens Ladisch
2005-08-11 14:35       ` Takashi Iwai
2005-08-11 15:13         ` Clemens Ladisch
2005-08-11 14:17     ` Raymond

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.