[vortex] Compile warnings
Donald Becker
becker@scyld.com
Mon Mar 10 10:24:01 2003
On Fri, 7 Mar 2003, Joost wrote:
> Is the reason that noone is answering just that nobody knows, or is there
> something wrong with my question?
I was traveling and thus unable to track down the problem. Although the
mailing list is intended to provide a community resource, I'm usually
the one answering the questions.
> > gcc -I/usr/src/kernel-headers-2.2.20/include/ -DMODULE -D__KERNEL__ -O6 -c
> > 3c59x.c
OK, the 2.2.20 kernel. Is this from kernel.org, or a vendor-modified
kernel?
> > In file included from 3c59x.c:134:
> > kern_compat.h:216: warning: `DECLARE_MUTEX' redefined
> > /usr/src/kernel-headers-2.2.20/include/asm/semaphore.h:46: warning: this
> is
> > the location of the previous definition
This was introduced in one of the 2.3.99 kernels.
The drivers were updated to use the 2.4 interface, and use put
backwards-compatibility code in the kern_compat.h file.
This problem comes when the interface is back-ported to the 2.2 kernel.
I must update the previously-correct 2.2 interface to take into account
the new definition.
Please try changing line 215 from
#if LINUX_VERSION_CODE < 0x20363
to
#if LINUX_VERSION_CODE < 0x20214
> > kern_compat.h:224: warning: `time_before' redefined
> > /usr/src/kernel-headers-2.2.20/include/linux/timer.h:91: warning: this is
> > the location of the previous definition
There is a similar new definition of time_before() in 2.2.<recent>.
However note that kernel's definition of time_before() is just the
invert of time_after(), which is incorrect.
#define time_before(a,b) ((long)(a) - (long)(b) < 0)
--
Donald Becker becker@scyld.com
Scyld Computing Corporation http://www.scyld.com
410 Severn Ave. Suite 210 Scyld Beowulf cluster system
Annapolis MD 21403 410-990-9993