Re: [PATCH] powerpc/module_64: fix array_size.cocci warning

2022-03-02 Thread Michael Ellerman
On Wed, 23 Feb 2022 15:54:23 +0800, Guo Zhengkui wrote: > Fix following coccicheck warning: > ./arch/powerpc/kernel/module_64.c:432:40-41: WARNING: Use ARRAY_SIZE. > > ARRAY_SIZE(arr) is a macro provided by the kernel. It makes sure that arr > is an array, so it's safer than sizeof(arr) / sizeof(a

Re: [PATCH] powerpc/module_64: fix array_size.cocci warning

2022-02-24 Thread Russell Currey
On Wed, 2022-02-23 at 15:54 +0800, Guo Zhengkui wrote: > Fix following coccicheck warning: > ./arch/powerpc/kernel/module_64.c:432:40-41: WARNING: Use ARRAY_SIZE. > > ARRAY_SIZE(arr) is a macro provided by the kernel. It makes sure that > arr > is an array, so it's safer than sizeof(arr) / sizeof(

[PATCH] powerpc/module_64: fix array_size.cocci warning

2022-02-23 Thread Guo Zhengkui
Fix following coccicheck warning: ./arch/powerpc/kernel/module_64.c:432:40-41: WARNING: Use ARRAY_SIZE. ARRAY_SIZE(arr) is a macro provided by the kernel. It makes sure that arr is an array, so it's safer than sizeof(arr) / sizeof(arr[0]) and more standard. Signed-off-by: Guo Zhengkui --- arch/