Re: [PATCH v1 2/2] of: Let of_for_each_phandle fallback to non-negative cell_count

2019-09-17 Thread Uwe Kleine-König
On Tue, Sep 17, 2019 at 11:25:46AM +, Peter Rosin wrote: > On 2019-09-17 12:13, Uwe Kleine-König wrote: > > Hello Geert, > > > > On Tue, Sep 17, 2019 at 11:40:25AM +0200, Geert Uytterhoeven wrote: > >> Hi Rob, Uwe, > >> > >> On Fri, Sep 13, 2

Re: [PATCH v1 2/2] of: Let of_for_each_phandle fallback to non-negative cell_count

2019-09-17 Thread Uwe Kleine-König
o > > > allow some optional arguments without having to change all referenced > > > nodes this change introduces a way to specify a default cell_count. So > > > when a phandle is parsed we check for the $cells_name property and use > > > it as before if present. If

Re: [PATCH v1 1/2] iommu: pass cell_count = -1 to of_for_each_phandle with cells_name

2019-09-12 Thread Uwe Kleine-König
On Tue, Sep 03, 2019 at 02:52:10PM +0200, Joerg Roedel wrote: > On Sat, Aug 24, 2019 at 03:28:45PM +0200, Uwe Kleine-König wrote: > > Currently of_for_each_phandle ignores the cell_count parameter when a > > cells_name is given. I intend to change that and let the iterator fall &g

[PATCH v1 1/2] iommu: pass cell_count = -1 to of_for_each_phandle with cells_name

2019-08-24 Thread Uwe Kleine-König
iterate, fix them to pass cell_count = -1 when also cells_name is given which yields the expected behaviour with and without my change. Signed-off-by: Uwe Kleine-König --- drivers/iommu/arm-smmu.c | 2 +- drivers/iommu/mtk_iommu_v1.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff

[PATCH v1 2/2] of: Let of_for_each_phandle fallback to non-negative cell_count

2019-08-24 Thread Uwe Kleine-König
. If it is not present we fall back to cells_count if non-negative and only fail if cells_count is smaller than zero. Signed-off-by: Uwe Kleine-König --- drivers/of/base.c | 25 + 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/drivers/of/base.c b/d