lkml.org 
[lkml]   [2017]   [Mar]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v11 11/12] iio: multiplexer: fix unsigned check with less than zero
On Mon, Mar 27, 2017 at 03:46:47PM +0200, Peter Rosin wrote:
> On 2017-03-27 15:06, Johan Hovold wrote:
> > On Mon, Mar 27, 2017 at 02:17:48PM +0200, Peter Rosin wrote:
> >> Comparing a size_t with less than zero is always false as size_t
> >> is unsigned. So, change the type of the variable to ssize_t and
> >> replicate the size check from mux_configure_channel() into
> >> mux_write_ext_info() thus ensuring that the size will fit in the
> >> ssize_t variable.
> >>
> >> Detected by CoverityScan, CID#1415278 ("Unsigned compared against 0")
> >>
> >> Fixes: 1da8e16d2812 ("iio: multiplexer: new iio category and iio-mux driver")
> >
> > You should fold this one and the next patch into the patches that they
> > fix up instead fixing stuff that's not yet merged incrementally like you
> > do here (specifically, the SHA id above will have no matching commit).

> I forgot about that. And similar for the next patch. But how do you
> propose that I attribute the reporters and CoverityScan?

You can mention it in the cover letter and/or commit messages as you
would for other kinds of review feedback.

Johan

\
 
 \ /
  Last update: 2017-03-27 16:34    [W:0.529 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site