From owner-freebsd-hackers@FreeBSD.ORG Mon Nov 22 08:23:13 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 631B4106564A for ; Mon, 22 Nov 2010 08:23:13 +0000 (UTC) (envelope-from lars@e.0x20.net) Received: from mail.0x20.net (mail.0x20.net [217.69.67.217]) by mx1.freebsd.org (Postfix) with ESMTP id 22C7C8FC13 for ; Mon, 22 Nov 2010 08:23:12 +0000 (UTC) Received: by mail.0x20.net (Postfix, from userid 1002) id 0E2E83A6EC; Mon, 22 Nov 2010 09:05:04 +0100 (CET) Date: Mon, 22 Nov 2010 09:05:04 +0100 From: Lars Engels To: "Carlos A. M. dos Santos" Message-ID: <20101122080504.GD56407@e.0x20.net> References: <4CE98C7E.90301@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="RGcZ8sFvauoc93XO" Content-Disposition: inline In-Reply-To: X-Editor: VIM - Vi IMproved 7.2 X-Operation-System: FreeBSD 5.5-RELEASE-p19 User-Agent: Mutt/1.5.21 (2010-09-15) X-Mailman-Approved-At: Mon, 22 Nov 2010 12:28:51 +0000 Cc: hackers@freebsd.org, Paul B Mahol , 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 08:23:13 -0000 --RGcZ8sFvauoc93XO Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Nov 21, 2010 at 10:18:13PM -0200, Carlos A. M. dos Santos wrote: > 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_ther= mal.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) > >>> =C2=A0static void > >>> =C2=A0acpi_tz_sanity(struct acpi_tz_softc *sc, int *val, char *what) > >>> =C2=A0{ > >>> - =C2=A0 =C2=A0if (*val !=3D -1 && (*val < TZ_ZEROC || *val > TZ_ZERO= C + 2000)) { > >>> - =C2=A0 =C2=A0 device_printf(sc->tz_dev, "%s value is absurd, ignore= d (%d.%dC)\n", > >>> - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 what= , TZ_KELVTOC(*val)); > >>> + =C2=A0 =C2=A0if (*val !=3D -1 && (*val < TZ_ZEROC || *val > TZ_ZERO= C + 2000)) > >>> =C2=A0 =C2=A0 =C2=A0 *val =3D -1; > >>> - =C2=A0 =C2=A0} > >>> =C2=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 controll= ed 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= tz0. > > > > I'm not first one mentioning this and issue is old several years. >=20 > +1 (Compaq nx6320) Yes, almost every HP notebook seems to report -1 every few seconds. --RGcZ8sFvauoc93XO Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkzqJDAACgkQKc512sD3afgLpwCfUaHov1pFxOKPCD9AfEPsOwLf ny8An0T9KrnG3iqQfCXxnO36+wzSoIJU =vVh8 -----END PGP SIGNATURE----- --RGcZ8sFvauoc93XO--