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
This commit is contained in:
parent
e83a71c656
commit
a0dedc3034
@ -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;
|
||||
|
@ -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)
|
||||
|
@ -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;
|
||||
|
@ -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 ];
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user