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
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
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 ++--
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.
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
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
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