Re: [PATCH v2 1/5] lib/scatterlist: use consistent sg_copy_buffer() return type

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

 



On Mon, 26 Oct 2020 16:50:53 -0400, Douglas Gilbert wrote:

> On 2020-10-26 3:06 p.m., David Disseldorp wrote:
> > sg_copy_buffer() returns a size_t with the number of bytes copied.
> > Return 0 instead of false if the copy is skipped.
> > 
> > Signed-off-by: David Disseldorp <ddiss@xxxxxxx>
> > ---
> >   lib/scatterlist.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/lib/scatterlist.c b/lib/scatterlist.c
> > index 0a482ef988e5..a59778946404 100644
> > --- a/lib/scatterlist.c
> > +++ b/lib/scatterlist.c
> > @@ -933,7 +933,7 @@ size_t sg_copy_buffer(struct scatterlist *sgl, unsigned int nents, void *buf,
> >   	sg_miter_start(&miter, sgl, nents, sg_flags);
> >   
> >   	if (!sg_miter_skip(&miter, skip))
> > -		return false;
> > +		return 0;
> >   
> >   	while ((offset < buflen) && sg_miter_next(&miter)) {
> >   		unsigned int len;
> >   
> 
> This one probably should be sent by itself as a fix to:
>     linux-block@xxxxxxxxxxxxxxx
> 
> and cc-ed to:
>     axboe@xxxxxxxxx
> 
> on the assumption that Jens Axboe is the maintainer of lib/scatterlist.c .
> He put a fix of mine in sgl_alloc_order() into the kernel recently.
> 
> Otherwise:
> Reviewed-by: Douglas Gilbert <dgilbert@xxxxxxxxxxxx>

Sent. Thanks Douglas!



[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux