summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2001-07-10 23:30:40 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2001-07-10 23:30:40 +0000
commita4e2702db893f3fe5c08822eeaf71af4e4a83f7b (patch)
tree7531d508d39e1ea755fb447a2e53537dc8faba24 /sys/dev
parent3863f3795b4c4913c333215cd834750d97afc55b (diff)
Use offsetof() from sys/param.h, not a local define.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ic/iha.c6
-rw-r--r--sys/dev/ic/iha.h4
2 files changed, 4 insertions, 6 deletions
diff --git a/sys/dev/ic/iha.c b/sys/dev/ic/iha.c
index be7e3961bef..46789691ce9 100644
--- a/sys/dev/ic/iha.c
+++ b/sys/dev/ic/iha.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: iha.c,v 1.5 2001/07/09 18:01:38 krw Exp $ */
+/* $OpenBSD: iha.c,v 1.6 2001/07/10 23:30:39 krw Exp $ */
/*
* Initio INI-9xxxU/UW SCSI Device Driver
*
@@ -468,12 +468,12 @@ iha_init_tulip(sc)
pScb->SCB_TagId = i;
pScb->SCB_SGPAddr = sc->sc_dmamap->dm_segs[0].ds_addr
+ i*sizeof(struct iha_scsi_req_q)
- + OFFSETOF(struct iha_scsi_req_q, SCB_SGList);
+ + offsetof(struct iha_scsi_req_q, SCB_SGList);
pScb->SCB_SenseLen = sizeof(struct scsi_sense_data);
pScb->SCB_SensePAddr = sc->sc_dmamap->dm_segs[0].ds_addr
+ i*sizeof(struct iha_scsi_req_q)
- + OFFSETOF(struct iha_scsi_req_q, SCB_ScsiSenseData);
+ + offsetof(struct iha_scsi_req_q, SCB_ScsiSenseData);
error = bus_dmamap_create(sc->sc_dmat,
(IHA_MAX_SG_ENTRIES-1) * PAGE_SIZE, IHA_MAX_SG_ENTRIES,
diff --git a/sys/dev/ic/iha.h b/sys/dev/ic/iha.h
index 41c391d99f6..133008149d2 100644
--- a/sys/dev/ic/iha.h
+++ b/sys/dev/ic/iha.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: iha.h,v 1.3 2001/07/09 15:20:27 krw Exp $ */
+/* $OpenBSD: iha.h,v 1.4 2001/07/10 23:30:39 krw Exp $ */
/*
* Initio INI-9xxxU/UW SCSI Device Driver
*
@@ -48,8 +48,6 @@
#define IHA_MAX_SCB 32
#define IHA_MAX_EXTENDED_MSG 4 /* SDTR(3) and WDTR(4) only */
-#define OFFSETOF(type, member) ((size_t)(&((type *)0)->member))
-
#define SCSI_CONDITION_MET 0x04 /* SCSI Status codes not defined */
#define SCSI_INTERM_COND_MET 0x14 /* in scsi_all.h */
#define SCSI_RSERV_CONFLICT 0x18