From owner-freebsd-hackers@FreeBSD.ORG Mon Nov 22 00:42:01 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 8E918106564A; Mon, 22 Nov 2010 00:42:01 +0000 (UTC) (envelope-from unixmania@gmail.com) Received: from mail-qy0-f175.google.com (mail-qy0-f175.google.com [209.85.216.175]) by mx1.freebsd.org (Postfix) with ESMTP id 26E0E8FC08; Mon, 22 Nov 2010 00:42:00 +0000 (UTC) Received: by qyk8 with SMTP id 8so1578098qyk.13 for ; Sun, 21 Nov 2010 16:42:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=HC/t3KkL3wQI2to5lU/i+hdXR/o/ERy6iAY0P3w1bAM=; b=J+tqUM4CgOwdm0yD27m9S3PwTOP/IHLdtZ8T9vB5vbrMtm+oFrd6GIKOTbrJb6VXD2 aaP91N6lRDWeMr6WgSqvn3gp221M3KTjKF+u82uLnu/C280H+pU+XYUDyGCoH2SU0HT5 0BAoVYP15PwOu38JNmpmfr0cyaO5ML/Pwef4U= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=sG6w/J0VkA6Lti3HiZ5Bw+WklljwqV5njI5TSjBnxV8uU7p/L7U4+PRZKBOs2H+Ws4 Y7oEDmvbVtQKbJOPiFzjMyORs3ENW2qGMmA0Sr3KZ+NSNrFT4SZ4hKxTYNx1JTBXm94J Kfl4bY52PAHneMroAgq8bIElzgapbMPSJeTUg= MIME-Version: 1.0 Received: by 10.229.89.202 with SMTP id f10mr4464475qcm.212.1290385093972; Sun, 21 Nov 2010 16:18:13 -0800 (PST) Received: by 10.229.229.134 with HTTP; Sun, 21 Nov 2010 16:18:13 -0800 (PST) In-Reply-To: References: <4CE98C7E.90301@freebsd.org> Date: Sun, 21 Nov 2010 22:18:13 -0200 Message-ID: From: "Carlos A. M. dos Santos" To: Paul B Mahol Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: hackers@freebsd.org, Andriy Gapon 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: Mon, 22 Nov 2010 00:42:01 -0000 On Sun, Nov 21, 2010 at 9:18 PM, Paul B Mahol wrote: > On Sun, Nov 21, 2010 at 9:17 PM, Andriy Gapon wrote: >> 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_therma= l.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) >>> =A0static void >>> =A0acpi_tz_sanity(struct acpi_tz_softc *sc, int *val, char *what) >>> =A0{ >>> - =A0 =A0if (*val !=3D -1 && (*val < TZ_ZEROC || *val > TZ_ZEROC + 2000= )) { >>> - =A0 =A0 device_printf(sc->tz_dev, "%s value is absurd, ignored (%d.%d= C)\n", >>> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 what, TZ_KELVTOC(*val)); >>> + =A0 =A0if (*val !=3D -1 && (*val < TZ_ZEROC || *val > TZ_ZEROC + 2000= )) >>> =A0 =A0 =A0 *val =3D -1; >>> - =A0 =A0} >>> =A0} >> >> 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. > > So solution for useless console spamming is to add useless sysctl. > > For -1 values, sane default values should be picked up. > Anyway only _CRT is showing on console, and _PSV & _HOT are both -1 for t= z0. > > I'm not first one mentioning this and issue is old several years. +1 (Compaq nx6320)