lkml.org 
[lkml]   [2022]   [Apr]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] iio: gp2ap020a00f: Fix signedness bug
From
在 4/14/22 9:47 PM, Andy Shevchenko 写道:
> On Thu, Apr 14, 2022 at 2:19 PM Haowen Bai <baihaowen@meizu.com> wrote:
>> function gp2ap020a00f_get_thresh_reg() is unsigned but returning -EINVAL
>> errcode, and thresh_reg_l is unsigned but receiving -EINVAL errcode. so
>> we have to change u8 -> s8.
> s8 is not enough to hold an (arbitrary) error code. To be on the safe
> side you need to use int.
>
Thank you for your suggestion.

--
Haowen Bai

\
 
 \ /
  Last update: 2022-04-15 03:22    [W:0.073 / U:0.872 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site