[POWERPC] PPC: Use ARRAY_SIZE macro when appropriate
Use ARRAY_SIZE macro already defined in linux/kernel.h Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Kumar Gala <galak@gate.crashing.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
This commit is contained in:

committed by
Paul Mackerras

parent
3839a59439
commit
2366fb16ab
@@ -14,6 +14,7 @@
|
||||
*/
|
||||
#include <linux/types.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/mm.h>
|
||||
#include <linux/slab.h>
|
||||
|
||||
@@ -654,7 +655,7 @@ void rh_dump(rh_info_t * info)
|
||||
int maxnr;
|
||||
int i, nr;
|
||||
|
||||
maxnr = sizeof(st) / sizeof(st[0]);
|
||||
maxnr = ARRAY_SIZE(st);
|
||||
|
||||
printk(KERN_INFO
|
||||
"info @0x%p (%d slots empty / %d max)\n",
|
||||
|
Reference in New Issue
Block a user