Re: [PATCH] hwmon: (nct6775) Use int type to store negative error codes
From: Guenter Roeck
Date: Sun Aug 31 2025 - 18:25:11 EST
On Sat, Aug 30, 2025 at 05:51:05PM +0800, Qianfeng Rong wrote:
> Change the 'ret' variable from u32 to int in nct6775_asuswmi_read() to
> store negative error codes or zero;
>
> Storing the negative error codes in unsigned type, doesn't cause an issue
> at runtime but can be confusing. Additionally, assigning negative error
> codes to unsigned type may trigger a GCC warning when the -Wsign-conversion
> flag is enabled.
>
> No effect on runtime.
>
> Signed-off-by: Qianfeng Rong <rongqianfeng@xxxxxxxx>
Applied.
Guenter