Re: [PATCH 3/3] hwmon: (sht15) add checksum validation support

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

 



On 04/11/11 23:14, Vivien Didelot wrote:
> Excerpts from Jonathan Cameron's message of 2011-04-08 14:33:07 -0400:
>> Why a u8? It is boolean. Obviously that'll work in a u8 but it almost
>> implicitly implies it might contain some data.
>>> +    u8                checksumming;
> 
> Ok, I've updated flags with the bool type.
> 
>> If it's a flag, perhaps u8 implies it might be something other than 0 or 1.
>> Admittedly this is true of some of the other elements, but we live and learn.
>>>      u8                flag;
> 
> As it represents the different states the driver may be in (i.e. what
> action it is doing), I've changed it to an enumeration of actions
> (nothing, reading temp or humid).
That is indeed a much better solution.

_______________________________________________
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