summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2012-07-01 01:41:14 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2012-07-01 01:41:14 +0000
commit35b697b9f5a242eeffada8ad7b634d46145d7f24 (patch)
treea7a42812fdf47c77be1924733a24a691c8072640 /sys
parent270e6554af8b198920aa6292aa3d7fcadba55e9c (diff)
Nuke unused _[23]ltol() and _lto[23]l() inline functions. Move
_4ltol() and _lto4l() to bha, the only place they were used. ok dlg@
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/ic/bhareg.h26
-rw-r--r--sys/scsi/scsiconf.h64
2 files changed, 24 insertions, 66 deletions
diff --git a/sys/dev/ic/bhareg.h b/sys/dev/ic/bhareg.h
index 4bf84004e09..d4c88d15b1d 100644
--- a/sys/dev/ic/bhareg.h
+++ b/sys/dev/ic/bhareg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: bhareg.h,v 1.4 2008/09/01 17:30:56 deraadt Exp $ */
+/* $OpenBSD: bhareg.h,v 1.5 2012/07/01 01:41:13 krw Exp $ */
/* $NetBSD: bhareg.h,v 1.12 1998/08/17 00:26:33 mycroft Exp $ */
/*-
@@ -48,8 +48,28 @@
typedef u_int8_t physaddr[4];
typedef u_int8_t physlen[4];
-#define ltophys _lto4l
-#define phystol _4ltol
+
+static __inline void ltophys(u_int32_t val, u_int8_t *bytes);
+static __inline u_int32_t phystol(u_int8_t *bytes);
+
+static __inline void
+ltophys(u_int32_t val, u_int8_t *bytes)
+{
+ bytes[0] = val & 0xff;
+ bytes[1] = (val >> 8) & 0xff;
+ bytes[2] = (val >> 16) & 0xff;
+ bytes[3] = (val >> 24) & 0xff;
+}
+
+static __inline u_int32_t
+phystol(u_int8_t *bytes)
+{
+ u_int32_t rv;
+
+ rv = bytes[0] | (bytes[1] << 8) |
+ (bytes[2] << 16) | (bytes[3] << 24);
+ return (rv);
+ }
/*
* I/O port offsets
diff --git a/sys/scsi/scsiconf.h b/sys/scsi/scsiconf.h
index 5463c2539cf..8fd472b4401 100644
--- a/sys/scsi/scsiconf.h
+++ b/sys/scsi/scsiconf.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: scsiconf.h,v 1.149 2011/07/17 22:46:48 matthew Exp $ */
+/* $OpenBSD: scsiconf.h,v 1.150 2012/07/01 01:41:13 krw Exp $ */
/* $NetBSD: scsiconf.h,v 1.35 1997/04/02 02:29:38 mycroft Exp $ */
/*
@@ -67,13 +67,6 @@ static __inline u_int32_t _4btol(u_int8_t *bytes);
static __inline u_int64_t _5btol(u_int8_t *bytes);
static __inline u_int64_t _8btol(u_int8_t *bytes);
-static __inline void _lto2l(u_int32_t val, u_int8_t *bytes);
-static __inline void _lto3l(u_int32_t val, u_int8_t *bytes);
-static __inline void _lto4l(u_int32_t val, u_int8_t *bytes);
-static __inline u_int32_t _2ltol(u_int8_t *bytes);
-static __inline u_int32_t _3ltol(u_int8_t *bytes);
-static __inline u_int32_t _4ltol(u_int8_t *bytes);
-
static __inline void
_lto2b(u_int32_t val, u_int8_t *bytes)
{
@@ -172,61 +165,6 @@ _8btol(u_int8_t *bytes)
return (rv);
}
-static __inline void
-_lto2l(u_int32_t val, u_int8_t *bytes)
-{
-
- bytes[0] = val & 0xff;
- bytes[1] = (val >> 8) & 0xff;
-}
-
-static __inline void
-_lto3l(u_int32_t val, u_int8_t *bytes)
-{
-
- bytes[0] = val & 0xff;
- bytes[1] = (val >> 8) & 0xff;
- bytes[2] = (val >> 16) & 0xff;
-}
-
-static __inline void
-_lto4l(u_int32_t val, u_int8_t *bytes)
-{
-
- bytes[0] = val & 0xff;
- bytes[1] = (val >> 8) & 0xff;
- bytes[2] = (val >> 16) & 0xff;
- bytes[3] = (val >> 24) & 0xff;
-}
-
-static __inline u_int32_t
-_2ltol(u_int8_t *bytes)
-{
- u_int32_t rv;
-
- rv = bytes[0] | (bytes[1] << 8);
- return (rv);
-}
-
-static __inline u_int32_t
-_3ltol(u_int8_t *bytes)
-{
- u_int32_t rv;
-
- rv = bytes[0] | (bytes[1] << 8) | (bytes[2] << 16);
- return (rv);
-}
-
-static __inline u_int32_t
-_4ltol(u_int8_t *bytes)
-{
- u_int32_t rv;
-
- rv = bytes[0] | (bytes[1] << 8) |
- (bytes[2] << 16) | (bytes[3] << 24);
- return (rv);
-}
-
#ifdef _KERNEL
#define DEVID_NONE 0