Re: [PATCH 2/2] powerpc: Use ARRAY_SIZE to replace its implementation

2018-08-14 Thread zhong jiang
On 2018/8/14 17:28, Michael Ellerman wrote: > zhong jiang writes: >> Use ARRAY_SIZE instead of dividing sizeof array with sizeof an element. >> So just replace it. >> >> Signed-off-by: zhong jiang >> --- >> arch/powerpc/xmon/ppc-opc.c | 12 >> 1 file changed, 4 insertions(+), 8

Re: [PATCH 2/2] powerpc: Use ARRAY_SIZE to replace its implementation

2018-08-14 Thread Michael Ellerman
zhong jiang writes: > Use ARRAY_SIZE instead of dividing sizeof array with sizeof an element. > So just replace it. > > Signed-off-by: zhong jiang > --- > arch/powerpc/xmon/ppc-opc.c | 12 > 1 file changed, 4 insertions(+), 8 deletions(-) This code is copied from binutils and we

Re: [PATCH 2/2] powerpc: Use ARRAY_SIZE to replace its implementation

2018-08-13 Thread Joe Perches
On Tue, 2018-08-14 at 10:46 +0800, zhong jiang wrote: > Use ARRAY_SIZE instead of dividing sizeof array with sizeof an element. > So just replace it. Better to remove the extern and the const altogether here as well. $ git grep -w powerpc_num_opcodes arch/powerpc/xmon/ppc-dis.c: opcode_end =

[PATCH 2/2] powerpc: Use ARRAY_SIZE to replace its implementation

2018-08-13 Thread zhong jiang
Use ARRAY_SIZE instead of dividing sizeof array with sizeof an element. So just replace it. Signed-off-by: zhong jiang --- arch/powerpc/xmon/ppc-opc.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/arch/powerpc/xmon/ppc-opc.c b/arch/powerpc/xmon/ppc-opc.c index