[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75VfbZhMvs7dHwadvNs6maPsBVOY3Mk5wkKSwZ1RANQQHDA@mail.gmail.com>
Date: Thu, 14 Apr 2022 16:47:12 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Haowen Bai <baihaowen@...zu.com>
Cc: Jonathan Cameron <jic23@...nel.org>,
Lars-Peter Clausen <lars@...afoo.de>,
linux-iio <linux-iio@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] iio: gp2ap020a00f: Fix signedness bug
On Thu, Apr 14, 2022 at 2:19 PM Haowen Bai <baihaowen@...zu.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.
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists