Re: [PATCH] lib: scatterlist: Fix to support no mapped sg

2019-04-19 Thread Zhou Wang
On 2019/4/19 18:43, Robert Jarzmik wrote: > Zhou Wang writes: > >> In function sg_split, the second sg_calculate_split will return -EINVAL >> when in_mapped_nents is 0. >> >> Indeed there is no need to do second sg_calculate_split and sg_split_mapped >> when in_mapped_nents is 0, as

Re: [PATCH] lib: scatterlist: Fix to support no mapped sg

2019-04-19 Thread Robert Jarzmik
Zhou Wang writes: > In function sg_split, the second sg_calculate_split will return -EINVAL > when in_mapped_nents is 0. > > Indeed there is no need to do second sg_calculate_split and sg_split_mapped > when in_mapped_nents is 0, as in_mapped_nents indicates no mapped entry in > original sgl. >

[PATCH] lib: scatterlist: Fix to support no mapped sg

2019-04-18 Thread Zhou Wang
In function sg_split, the second sg_calculate_split will return -EINVAL when in_mapped_nents is 0. Indeed there is no need to do second sg_calculate_split and sg_split_mapped when in_mapped_nents is 0, as in_mapped_nents indicates no mapped entry in original sgl. Signed-off-by: Zhou Wang ---