From owner-svn-src-head@freebsd.org Wed May 4 01:43:08 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EDEAAB2AFFC; Wed, 4 May 2016 01:43:08 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BB2BF1D17; Wed, 4 May 2016 01:43:08 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u441h7D1071872; Wed, 4 May 2016 01:43:07 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u441h7No071871; Wed, 4 May 2016 01:43:07 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201605040143.u441h7No071871@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Wed, 4 May 2016 01:43:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r299033 - head/sys/dev/hptiop X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 May 2016 01:43:09 -0000 Author: araujo Date: Wed May 4 01:43:07 2016 New Revision: 299033 URL: https://svnweb.freebsd.org/changeset/base/299033 Log: Use imin() macro from sys/libkern.h. MFC after: 2 weeks. Modified: head/sys/dev/hptiop/hptiop.c Modified: head/sys/dev/hptiop/hptiop.c ============================================================================== --- head/sys/dev/hptiop/hptiop.c Wed May 4 01:36:19 2016 (r299032) +++ head/sys/dev/hptiop/hptiop.c Wed May 4 01:43:07 2016 (r299033) @@ -1241,7 +1241,7 @@ static int hptiop_post_ioctl_command_mv( 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 hp 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,