From: gregkh@suse.de (Greg KH)
To: lm-sensors@vger.kernel.org
Subject: [lm-sensors] [PATCH] hwmon: via686a: save 0.5k by long v[256] ->
Date: Sat, 29 Oct 2005 00:16:47 +0000 [thread overview]
Message-ID: <1130533656553@kroah.com> (raw)
[PATCH] hwmon: via686a: save 0.5k by long v[256] -> s16 v[256]
We can save 0.5kB of data in the via686a driver.
From: Denis Vlasenko <vda@ilport.com.ua>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
commit 088341bd0c78143bf82ff21f7f0a715f99568c73
tree 5044d28b37f1a7f46575810e5e2bb8bcee78d965
parent c7461a6652f40ce4f8e19d7368c7a807a618fb68
author Jean Delvare <khali@linux-fr.org> Sat, 10 Sep 2005 23:00:46 +0200
committer Greg Kroah-Hartman <gregkh@suse.de> Fri, 28 Oct 2005 14:02:05 -0700
drivers/hwmon/via686a.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/hwmon/via686a.c b/drivers/hwmon/via686a.c
index 05ddc88..60e9487 100644
--- a/drivers/hwmon/via686a.c
+++ b/drivers/hwmon/via686a.c
@@ -198,7 +198,7 @@ static inline u8 FAN_TO_REG(long rpm, in
but the function is very linear in the useful range (0-80 deg C), so
we'll just use linear interpolation for 10-bit readings.) So, tempLUT
is the temp at via register values 0-255: */
-static const long tempLUT[] +static const s16 tempLUT[] { -709, -688, -667, -646, -627, -607, -589, -570, -553, -536, -519,
-503, -487, -471, -456, -442, -428, -414, -400, -387, -375,
-362, -350, -339, -327, -316, -305, -295, -285, -275, -265,
@@ -270,7 +270,7 @@ static inline u8 TEMP_TO_REG(long val)
}
/* for 8-bit temperature hyst and over registers */
-#define TEMP_FROM_REG(val) (tempLUT[(val)] * 100)
+#define TEMP_FROM_REG(val) ((long)tempLUT[val] * 100)
/* for 10-bit temperature readings */
static inline long TEMP_FROM_REG10(u16 val)
reply other threads:[~2005-10-29 0:16 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1130533656553@kroah.com \
--to=gregkh@suse.de \
--cc=lm-sensors@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.