Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751774AbWLNXOY (ORCPT ); Thu, 14 Dec 2006 18:14:24 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751785AbWLNXOX (ORCPT ); Thu, 14 Dec 2006 18:14:23 -0500 Received: from einhorn.in-berlin.de ([192.109.42.8]:51124 "EHLO einhorn.in-berlin.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751774AbWLNXOX (ORCPT ); Thu, 14 Dec 2006 18:14:23 -0500 X-Envelope-From: stefanr@s5r6.in-berlin.de Message-ID: <4581DAB0.2060505@s5r6.in-berlin.de> Date: Fri, 15 Dec 2006 00:13:52 +0100 From: Stefan Richter User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.8) Gecko/20061202 SeaMonkey/1.0.6 MIME-Version: 1.0 To: "Robert P. J. Day" CC: Zach Brown , Linux kernel mailing list Subject: Re: lots of code could be simplified by using ARRAY_SIZE() References: <2F8F687E-C5E5-4F7D-9585-97DA97AE1376@oracle.com> In-Reply-To: X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 725 Lines: 22 Robert P. J. Day wrote: > On Thu, 14 Dec 2006, Zach Brown wrote: ... >> Indeed, there seems to be lots of potential clean-up there. >> Including duplicate macros like: >> >> ./drivers/ide/ide-cd.h:#define ARY_LEN(a) ((sizeof(a) / sizeof(a[0]))) > > not surprisingly, i have a script "arraysize.sh": ... This could also come in the flavor "sizeof(a) / sizeof(*a)". I haven't checked if there are actual instances. -- Stefan Richter -=====-=-==- ==-- -==== http://arcgraph.de/sr/ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/