Re: [PATCH] hwmon: (gpio-fan) Use is_visible to determine if attributes should be created

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Apr 02, 2013 at 12:40:45PM +0200, Simon Guinot wrote:
> On Sat, Mar 30, 2013 at 09:19:19AM -0700, Guenter Roeck wrote:
> > Simplify code and reduce object size by more than 300 bytes (x86_64).
> > 
> > Cc: Jamie Lentin <jm@xxxxxxxxxxxx>
> > Cc: Simon Guinot <sguinot@xxxxxxxxx>
> > Signed-off-by: Guenter Roeck <linux@xxxxxxxxxxxx>
> > ---
> >  drivers/hwmon/gpio-fan.c |  104 +++++++++++++++++-----------------------------
> >  1 file changed, 39 insertions(+), 65 deletions(-)
> 
> Hi Guenter,
> 
> It is quite a smart optimization. Just we have to take care about
> attribute ordering now.
> 
Agreed, but since this is what the 'index' argument to is_visible is for
in the first place, it should be acceptable.

> I have tested you patch on an ns2max board, with several setup
> combinations (alarm and controls). For each of them, the expected sysfs
> attributes are available and the fan is also working.
> 
> Tested-by: Simon Guinot <simon.guinot@xxxxxxxxxxxx>
> 
Thanks!

Guenter

_______________________________________________
lm-sensors mailing list
lm-sensors@xxxxxxxxxxxxxx
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors




[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux