From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52330) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VDvj7-0000mr-Nn for qemu-devel@nongnu.org; Mon, 26 Aug 2013 08:17:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VDvis-00020N-Ps for qemu-devel@nongnu.org; Mon, 26 Aug 2013 08:16:57 -0400 Received: from e28smtp04.in.ibm.com ([122.248.162.4]:44982) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VDvis-0001z1-1j for qemu-devel@nongnu.org; Mon, 26 Aug 2013 08:16:42 -0400 Received: from /spool/local by e28smtp04.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 26 Aug 2013 17:38:26 +0530 From: "Aneesh Kumar K.V" In-Reply-To: References: <1377235210-27093-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com> <1377235210-27093-2-git-send-email-aneesh.kumar@linux.vnet.ibm.com> <87mwo5dk5q.fsf@linux.vnet.ibm.com> Date: Mon, 26 Aug 2013 17:46:25 +0530 Message-ID: <87haecejfq.fsf@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH -V3 1/4] target-ppc: Update slb array with correct index values. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: "qemu-ppc@nongnu.org list:PowerPC" , Paul Mackerras , "qemu-devel@nongnu.org qemu-devel" Alexander Graf writes: > On 26.08.2013, at 08:46, Aneesh Kumar K.V wrote: > >> Alexander Graf writes: >> .... >>> >>>> + */ >>>> + memset(env->slb, 0, 64 * sizeof(ppc_slb_t)); >>> >>> Can't we use ARRAY_SIZE here and below? >> >> I was thinking we want to be explicit there saying we are zeroing out all >> the 64 entries. I could do sizeof(env->slb). > > Yup, that works too. In the loop below s/64/ARRAY_SIZE(env->slb)/ should work too I think. > Updated with the above change. -aneesh