[cifs:for-next 7/9] fs/cifs/file.c:3203:7-14: WARNING: Unsigned expression compared with zero: cur_len < 0 (fwd)

Long Li longli at microsoft.com
Thu Nov 1 17:37:09 UTC 2018


> Subject: Re: [cifs:for-next 7/9] fs/cifs/file.c:3203:7-14: WARNING: Unsigned
> expression compared with zero: cur_len < 0 (fwd)
> 
> On Thu, Nov 1, 2018 at 11:06 AM Julia Lawall <julia.lawall at lip6.fr> wrote:
> >
> > On Thu, 1 Nov 2018, Steve French wrote:
> d>
> > > On Thu, Nov 1, 2018 at 10:18 AM Julia Lawall <julia.lawall at lip6.fr> wrote:
> > > >
> > > > On Thu, 1 Nov 2018, Steve French wrote:
> > > > >
> > > > > ssize_t iov_iter_get_pages_alloc(struct iov_iter *i,
> > > > >                    struct page ***pages, size_t maxsize,
> > > > >                    size_t *start)
> > > >
> > > > The return type is ssize_t not size_t.  Putting a negative value
> > > > into a size_t variable makes it positive
> > >
> > >
> > > Aah - I misread the extra s (ssize_t vs. size_t) that is missing in his patch.
> > >
> > > How about this trivial fix (attached)  -
> >
> > It looks fine.  There is though an extra space between result and =,
> > and it seems checkpatch does not like function calls that end with an
> > open parenthesis.  But, up to you.
> >
> > julia
> >
> 
> Fixed the extra space -  thx
> 
> checkpatch didn't complain on my system about the parentheses.
> 
> 
> 
> --
> Thanks,
> 
> Steve

There is a similar problem in the aio read patch. Here is the patch to fix it. (I think your previous patch fixed the problem in aio write). Maye we should merge these two follow up patches into one patch.

Long
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-cifs-fix-signed-unsigned-mismatch-on-aio_read-patch.patch
Type: application/octet-stream
Size: 1410 bytes
Desc: 0001-cifs-fix-signed-unsigned-mismatch-on-aio_read-patch.patch
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20181101/df75bd4e/0001-cifs-fix-signed-unsigned-mismatch-on-aio_read-patch.obj>


More information about the samba-technical mailing list