Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 3 Jun 2016 21:11:34 +0000 (UTC)
From:      "Pedro F. Giffuni" <pfg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r301288 - head/sys/arm/nvidia/tegra124
Message-ID:  <201606032111.u53LBYHw004901@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pfg
Date: Fri Jun  3 21:11:34 2016
New Revision: 301288
URL: https://svnweb.freebsd.org/changeset/base/301288

Log:
  tegra124: use roundup/rounddown macros from <sys/param.h>.

Modified:
  head/sys/arm/nvidia/tegra124/tegra124_cpufreq.c

Modified: head/sys/arm/nvidia/tegra124/tegra124_cpufreq.c
==============================================================================
--- head/sys/arm/nvidia/tegra124/tegra124_cpufreq.c	Fri Jun  3 20:49:49 2016	(r301287)
+++ head/sys/arm/nvidia/tegra124/tegra124_cpufreq.c	Fri Jun  3 21:11:34 2016	(r301288)
@@ -214,8 +214,8 @@ TUNABLE_INT("hw.tegra124.cpufreq.lowest_
 
 #define	DIV_ROUND_CLOSEST(val, div)	(((val) + ((div) / 2)) / (div))
 
-#define	ROUND_UP(val, div)	((((val) + ((div) - 1)) / (div)) * (div))
-#define	ROUND_DOWN(val, div)	(((val) / (div)) * (div))
+#define	ROUND_UP(val, div)	roundup(val, div)
+#define	ROUND_DOWN(val, div)	rounddown(val, div)
 
 /*
  * Compute requesetd voltage for given frequency and SoC process variations,



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201606032111.u53LBYHw004901>