From owner-svn-src-head@FreeBSD.ORG Sun May 29 19:53:11 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CC6DE1065674; Sun, 29 May 2011 19:53:11 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BCDA68FC13; Sun, 29 May 2011 19:53:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4TJrBQo044073; Sun, 29 May 2011 19:53:11 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4TJrBMq044071; Sun, 29 May 2011 19:53:11 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201105291953.p4TJrBMq044071@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 29 May 2011 19:53:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222460 - head/sys/powerpc/powermac X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Sun, 29 May 2011 19:53:11 -0000 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);