From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754072AbYITOpX (ORCPT ); Sat, 20 Sep 2008 10:45:23 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751236AbYITOpJ (ORCPT ); Sat, 20 Sep 2008 10:45:09 -0400 Received: from fg-out-1718.google.com ([72.14.220.153]:6624 "EHLO fg-out-1718.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751128AbYITOpI (ORCPT ); Sat, 20 Sep 2008 10:45:08 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=FOAZOioTqp+t9ekAArTEWXHH153QgqNuJviOtaxRinem+yAdFQGKHabUlOnGLmuiPO QIlPt2NclTYKEYDQpSISxMdDEIYN/Aw6KBXmVfkZZkzcoz6mr0JfZyZ5FQ6jvxCTjvDZ WdjfonhjL+TyPxwGxg6FMLHOCeUXsy+UK2PUA= Date: Sat, 20 Sep 2008 18:45:04 +0400 From: Cyrill Gorcunov To: Christer Weinigel Cc: Alexey Dobriyan , Russ Dill , Eric Miao , linux-arm-kernel@lists.arm.linux.org.uk, Ben Dooks , linux-kernel@vger.kernel.org Subject: Re: kernel.h: add ARRAY_AND_SIZE() macro to complement ARRAY_SIZE(). Message-ID: <20080920144504.GB7354@localhost> References: <20080918132447.516309749@fluff.org.uk> <20080918150624.GA3421@x200.localdomain> <20080919065426.GA7222@lenovo> <20080919175544.GA3228@x200.localdomain> <48D4F519.2080509@weinigel.se> <20080920134543.GA7354@localhost> <48D50883.6040700@weinigel.se> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <48D50883.6040700@weinigel.se> User-Agent: Mutt/1.5.17+20080114 (2008-01-14) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [Christer Weinigel - Sat, Sep 20, 2008 at 04:28:19PM +0200] ... > > In my opinion, making platform_add_devices into a magic macro is > actually worse, since the same construct (array, ARRAY_SIZE(array)) is > used in many places, so one would have to do the same thing over and > over again for every function. In that case it's better to have to > learn one macro once, and the ALL_CAPITALS should make it obvious that > it is a macro. > > /Christer > Well, can't agree with you :) It's my _presonal_ opinion. You could define it as static inline int platform_add_devices_array(struct platform_device **devs) { return platform_add_devices(devs, ARRAY_SIZE(devs)); } for me it would look much better then hide args by MACRO. And I don't feel any hard about to use platform_add_devices with TWO arguments. But I repeat - it's my _personal_ opinion. - Cyrill -