Re: [PATCH] iommu/mtk: fix handling of of_count_phandle_with_args result

2016-03-01 Thread Yong Wu
On Tue, 2016-03-01 at 12:34 +0100, Joerg Roedel wrote: > On Tue, Mar 01, 2016 at 10:36:23AM +0100, Andrzej Hajda wrote: > > The function can return negative value so it should be assigned to signed > > variable. The patch changes also type of related i variable to make code > > more compact and coh

[PATCH] iommu/mtk: fix handling of of_count_phandle_with_args result

2016-03-01 Thread Andrzej Hajda
The function can return negative value so it should be assigned to signed variable. The patch changes also type of related i variable to make code more compact and coherent. The problem has been detected using patch scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci. Signed-off-by: Andrzej

Re: [PATCH] iommu/mtk: fix handling of of_count_phandle_with_args result

2016-03-01 Thread Joerg Roedel
On Tue, Mar 01, 2016 at 10:36:23AM +0100, Andrzej Hajda wrote: > The function can return negative value so it should be assigned to signed > variable. The patch changes also type of related i variable to make code > more compact and coherent. > > The problem has been detected using patch > scripts