Subject: Re: CVS commit: src/sys/dev/pci
To: Jaime Fournier <ober@NetBSD.org>
From: Hernani Marques Madeira <hernani@vecirex.net>
List: source-changes
Date: 02/09/2008 19:15:27
--E39vaYmALEf/7YXx
Content-Type: multipart/mixed; boundary="OXfL5xGRrasGEqWY"
Content-Disposition: inline
--OXfL5xGRrasGEqWY
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Sat, Feb 09, 2008 at 12:25:43PM +0000, Jaime Fournier wrote:
> Log Message:
> Intel PRO/Wireless LAN 4965AGN Mini-PCI Adapter Driver ported from OpenBSD
> by deroote@. OK nick@ moof@
Thanks!
But there's a problem compiling it under NetBSD/amd64 due to __uint64_t
being defined on amd64 as ``unsigned long int'' only and not ``unsigned long
long int''.
[snip]
# compile CLEMENTINE/if_iwn.o
/usr/src/tooldir.amd64/bin/x86_64--netbsd-gcc -mcmodel=3Dkernel -mno-red-zo=
ne -ffr
eestanding -fno-zero-initialized-in-bss -O2 -fno-omit-frame-pointer -Werror=
-Wal
l -Wno-main -Wno-format-zero-length -Wpointer-arith -Wmissing-prototypes -W=
stric
t-prototypes -Wswitch -Wshadow -Wcast-qual -Wwrite-strings -Wno-sign-compar=
e -Wn
o-pointer-sign -Wno-attributes -fno-strict-aliasing -Werror -Wall -Wno-main=
-Wno
-format-zero-length -Wpointer-arith -Wmissing-prototypes -Wstrict-prototype=
s -Ws
witch -Wshadow -Wcast-qual -Wwrite-strings -Wno-sign-compare -Wno-pointer-s=
ign -
Wno-attributes -Werror -Damd64 -Dx86_64 -I. -I/usr/src/sys/contrib/dev/ath/=
netbs
d -I/usr/src/sys/../common/include -I/usr/src/sys/arch -I/usr/src/sys -nost=
dinc=20
-DLKM -DMAXUSERS=3D64 -D_KERNEL -D_KERNEL_OPT -I/usr/src/sys/lib/libkern/..=
/../../
common/lib/libc/quad -I/usr/src/sys/lib/libkern/../../../common/lib/libc/st=
ring=20
-I/usr/src/sys/lib/libkern/../../../common/lib/libc/arch/x86_64/string -I/u=
sr/sr
c/sys/dist/ipf -c /usr/src/sys/dev/pci/if_iwn.c
cc1: warnings being treated as errors
/usr/src/sys/dev/pci/if_iwn.c: In function 'iwn_enable_tsf':
/usr/src/sys/dev/pci/if_iwn.c:2581: warning: format '%llu' expects type 'lo=
ng lo
ng unsigned int', but argument 3 has type '__uint64_t'
[/snip]
A possible fix might be casting the function. See attached file.
Btw, if_wpi.c has a similar case being solved differently -- that way it
doesn't work for this case, however.
--
hernani
--OXfL5xGRrasGEqWY
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="patch.iwn"
Content-Transfer-Encoding: quoted-printable
Index: if_iwn.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/src/sys/dev/pci/if_iwn.c,v
retrieving revision 1.1
diff -u -r1.1 if_iwn.c
--- if_iwn.c 9 Feb 2008 12:25:43 -0000 1.1
+++ if_iwn.c 9 Feb 2008 17:55:44 -0000
@@ -2579,7 +2579,8 @@
tsf.binitval =3D htole32((uint32_t)(val - mod));
=20
DPRINTF(("TSF bintval=3D%u tstamp=3D%llu, init=3D%u\n",
- ni->ni_intval, le64toh(tsf.tstamp), (uint32_t)(val - mod)));
+ ni->ni_intval, (unsigned long long) le64toh(tsf.tstamp),=20
+ (uint32_t)(val - mod)));
=20
if (iwn_cmd(sc, IWN_CMD_TSF, &tsf, sizeof tsf, 1) !=3D 0)
aprint_error_dev(sc->sc_dev, "could not enable TSF\n");
--OXfL5xGRrasGEqWY--
--E39vaYmALEf/7YXx
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (NetBSD)
iD8DBQFHre2+e4NuQfernOURAt9PAJ0XniHzJR0duRMzIEwbkYnuMfFOYQCfVBo8
9UIowzPMI1vOdFF8bzxKE40=
=513S
-----END PGP SIGNATURE-----
--E39vaYmALEf/7YXx--