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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 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@xxxxxxx> wrote:
> >
> > On Thu, 1 Nov 2018, Steve French wrote:
> d>
> > > On Thu, Nov 1, 2018 at 10:18 AM Julia Lawall <julia.lawall@xxxxxxx> 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

Attachment: 0001-cifs-fix-signed-unsigned-mismatch-on-aio_read-patch.patch
Description: 0001-cifs-fix-signed-unsigned-mismatch-on-aio_read-patch.patch


[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux