aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcelo Araujo <araujo@FreeBSD.org>2016-05-04 01:43:07 +0000
committerMarcelo Araujo <araujo@FreeBSD.org>2016-05-04 01:43:07 +0000
commitb3956646bf5c79d5ef5d878f8265c08468e87970 (patch)
tree85017781e1539801137262d0c55e8153946bf559
parente1e8b05256525553c236491d8ec9c450079d2721 (diff)
downloadsrc-b3956646bf5c79d5ef5d878f8265c08468e87970.tar.gz
src-b3956646bf5c79d5ef5d878f8265c08468e87970.zip
Use imin() macro from sys/libkern.h.
MFC after: 2 weeks.
Notes
Notes: svn path=/head/; revision=299033
-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 b9c7211fbd43..ea05f4bee048 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,