All of lore.kernel.org
 help / color / mirror / Atom feed
From: jim.cromie@gmail.com (Jim Cromie)
To: lm-sensors@vger.kernel.org
Subject: [lm-sensors] revisiting __SENSOR_DEVICE_ATTR() and array
Date: Mon, 19 Dec 2005 16:52:46 +0000	[thread overview]
Message-ID: <43A6E55E.60100@gmail.com> (raw)
In-Reply-To: <439A7911.5020904@gmail.com>

Jean Delvare wrote:

>Hi Jim,
>
>  
>
>>Start converting adm1026 to use arrays of sensor device attributes.
>>This is compile-tested only, and needs someone with hardware to
>>clean it up, fix the overlooked bits, and test it.
>>
>>Signed-off-by:  Jim Cromie <jim.cromie at gmail.com>
>>    
>>
>
>The compiler complains about unused functions, and is right:
>  
>
>show_in should be show_in_min...
>  
>
>... and show_in_max.
>show_fan should be show_fan_min...
>  
>
>... and show_fan_div.
>
>I also had to edit the patch in order to apply it, due to recent
>patches to the adm1026 driver.
>
>Can you respin it based on 2.6.15-rc5-mm1 or later, fixing the bugs
>above?
>
>  
>
Thanks for the review, heres the respin against rc5-mm3
with corrections to the above.

>I'll need someone to test this patch on a real ADM1026 device before I
>can accept it.
>
>Thanks,
>  
>
hmm,  it has no maintainer listed.  I hope someone can test it.
Im CCg the authors named in the file, in case theyre not on lm-sensors.

also, it looks like the following could also benefit some (I havent 
looked closely)
adm1025,
adm1031.
adm9240 ,
asb100,
gl520sm.c
lm{78,85}               several *_fan_##ofset##_{min,max,div,input}

A sligthly sloppy grep for DEVICE_ATTR or  '##' shows 905 lines.
in hwmon/*, some of them are junk, but others are legitimate opportunities
to lose weight.

Also.  I noticed some repeated uses like this:
../../linux-2.6.14.3/drivers/hwmon/gl518sm.c:327:static 
DEVICE_ATTR(in3_input, S_IRUGO, show_in_input3, NULL);

It suggests that DEVICE_ATTR needs a helper initialization macro
just like SENSOR_ATTR, thoughts ?


thanks.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: adm1026-use-sensor-attr-arrays.patch
Type: text/x-patch
Size: 23846 bytes
Desc: not available
Url : http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20051219/7cbbc854/adm1026-use-sensor-attr-arrays-0001.bin

  parent reply	other threads:[~2005-12-19 16:52 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-10  6:43 [lm-sensors] revisiting __SENSOR_DEVICE_ATTR() and array Jim Cromie
2005-12-10 10:21 ` Jean Delvare
2005-12-14  4:44 ` Jim Cromie
2005-12-16  4:39 ` Mark M. Hoffman
2005-12-16 17:28 ` Jim Cromie
2005-12-18 16:43 ` Jean Delvare
2005-12-18 17:33 ` Jean Delvare
2005-12-19 11:52 ` Jim Cromie
2005-12-19 16:52 ` Jim Cromie [this message]
2005-12-24 15:46 ` Jean Delvare
2005-12-24 16:04 ` Jean Delvare

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=43A6E55E.60100@gmail.com \
    --to=jim.cromie@gmail.com \
    --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.