Date: Sun, 21 Nov 2010 22:18:13 -0200 From: "Carlos A. M. dos Santos" <unixmania@gmail.com> To: Paul B Mahol <onemda@gmail.com> Cc: hackers@freebsd.org, Andriy Gapon <avg@freebsd.org> Subject: Re: Remove printf in acpi_tz_sanity() Message-ID: <AANLkTikymsBGc71QVW4SfoK5pe-uU6XdX7qteMZCQq8Z@mail.gmail.com> In-Reply-To: <AANLkTimJuq57mzAyb%2BaZ8imrW0cc4qNbZ0FL4_i=3ub9@mail.gmail.com> References: <AANLkTimThbVyXmgU76m44GTzR0qGAQuJt-9xwunP-QdQ@mail.gmail.com> <4CE98C7E.90301@freebsd.org> <AANLkTimJuq57mzAyb%2BaZ8imrW0cc4qNbZ0FL4_i=3ub9@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Nov 21, 2010 at 9:18 PM, Paul B Mahol <onemda@gmail.com> wrote:
> On Sun, Nov 21, 2010 at 9:17 PM, Andriy Gapon <avg@freebsd.org> 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_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.
>
> 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.
+1 (Compaq nx6320)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTikymsBGc71QVW4SfoK5pe-uU6XdX7qteMZCQq8Z>
