summaryrefslogtreecommitdiffstats
path: root/sys/dev/hptiop/hptiop.c
diff options
context:
space:
mode:
authoraraujo <araujo@FreeBSD.org>2016-05-04 01:43:07 +0000
committeraraujo <araujo@FreeBSD.org>2016-05-04 01:43:07 +0000
commit1169f4f78010d9725e24de54091e32f7ac0d05f1 (patch)
tree85017781e1539801137262d0c55e8153946bf559 /sys/dev/hptiop/hptiop.c
parentd9ae2d9d8ff238da8b860ea88d8c8dce9ce0df89 (diff)
downloadFreeBSD-src-1169f4f78010d9725e24de54091e32f7ac0d05f1.zip
FreeBSD-src-1169f4f78010d9725e24de54091e32f7ac0d05f1.tar.gz
Use imin() macro from sys/libkern.h.
MFC after: 2 weeks.
Diffstat (limited to 'sys/dev/hptiop/hptiop.c')
-rw-r--r--sys/dev/hptiop/hptiop.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/hptiop/hptiop.c b/sys/dev/hptiop/hptiop.c
index b9c7211..ea05f4b 100644
--- a/sys/dev/hptiop/hptiop.c
+++ b/sys/dev/hptiop/hptiop.c
@@ -1241,7 +1241,7 @@ static int hptiop_post_ioctl_command_mv(struct hpt_iop_hba *hba,
req->header.result = IOP_RESULT_PENDING;
req->header.flags = IOP_REQUEST_FLAG_OUTPUT_CONTEXT;
size = req->header.size >> 8;
- size = size > 3 ? 3 : size;
+ size = imin(3, size);
req_phy = hba->ctlcfgcmd_phy | MVIOP_MU_QUEUE_ADDR_HOST_BIT | size;
hptiop_mv_inbound_write(req_phy, hba);
@@ -2561,7 +2561,7 @@ static void hptiop_post_req_mv(struct hpt_iop_hba *hba,
size = req->header.size >> 8;
hptiop_mv_inbound_write(req_phy
| MVIOP_MU_QUEUE_ADDR_HOST_BIT
- | (size > 3 ? 3 : size), hba);
+ | imin(3, size), hba);
}
static void hptiop_post_req_mvfrey(struct hpt_iop_hba *hba,
OpenPOWER on IntegriCloud