From owner-freebsd-hackers@FreeBSD.ORG Sun Nov 21 21:17:51 2010 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D16B51065693 for ; Sun, 21 Nov 2010 21:17:51 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 215D08FC0A for ; Sun, 21 Nov 2010 21:17:50 +0000 (UTC) Received: from porto.topspin.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id XAA15040; Sun, 21 Nov 2010 23:17:49 +0200 (EET) (envelope-from avg@freebsd.org) Received: from localhost.topspin.kiev.ua ([127.0.0.1]) by porto.topspin.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1PKHIC-0005ds-Rg; Sun, 21 Nov 2010 23:17:48 +0200 Message-ID: <4CE98C7E.90301@freebsd.org> Date: Sun, 21 Nov 2010 23:17:50 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.12) Gecko/20101029 Lightning/1.0b2 Thunderbird/3.1.6 MIME-Version: 1.0 To: Paul B Mahol References: In-Reply-To: X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: hackers@freebsd.org Subject: Re: Remove printf in acpi_tz_sanity() X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Nov 2010 21:17:51 -0000 on 21/11/2010 13:07 Paul B Mahol said the following: > This patch removes printf which spams console whenever thermal state > is changed in laptop. Source of problem is in buggy BIOS. > > diff --git a/sys/dev/acpica/acpi_thermal.c b/sys/dev/acpica/acpi_thermal.c > index 515a742..00866b2 100644 > --- a/sys/dev/acpica/acpi_thermal.c > +++ b/sys/dev/acpica/acpi_thermal.c > @@ -697,11 +697,8 @@ acpi_tz_getparam(struct acpi_tz_softc *sc, char > *node, int *data) > static void > acpi_tz_sanity(struct acpi_tz_softc *sc, int *val, char *what) > { > - if (*val != -1 && (*val < TZ_ZEROC || *val > TZ_ZEROC + 2000)) { > - device_printf(sc->tz_dev, "%s value is absurd, ignored (%d.%dC)\n", > - what, TZ_KELVTOC(*val)); > + if (*val != -1 && (*val < TZ_ZEROC || *val > TZ_ZEROC + 2000)) > *val = -1; > - } > } As is - this is a perfect candidate for a "local only" patch. To be included into the tree - this, most probably, has to be controlled by a tunable/sysctl. -- Andriy Gapon