Message ID | 1283980273-4880-1-git-send-email-nikitasangelinas@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
diff --git a/arch/parisc/include/asm/mmzone.h b/arch/parisc/include/asm/mmzone.h index 9608d2c..85b23b6 100644 --- a/arch/parisc/include/asm/mmzone.h +++ b/arch/parisc/include/asm/mmzone.h @@ -3,6 +3,8 @@ #ifdef CONFIG_DISCONTIGMEM +#include <linux/kernel.h> + #define MAX_PHYSMEM_RANGES 8 /* Fix the size for now (current known max is 3) */ extern int npmem_ranges; @@ -51,7 +53,7 @@ static inline int pfn_to_nid(unsigned long pfn) return 0; i = pfn >> PFNNID_SHIFT; - BUG_ON(i >= sizeof(pfnnid_map) / sizeof(pfnnid_map[0])); + BUG_ON(i >= ARRAY_SIZE(pfnnid_map)); r = pfnnid_map[i]; BUG_ON(r == 0xff);