Skip site navigation (1)Skip section navigation (2)
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
This is a multi-part message in MIME format.
--------------050008090805050905060806
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

-----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-----

--------------050008090805050905060806
Content-Type: text/x-diff;
 name="siba_core.c.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="siba_core.c.patch"

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);
 }
 

--------------050008090805050905060806--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4B983B64.1040005>