Re: [PATCH v4 1/2] hwmon: (max6639) : Update hwmon init using info structure

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

 



On 6/13/24 02:35, Naresh Solanki wrote:
Hi Guenter,


On Wed, 12 Jun 2024 at 20:04, Guenter Roeck <linux@xxxxxxxxxxxx> wrote:

Hi Naresh,

On Tue, Jun 04, 2024 at 06:17:39PM +0530, Naresh Solanki wrote:
Update hwmon init with info instead of group. The hwmon info structure
in more flexible to describe sensor attribute & easy to maintian.

Signed-off-by: Naresh Solanki <naresh.solanki@xxxxxxxxxxxxx>
---

After applying your patch, I get the following errors in my module tests.

Testing max6639 ...
temp1_crit: Suspected underflow: [min=0, read 255000, written -2147483648]
temp1_emergency: Suspected underflow: [min=0, read 255000, written -2147483648]
temp1_max: Suspected underflow: [min=0, read 255000, written -2147483648]
temp2_crit: Suspected underflow: [min=0, read 255000, written -2147483648]
temp2_emergency: Suspected underflow: [min=0, read 255000, written -2147483648]
temp2_max: Suspected underflow: [min=0, read 255000, written -2147483648]

That was not seen before. Problem is that your set functions pass 'unsigned long'
as parameter, converting negative values into large positive ones.
Agree. Will update v5 with below changes:
For set functions, I'll change 'unsigned long' to long.
For get functions, will do typecast as below:
         *crit = (long)val * 1000;

Please let me know if you have any other suggestions.


No. Running your patch through my module tests was the last step of applying it,
so you were almost there.

Thanks,
Guenter





[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux