All of lore.kernel.org
 help / color / mirror / Atom feed
* [lm-sensors] [patch 1/X] pc87360: use SENSOR_ATTR_2 instead of
@ 2006-01-19 23:32 Jim Cromie
  0 siblings, 0 replies; only message in thread
From: Jim Cromie @ 2006-01-19 23:32 UTC (permalink / raw)
  To: lm-sensors


Patch replaces all uses of SENSOR_ATTR with SENSOR_ATTR_2 in hwmon/pc87360.c
This yields a tiny (0.5%) shrink in the object size, (so its justifiable
by itself), but more importantly, it sets us up to consolidate many of the
show|set_*_* callbacks into a much smaller number of them.

It depends upon hwmon-sensor-attr-array-2.patch

   text    data     bss     dec     hex filename
  12114    3144      16   15274    3baa 
a2-pc-0/drivers/hwmon/pc87360.ko   <--- 16-rc1-mm1 + deps
  12046    3144      16   15206    3b66 a2-pc-1/drivers/hwmon/pc87360.ko

<aside>
Jean, I think the identical data-size means that 
sensor_device_attribute_2's
are not smaller than sensor_device_attribute's, probably because of 
alignment issues
in the array.
This suggests that maybe we should go straight to SENSOR_ATTR_4, with
4 u8's, or maybe even a union of u8 bytes[4]; u16 shorts[2]; int index;
</>


There are a few places where I could add line wraps, but this is meant 
as an interim
patch, and I expect the consolidated show_*() name to shorten it back 
up, and obviate
the need to wrap.  So I avoided the churn.



BTW, sensors still work, which (informally) validates the new mutexes here.

$ diffstat hwmon-pc87360-use-sensor-attr-2.patch
 pc87360.c |  492 
++++++++++++++++++++++++++++++++++----------------------------
 1 files changed, 277 insertions(+), 215 deletions(-)


Signed-off-by:  Jim Cromie <jim.cromie at gmail.com>


-------------- next part --------------
A non-text attachment was scrubbed...
Name: hwmon-pc87360-use-sensor-attr-2.patch
Type: text/x-patch
Size: 36103 bytes
Desc: not available
Url : http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20060120/6935482a/hwmon-pc87360-use-sensor-attr-2-0001.bin

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-01-19 23:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-19 23:32 [lm-sensors] [patch 1/X] pc87360: use SENSOR_ATTR_2 instead of Jim Cromie

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.