aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorPedro F. Giffuni <pfg@FreeBSD.org>2017-02-10 15:18:41 +0000
committerPedro F. Giffuni <pfg@FreeBSD.org>2017-02-10 15:18:41 +0000
commita0dedc30343e57b09ec6bf5fd38657a1e939c064 (patch)
tree321ba25357e1ac9cf1e14e82bf04e716a19c80f0 /sys
parente83a71c6564b6b86c46c2684d94071d41c9865ca (diff)
downloadsrc-a0dedc30343e57b09ec6bf5fd38657a1e939c064.tar.gz
src-a0dedc30343e57b09ec6bf5fd38657a1e939c064.zip
Clean redundant MIN/MAX declarations in some HighPoint drivers.
The hpt27xx(4), hptnr(4), and hptrr(4) drivers declare MIN() and MAX() internally which match the macros from sys/param.h. MIN() is not used, MAX is only used once and can be replaced with the max() version in libkern.h which operates on u_ints. MFC after: 2 weeks
Notes
Notes: svn path=/head/; revision=313554
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/hpt27xx/hpt27xx_osm_bsd.c2
-rw-r--r--sys/dev/hpt27xx/ldm.h4
-rw-r--r--sys/dev/hptnr/hptnr_osm_bsd.c2
-rw-r--r--sys/dev/hptnr/ldm.h3
-rw-r--r--sys/dev/hptrr/hptrr_osm_bsd.c2
-rw-r--r--sys/dev/hptrr/ldm.h4
6 files changed, 3 insertions, 14 deletions
diff --git a/sys/dev/hpt27xx/hpt27xx_osm_bsd.c b/sys/dev/hpt27xx/hpt27xx_osm_bsd.c
index 4aaf8f144644..6df9acaacc6a 100644
--- a/sys/dev/hpt27xx/hpt27xx_osm_bsd.c
+++ b/sys/dev/hpt27xx/hpt27xx_osm_bsd.c
@@ -297,7 +297,7 @@ static int hpt_flush_vdev(PVBUS_EXT vbus_ext, PVDEV vd)
hpt_lock_vbus(vbus_ext);
if (mIsArray(vd->type) && vd->u.array.transform)
- count = MAX(vd->u.array.transform->source->cmds_per_request,
+ count = max(vd->u.array.transform->source->cmds_per_request,
vd->u.array.transform->target->cmds_per_request);
else
count = vd->cmds_per_request;
diff --git a/sys/dev/hpt27xx/ldm.h b/sys/dev/hpt27xx/ldm.h
index 58cddad2bcca..defa459bf825 100644
--- a/sys/dev/hpt27xx/ldm.h
+++ b/sys/dev/hpt27xx/ldm.h
@@ -59,10 +59,6 @@ extern "C" {
#error "Please redefine MAX_PARTITIONS_PER_DISK!!!"
#endif
-#define MAX(a,b) (((a)>(b))?(a):(b))
-#define MIN(a,b) (((a)<(b))?(a):(b))
-
-
typedef char check_HPT_TIME_is_unsigned[ (HPT_TIME)(-1) > 0 ? 1 : -1 ];
#define hpt_time_after_eq(a, b) ((int)(a) - (int)(b) >= 0)
diff --git a/sys/dev/hptnr/hptnr_osm_bsd.c b/sys/dev/hptnr/hptnr_osm_bsd.c
index e442e827c71f..338770c8e834 100644
--- a/sys/dev/hptnr/hptnr_osm_bsd.c
+++ b/sys/dev/hptnr/hptnr_osm_bsd.c
@@ -294,7 +294,7 @@ static int hpt_flush_vdev(PVBUS_EXT vbus_ext, PVDEV vd)
hpt_assert_vbus_locked(vbus_ext);
if (mIsArray(vd->type) && vd->u.array.transform)
- count = MAX(vd->u.array.transform->source->cmds_per_request,
+ count = max(vd->u.array.transform->source->cmds_per_request,
vd->u.array.transform->target->cmds_per_request);
else
count = vd->cmds_per_request;
diff --git a/sys/dev/hptnr/ldm.h b/sys/dev/hptnr/ldm.h
index 087cb2089c25..a8f29911b7b4 100644
--- a/sys/dev/hptnr/ldm.h
+++ b/sys/dev/hptnr/ldm.h
@@ -58,9 +58,6 @@ extern "C" {
#error "Please redefine MAX_PARTITIONS_PER_DISK!!!"
#endif
-#define MAX(a,b) (((a)>(b))?(a):(b))
-#define MIN(a,b) (((a)<(b))?(a):(b))
-
typedef char check_HPT_TIME_is_unsigned[ (HPT_TIME)(-1) > 0 ? 1 : -1 ];
diff --git a/sys/dev/hptrr/hptrr_osm_bsd.c b/sys/dev/hptrr/hptrr_osm_bsd.c
index 49e746b26809..d2c58d4932ad 100644
--- a/sys/dev/hptrr/hptrr_osm_bsd.c
+++ b/sys/dev/hptrr/hptrr_osm_bsd.c
@@ -300,7 +300,7 @@ static int hpt_flush_vdev(PVBUS_EXT vbus_ext, PVDEV vd)
hpt_assert_vbus_locked(vbus_ext);
if (mIsArray(vd->type) && vd->u.array.transform)
- count = MAX(vd->u.array.transform->source->cmds_per_request,
+ count = max(vd->u.array.transform->source->cmds_per_request,
vd->u.array.transform->target->cmds_per_request);
else
count = vd->cmds_per_request;
diff --git a/sys/dev/hptrr/ldm.h b/sys/dev/hptrr/ldm.h
index 93a92fa2d761..1ec3427146d8 100644
--- a/sys/dev/hptrr/ldm.h
+++ b/sys/dev/hptrr/ldm.h
@@ -58,10 +58,6 @@ extern "C" {
#error "Please redefine MAX_PARTITIONS_PER_DISK!!!"
#endif
-#define MAX(a,b) (((a)>(b))?(a):(b))
-#define MIN(a,b) (((a)<(b))?(a):(b))
-
-
typedef char check_HPT_TIME_is_unsigned[ (HPT_TIME)(-1) > 0 ? 1 : -1 ];
#define hpt_time_after_eq(a, b) ((long)(a) - (long)(b) >= 0)