Re: [PATCH] powerpc/xmon: use ARRAY_SIZE

2021-07-27 Thread Michael Ellerman
Jason Wang writes: > The ARRAY_SIZE is the macro definition of sizeof(a)/sizeof(a[0]) and > it is more compact and formal to get a array size. > > Signed-off-by: Jason Wang > --- > arch/powerpc/xmon/ppc-opc.c | 12 > 1 file changed, 4 insertions(+), 8 deletions(-) This code is copi

[PATCH] powerpc/xmon: use ARRAY_SIZE

2021-07-25 Thread Jason Wang
The ARRAY_SIZE is the macro definition of sizeof(a)/sizeof(a[0]) and it is more compact and formal to get a array size. Signed-off-by: Jason Wang --- 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/po

[PATCH] powerpc/xmon: Use ARRAY_SIZE

2021-07-01 Thread Jason Wang
The ARRAY_SIZE macro is more compact and formal to get array size in linux kernel source. In addition, it is more readable for kernel developpers. Thus, we can replace all sizeof(arr)/sizeof(arr[0]) with ARRAY_SIZE. Signed-off-by: Jason Wang --- arch/powerpc/xmon/ppc-opc.c | 16 ++--

Re: [PATCH] powerpc/xmon: use ARRAY_SIZE on various array sizing calculations

2017-12-08 Thread Joe Perches
On Fri, 2017-12-08 at 22:51 +1100, Michael Ellerman wrote: > Balbir Singh writes: > > > On Thu, Dec 7, 2017 at 10:01 PM, Colin King > > wrote: > > > From: Colin Ian King > > > > > > Use the ARRAY_SIZE macro on several arrays to determine their size. > > > Improvement suggested by coccinelle.

Re: [PATCH] powerpc/xmon: use ARRAY_SIZE on various array sizing calculations

2017-12-08 Thread Michael Ellerman
Balbir Singh writes: > On Thu, Dec 7, 2017 at 10:01 PM, Colin King wrote: >> From: Colin Ian King >> >> Use the ARRAY_SIZE macro on several arrays to determine their size. >> Improvement suggested by coccinelle. > > This file is taken from binutils and re-licensed. Keeping the file > as-is help

Re: [PATCH] powerpc/xmon: use ARRAY_SIZE on various array sizing calculations

2017-12-07 Thread Balbir Singh
On Thu, Dec 7, 2017 at 10:01 PM, Colin King wrote: > From: Colin Ian King > > Use the ARRAY_SIZE macro on several arrays to determine their size. > Improvement suggested by coccinelle. > This file is taken from binutils and re-licensed. Keeping the file as-is helps apply newer patches easily on

[PATCH] powerpc/xmon: use ARRAY_SIZE on various array sizing calculations

2017-12-07 Thread Colin King
From: Colin Ian King Use the ARRAY_SIZE macro on several arrays to determine their size. Improvement suggested by coccinelle. Signed-off-by: Colin Ian King --- arch/powerpc/xmon/ppc-opc.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/arch/powerpc/xmon/ppc-opc