summaryrefslogtreecommitdiff
path: root/sys/dev/ic
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2008-11-23 12:46:52 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2008-11-23 12:46:52 +0000
commit5c619d89efd040cc4a35c828a9c780c41628ea49 (patch)
treea4d466a9570c112e1a6d86691c0a3d83de022668 /sys/dev/ic
parent364e7da3503fa8f688f7d73de994cd1835396f7c (diff)
sizeofa -> nitems
Diffstat (limited to 'sys/dev/ic')
-rw-r--r--sys/dev/ic/sili.c6
-rw-r--r--sys/dev/ic/silivar.h4
2 files changed, 4 insertions, 6 deletions
diff --git a/sys/dev/ic/sili.c b/sys/dev/ic/sili.c
index 8ff8ca2db70..fc5e849e8f6 100644
--- a/sys/dev/ic/sili.c
+++ b/sys/dev/ic/sili.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sili.c,v 1.39 2007/11/28 13:47:09 dlg Exp $ */
+/* $OpenBSD: sili.c,v 1.40 2008/11/23 12:46:51 dlg Exp $ */
/*
* Copyright (c) 2007 David Gwynne <dlg@openbsd.org>
@@ -838,14 +838,14 @@ sili_ata_cmd(struct ata_xfer *xa)
atapi->control = htole16(SILI_PRB_PACKET_READ);
sgl = atapi->sgl;
- sgllen = sizeofa(atapi->sgl);
+ sgllen = nitems(atapi->sgl);
} else {
ata = ccb->ccb_cmd;
ata->control = 0;
sgl = ata->sgl;
- sgllen = sizeofa(ata->sgl);
+ sgllen = nitems(ata->sgl);
}
if (sili_load(ccb, sgl, sgllen) != 0)
diff --git a/sys/dev/ic/silivar.h b/sys/dev/ic/silivar.h
index e1a1e3a0498..dab11d6f338 100644
--- a/sys/dev/ic/silivar.h
+++ b/sys/dev/ic/silivar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: silivar.h,v 1.5 2007/04/07 05:59:49 dlg Exp $ */
+/* $OpenBSD: silivar.h,v 1.6 2008/11/23 12:46:51 dlg Exp $ */
/*
* Copyright (c) 2007 David Gwynne <dlg@openbsd.org>
@@ -16,8 +16,6 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#define sizeofa(_a) (sizeof(_a) / sizeof((_a)[0]))
-
struct sili_port;
struct sili_softc {