From patchwork Wed Sep 8 21:11:13 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikitas Angelinas X-Patchwork-Id: 164441 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o88LBEv3029648 for ; Wed, 8 Sep 2010 21:11:14 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755401Ab0IHVKv (ORCPT ); Wed, 8 Sep 2010 17:10:51 -0400 Received: from mail-bw0-f46.google.com ([209.85.214.46]:39608 "EHLO mail-bw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755374Ab0IHVKs (ORCPT ); Wed, 8 Sep 2010 17:10:48 -0400 Received: by bwz11 with SMTP id 11so522503bwz.19 for ; Wed, 08 Sep 2010 14:10:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer:in-reply-to:references; bh=dipO7igCSO4eaoKMz0O32RtP6vMeRi1rj+DbjYMgPug=; b=fKqRtsvybR309XD81vHxMIqpr9r9ZmmNNUmw5dK+mJ7vxNjA1lIq8p8Wxo9Z670GaZ Jm/JVsjk4wdaoBoaGVEQR4ZDU+S6stzn86YjCfIX6RPtiGvpIPL9stM4NiFdr7x8kgmB gJ/Yi2n6achKudof3GMeM9m2f7P7y3IFj+YhQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=a/k0afFndWyG+R9V7WW49w7EGMBNwFTa6Le77MwSvlaFRM/LKae6MnuYivCue+wugC tOZNFE2tQwFbqXo5lzhqjn810ae9u6kq+ve37OJ+XgaEla0GUjBz9GHP0bFybnvFL4Ch RL64anIMIC0u08bF4vAewVmlCOEGwJIU2twt0= Received: by 10.204.60.145 with SMTP id p17mr2070392bkh.56.1283980246876; Wed, 08 Sep 2010 14:10:46 -0700 (PDT) Received: from localhost.localdomain (93-97-190-57.zone5.bethere.co.uk [93.97.190.57]) by mx.google.com with ESMTPS id 11sm433057bkj.11.2010.09.08.14.10.45 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 08 Sep 2010 14:10:46 -0700 (PDT) From: Nikitas Angelinas To: kyle@mcmartin.ca, deller@gmx.de, jejb@parisc-linux.org Cc: linux-parisc@vger.kernel.org, linux-kernel@vger.kernel.org, Nikitas Angelinas Subject: [PATCH 2/8] arch/parisc/include/asm: use ARRAY_SIZE macro in mmzone.h Date: Wed, 8 Sep 2010 22:11:13 +0100 Message-Id: <1283980273-4880-1-git-send-email-nikitasangelinas@gmail.com> X-Mailer: git-send-email 1.7.2.3 In-Reply-To: <1283979457-4649-1-git-send-email-nikitasangelinas@gmail.com> References: <1283979457-4649-1-git-send-email-nikitasangelinas@gmail.com> Sender: linux-parisc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-parisc@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Wed, 08 Sep 2010 21:11:14 +0000 (UTC) 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 + #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);