From: Guenter Roeck <linux@roeck-us.net>
To: Naresh Solanki <naresh.solanki@9elements.com>
Cc: Jean Delvare <jdelvare@suse.com>,
linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 1/2] hwmon: (max6639) : Update hwmon init using info structure
Date: Thu, 13 Jun 2024 06:46:55 -0700 [thread overview]
Message-ID: <4b5f50d2-198a-4bfc-bbdc-d2da02d50ca7@roeck-us.net> (raw)
In-Reply-To: <CABqG17hC_h8ru6xmTZiQH4vEAY_+zcPk4=CMB2rn9u_j2jVx0A@mail.gmail.com>
On 6/13/24 02:35, Naresh Solanki wrote:
> Hi Guenter,
>
>
> On Wed, 12 Jun 2024 at 20:04, Guenter Roeck <linux@roeck-us.net> 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@9elements.com>
>>> ---
>>
>> 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
prev parent reply other threads:[~2024-06-13 13:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-04 12:47 [PATCH v4 1/2] hwmon: (max6639) : Update hwmon init using info structure Naresh Solanki
2024-06-04 12:47 ` [PATCH v4 2/2] hwmon: (max6639) : Add hwmon attributes for fan and pwm Naresh Solanki
2024-06-12 15:55 ` Guenter Roeck
2024-06-13 9:51 ` Naresh Solanki
2024-06-13 13:44 ` Guenter Roeck
2024-06-12 14:34 ` [PATCH v4 1/2] hwmon: (max6639) : Update hwmon init using info structure Guenter Roeck
2024-06-13 9:35 ` Naresh Solanki
2024-06-13 13:46 ` Guenter Roeck [this message]
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=4b5f50d2-198a-4bfc-bbdc-d2da02d50ca7@roeck-us.net \
--to=linux@roeck-us.net \
--cc=jdelvare@suse.com \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=naresh.solanki@9elements.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox