diff options
author | Pedro F. Giffuni <pfg@FreeBSD.org> | 2017-02-10 15:18:41 +0000 |
---|---|---|
committer | Pedro F. Giffuni <pfg@FreeBSD.org> | 2017-02-10 15:18:41 +0000 |
commit | a0dedc30343e57b09ec6bf5fd38657a1e939c064 (patch) | |
tree | 321ba25357e1ac9cf1e14e82bf04e716a19c80f0 /sys/dev/hpt27xx | |
parent | e83a71c6564b6b86c46c2684d94071d41c9865ca (diff) | |
download | src-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/dev/hpt27xx')
-rw-r--r-- | sys/dev/hpt27xx/hpt27xx_osm_bsd.c | 2 | ||||
-rw-r--r-- | sys/dev/hpt27xx/ldm.h | 4 |
2 files changed, 1 insertions, 5 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) |