Re: [PATCH v2] mm: Unsigned 'nr_pages' always larger than zero

2019-09-05 Thread zhong jiang
On 2019/9/5 11:12, Matthew Wilcox wrote: > On Thu, Sep 05, 2019 at 10:17:51AM +0800, zhong jiang wrote: >> With the help of unsigned_lesser_than_zero.cocci. Unsigned 'nr_pages' >> compare with zero. And __gup_longterm_locked pass an long local variant >> 'rc' to check_and_migrate_cma_pages. Hence

Re: [PATCH v2] mm: Unsigned 'nr_pages' always larger than zero

2019-09-04 Thread Matthew Wilcox
On Thu, Sep 05, 2019 at 10:17:51AM +0800, zhong jiang wrote: > With the help of unsigned_lesser_than_zero.cocci. Unsigned 'nr_pages' > compare with zero. And __gup_longterm_locked pass an long local variant > 'rc' to check_and_migrate_cma_pages. Hence it is nicer to change the > parameter to long

[PATCH v2] mm: Unsigned 'nr_pages' always larger than zero

2019-09-04 Thread zhong jiang
With the help of unsigned_lesser_than_zero.cocci. Unsigned 'nr_pages' compare with zero. And __gup_longterm_locked pass an long local variant 'rc' to check_and_migrate_cma_pages. Hence it is nicer to change the parameter to long to fix the issue. Fixes: 932f4a630a69 ("mm/gup: replace