From: Pavel Machek <pavel@ucw.cz>
To: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: Len Brown <lenb@kernel.org>,
linux-acpi@vger.kernel.org, ibm-acpi-devel@lists.sourceforge.net
Subject: Re: [PATCH 8/8] thinkpad-acpi: log temperatures on termal alarm
Date: Sun, 6 Dec 2009 22:01:27 +0100 [thread overview]
Message-ID: <20091206210126.GD10184@elf.ucw.cz> (raw)
In-Reply-To: <1259840485-2516-9-git-send-email-hmh@hmh.eng.br>
Hi!
> Log temperatures on any of the EC thermal alarms. It could be
> useful to help tracking down what is happening...
Thanks, I applied it locally.
> static bool hotkey_notify_thermal(const u32 hkey,
> bool *send_acpi_ev,
> bool *ignore_acpi_ev)
> {
> + int known = true;
> +
Oops?
> + for (i = 0; i < n; i++)
> + t.temp[i] = t.temp[i] / 1000;
> +
> + /* Fill missing sensors with N/A marker */
> + for (i = n; i < TPACPI_MAX_THERMAL_SENSORS; i++)
> + t.temp[i] = -128;
-273 would be better "N/A" marker :-).
> + /* FIXME: it is ugly */
> + printk(TPACPI_NOTICE
> + "temperatures (Celsius): "
> + "%d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d\n",
But this indeed is ugly. Why not sometihng like
printk(TPACPI_NOTICE "temperatures (Celsius): ");
for (i = 0; i < n; i++)
printk(KERN_CONT "%d ", t.temp[i]);
printk(KERN_CONT "\n");
...you'd get rid of #ifdef above, ugly -128 markers, and nasty %d series...
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
next prev parent reply other threads:[~2009-12-06 21:01 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-03 11:41 [GIT PATCH] thinkpad-acpi first set of changes for 2.6.33 Henrique de Moraes Holschuh
2009-12-03 11:41 ` [PATCH 1/8] thinkpad-acpi: fix default brightness_mode for R50e/R51 Henrique de Moraes Holschuh
2009-12-03 11:41 ` [PATCH 2/8] thinkpad-acpi: preserve rfkill state across suspend/resume Henrique de Moraes Holschuh
2009-12-03 11:41 ` [PATCH 3/8] thinkpad-acpi: fix some version quirks Henrique de Moraes Holschuh
2009-12-03 11:41 ` [PATCH 4/8] thinkpad-acpi: issue backlight class events Henrique de Moraes Holschuh
2009-12-03 11:49 ` Henrique de Moraes Holschuh
2009-12-03 11:41 ` [PATCH 5/8] thinkpad-acpi: silence bogus complain during rmmod Henrique de Moraes Holschuh
2009-12-03 11:41 ` [PATCH 6/8] thinkpad-acpi: adopt input device Henrique de Moraes Holschuh
2009-12-03 11:41 ` [PATCH 7/8] thinkpad-acpi: expose module parameters Henrique de Moraes Holschuh
2009-12-03 11:41 ` [PATCH 8/8] thinkpad-acpi: log temperatures on termal alarm Henrique de Moraes Holschuh
2009-12-06 21:01 ` Pavel Machek [this message]
2009-12-07 12:06 ` Henrique de Moraes Holschuh
2009-12-07 21:10 ` Pavel Machek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091206210126.GD10184@elf.ucw.cz \
--to=pavel@ucw.cz \
--cc=hmh@hmh.eng.br \
--cc=ibm-acpi-devel@lists.sourceforge.net \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox