Date: Wed, 10 Mar 2010 19:37:56 -0500 From: Michael Butler <imb@protected-networks.net> To: freebsd-current <freebsd-current@freebsd.org> Subject: sys/dev/siba/siba_core.c fails compilation Message-ID: <4B983B64.1040005@protected-networks.net>
next in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
If compiling -current without debugging enabled, this module fails with
a warning about unused variables (warnings treated as errors).
The attached patch allows compilation to proceed although I'm not
convinced that it's entirely correct (duplicate evaluation of
device_get_ivars()),
imb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (FreeBSD)
iEYEARECAAYFAkuYO2QACgkQQv9rrgRC1JIuOQCfYzduyb55+itgjs7tLu4Y0EzE
u5oAoLu66AManNJuzvHl/B7eBECOVHfB
=wo8h
-----END PGP SIGNATURE-----
[-- Attachment #2 --]
Index: sys/dev/siba/siba_core.c
===================================================================
--- sys/dev/siba/siba_core.c (revision 204990)
+++ sys/dev/siba/siba_core.c (working copy)
@@ -2031,11 +2031,8 @@
uint32_t
siba_dma_translation(device_t dev)
{
- struct siba_dev_softc *sd = device_get_ivars(dev);
- struct siba_softc *siba = sd->sd_bus;
-
- KASSERT(siba->siba_type == SIBA_TYPE_PCI,
- ("unsupported bustype %d\n", siba->siba_type));
+ KASSERT(device_get_ivars(dev)->sd_bus->siba_type == SIBA_TYPE_PCI,
+ ("unsupported bustype %d\n", device_get_ivars(dev)->sd_bus->siba_type));
return (SIBA_PCI_DMA);
}
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4B983B64.1040005>
