Re: [PATCH v2 1/6] powerpc/pseries/iommu: Create defines for operations in ibm,ddw-applicable

2020-07-01 Thread Leonardo Bras
On Thu, 2020-07-02 at 10:43 +1000, Alexey Kardashevskiy wrote: > > Or should one stick to #define in this case? > > imho a matter of taste but after some grepping it feels like #define is > mostly used which does not mean it is a good idea. Keep it enum and see > if it passed mpe's filter :)

Re: [PATCH v2 1/6] powerpc/pseries/iommu: Create defines for operations in ibm,ddw-applicable

2020-07-01 Thread Alexey Kardashevskiy
On 02/07/2020 10:36, Leonardo Bras wrote: > On Thu, 2020-07-02 at 10:21 +1000, Alexey Kardashevskiy wrote: >>> enum { >>>DDW_QUERY_PE_DMA_WIN, >>>DDW_CREATE_PE_DMA_WIN, >>>DDW_REMOVE_PE_DMA_WIN, >>> >>>DDW_APPLICABLE_SIZE >>> } >>> IMO, it looks better than all

Re: [PATCH v2 1/6] powerpc/pseries/iommu: Create defines for operations in ibm,ddw-applicable

2020-07-01 Thread Leonardo Bras
On Thu, 2020-07-02 at 10:21 +1000, Alexey Kardashevskiy wrote: > > enum { > >DDW_QUERY_PE_DMA_WIN, > >DDW_CREATE_PE_DMA_WIN, > >DDW_REMOVE_PE_DMA_WIN, > > > >DDW_APPLICABLE_SIZE > > } > > IMO, it looks better than all the defines before. > > > > What do you think?

Re: [PATCH v2 1/6] powerpc/pseries/iommu: Create defines for operations in ibm,ddw-applicable

2020-07-01 Thread Alexey Kardashevskiy
On 01/07/2020 23:28, Leonardo Bras wrote: > On Wed, 2020-07-01 at 18:16 +1000, Alexey Kardashevskiy wrote: >> >> On 24/06/2020 16:24, Leonardo Bras wrote: >>> Create defines to help handling ibm,ddw-applicable values, avoiding >>> confusion about the index of given operations. >>> >>>

Re: [PATCH v2 1/6] powerpc/pseries/iommu: Create defines for operations in ibm,ddw-applicable

2020-07-01 Thread Leonardo Bras
On Wed, 2020-07-01 at 18:16 +1000, Alexey Kardashevskiy wrote: > > On 24/06/2020 16:24, Leonardo Bras wrote: > > Create defines to help handling ibm,ddw-applicable values, avoiding > > confusion about the index of given operations. > > > > Signed-off-by: Leonardo Bras > > --- > >

Re: [PATCH v2 1/6] powerpc/pseries/iommu: Create defines for operations in ibm,ddw-applicable

2020-07-01 Thread Alexey Kardashevskiy
On 24/06/2020 16:24, Leonardo Bras wrote: > Create defines to help handling ibm,ddw-applicable values, avoiding > confusion about the index of given operations. > > Signed-off-by: Leonardo Bras > --- > arch/powerpc/platforms/pseries/iommu.c | 40 +++--- > 1 file changed,

[PATCH v2 1/6] powerpc/pseries/iommu: Create defines for operations in ibm, ddw-applicable

2020-06-24 Thread Leonardo Bras
Create defines to help handling ibm,ddw-applicable values, avoiding confusion about the index of given operations. Signed-off-by: Leonardo Bras --- arch/powerpc/platforms/pseries/iommu.c | 40 +++--- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git