Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 May 2011 19:53:11 +0000 (UTC)
From:      Nathan Whitehorn <nwhitehorn@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r222460 - head/sys/powerpc/powermac
Message-ID:  <201105291953.p4TJrBMq044071@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: nwhitehorn
Date: Sun May 29 19:53:11 2011
New Revision: 222460
URL: http://svn.freebsd.org/changeset/base/222460

Log:
  Don't put negative values into the averages.

Modified:
  head/sys/powerpc/powermac/powermac_thermal.c

Modified: head/sys/powerpc/powermac/powermac_thermal.c
==============================================================================
--- head/sys/powerpc/powermac/powermac_thermal.c	Sun May 29 18:41:06 2011	(r222459)
+++ head/sys/powerpc/powermac/powermac_thermal.c	Sun May 29 19:53:11 2011	(r222460)
@@ -121,6 +121,8 @@ pmac_therm_manage_fans(void)
 			    sensor->sensor->target_temp)*100 /
 			    (sensor->sensor->max_temp -
 			    sensor->sensor->target_temp);
+			if (frac_excess < 0)
+				frac_excess = 0;
 			if (sensor->sensor->zone == fan->fan->zone) {
 				max_excess_zone = imax(max_excess_zone,
 				    frac_excess);



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