From owner-svn-src-stable@freebsd.org Fri Feb 24 21:20:50 2017 Return-Path: Delivered-To: svn-src-stable@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 09039CEBC31; Fri, 24 Feb 2017 21:20:50 +0000 (UTC) (envelope-from pfg@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 D51EB9A; Fri, 24 Feb 2017 21:20:49 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1OLKmVE063259; Fri, 24 Feb 2017 21:20:48 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1OLKmCT063253; Fri, 24 Feb 2017 21:20:48 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201702242120.v1OLKmCT063253@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Fri, 24 Feb 2017 21:20:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r314223 - in stable/11/sys/dev: hpt27xx hptnr hptrr X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Feb 2017 21:20:50 -0000 Author: pfg Date: Fri Feb 24 21:20:48 2017 New Revision: 314223 URL: https://svnweb.freebsd.org/changeset/base/314223 Log: MFC r313554: 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 Modified: stable/11/sys/dev/hpt27xx/hpt27xx_osm_bsd.c stable/11/sys/dev/hpt27xx/ldm.h stable/11/sys/dev/hptnr/hptnr_osm_bsd.c stable/11/sys/dev/hptnr/ldm.h stable/11/sys/dev/hptrr/hptrr_osm_bsd.c stable/11/sys/dev/hptrr/ldm.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/hpt27xx/hpt27xx_osm_bsd.c ============================================================================== --- stable/11/sys/dev/hpt27xx/hpt27xx_osm_bsd.c Fri Feb 24 21:19:40 2017 (r314222) +++ stable/11/sys/dev/hpt27xx/hpt27xx_osm_bsd.c Fri Feb 24 21:20:48 2017 (r314223) @@ -297,7 +297,7 @@ static int hpt_flush_vdev(PVBUS_EXT vbus 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; Modified: stable/11/sys/dev/hpt27xx/ldm.h ============================================================================== --- stable/11/sys/dev/hpt27xx/ldm.h Fri Feb 24 21:19:40 2017 (r314222) +++ stable/11/sys/dev/hpt27xx/ldm.h Fri Feb 24 21:20:48 2017 (r314223) @@ -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) Modified: stable/11/sys/dev/hptnr/hptnr_osm_bsd.c ============================================================================== --- stable/11/sys/dev/hptnr/hptnr_osm_bsd.c Fri Feb 24 21:19:40 2017 (r314222) +++ stable/11/sys/dev/hptnr/hptnr_osm_bsd.c Fri Feb 24 21:20:48 2017 (r314223) @@ -294,7 +294,7 @@ static int hpt_flush_vdev(PVBUS_EXT vbus 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; Modified: stable/11/sys/dev/hptnr/ldm.h ============================================================================== --- stable/11/sys/dev/hptnr/ldm.h Fri Feb 24 21:19:40 2017 (r314222) +++ stable/11/sys/dev/hptnr/ldm.h Fri Feb 24 21:20:48 2017 (r314223) @@ -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 ]; Modified: stable/11/sys/dev/hptrr/hptrr_osm_bsd.c ============================================================================== --- stable/11/sys/dev/hptrr/hptrr_osm_bsd.c Fri Feb 24 21:19:40 2017 (r314222) +++ stable/11/sys/dev/hptrr/hptrr_osm_bsd.c Fri Feb 24 21:20:48 2017 (r314223) @@ -300,7 +300,7 @@ static int hpt_flush_vdev(PVBUS_EXT vbus 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; Modified: stable/11/sys/dev/hptrr/ldm.h ============================================================================== --- stable/11/sys/dev/hptrr/ldm.h Fri Feb 24 21:19:40 2017 (r314222) +++ stable/11/sys/dev/hptrr/ldm.h Fri Feb 24 21:20:48 2017 (r314223) @@ -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)