Re: [PATCH 1/2] of: base: Allow more args than MAX_PHANDLE_ARGS if required

2015-07-24 Thread Rob Herring
On Thu, Jul 16, 2015 at 6:09 AM, Joerg Roedel wrote: > Hi Will, > > On Thu, Jul 16, 2015 at 11:23:26AM +0100, Will Deacon wrote: >> On Thu, Jul 16, 2015 at 09:30:43AM +0100, Joerg Roedel wrote: >> > +struct of_phandle_args *of_alloc_phandle_args(int size) >> > +{ >> > + struct of_phandle_args *a

Re: [PATCH 1/2] of: base: Allow more args than MAX_PHANDLE_ARGS if required

2015-07-16 Thread Joerg Roedel
Hi Will, On Thu, Jul 16, 2015 at 11:23:26AM +0100, Will Deacon wrote: > On Thu, Jul 16, 2015 at 09:30:43AM +0100, Joerg Roedel wrote: > > +struct of_phandle_args *of_alloc_phandle_args(int size) > > +{ > > + struct of_phandle_args *args; > > + int e = max(0, size - MAX_PHANDLE_ARGS); > > + > >

Re: [PATCH 1/2] of: base: Allow more args than MAX_PHANDLE_ARGS if required

2015-07-16 Thread Will Deacon
On Thu, Jul 16, 2015 at 09:30:43AM +0100, Joerg Roedel wrote: > From: Joerg Roedel > > The main use of MAX_PHANDLE_ARGS is to define the number of > args elements in 'struct of_phandle_args'. This struct is > often declared on the stack and thus it is impractical to > increase MAX_PHANDLE_ARGS ag

[PATCH 1/2] of: base: Allow more args than MAX_PHANDLE_ARGS if required

2015-07-16 Thread Joerg Roedel
From: Joerg Roedel The main use of MAX_PHANDLE_ARGS is to define the number of args elements in 'struct of_phandle_args'. This struct is often declared on the stack and thus it is impractical to increase MAX_PHANDLE_ARGS again and again. To handle situations where more than MAX_PHANDLE_ARGS elem

[RFC PATCH 1/2] of: base: Allow more args than MAX_PHANDLE_ARGS if required

2015-06-25 Thread Joerg Roedel
From: Joerg Roedel The main use of MAX_PHANDLE_ARGS is to define the number of args elements in 'struct of_phandle_args'. This struct is often declared on the stack and thus it is impractical to increase MAX_PHANDLE_ARGS again and again. To handle situations where more than MAX_PHANDLE_ARGS elem