From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tony Lindgren Subject: Re: Errors at boot time from OMAP4430SDP (and a whinge about serial stuff) Date: Fri, 19 Oct 2012 10:07:59 -0700 Message-ID: <20121019170759.GK4730@atomide.com> References: <20121012155434.GO28061@n2100.arm.linux.org.uk> <20121012162452.GD30339@atomide.com> <20121016181038.GC15569@atomide.com> <20121016182642.GF15569@atomide.com> <507EA7DB.3070207@compulab.co.il> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mho-04-ewr.mailhop.org ([204.13.248.74]:42118 "EHLO mho-02-ewr.mailhop.org" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751259Ab2JSRIE (ORCPT ); Fri, 19 Oct 2012 13:08:04 -0400 Content-Disposition: inline In-Reply-To: Sender: linux-omap-owner@vger.kernel.org List-Id: linux-omap@vger.kernel.org To: Ohad Ben-Cohen Cc: Igor Grinberg , Russell King - ARM Linux , linux-omap@vger.kernel.org, Santosh Shilimkar , "Cousson, Benoit" , Paul Walmsley , Kevin Hilman , Afzal Mohammed , =?utf-8?B?UMOpdGVy?= Ujfalusi * Ohad Ben-Cohen [121018 10:00]: > Hi Igor, > > On Wed, Oct 17, 2012 at 2:43 PM, Igor Grinberg wrote: > > You are adding declarations inside the common-board-devices.h, > > but the implementation inside the devices.c. > > I can see that devices.c has only on-soc devices in it. > > So, I would expect to have the wl12xx_board_init() function implementation > > inside the common-board-devices.c file. > > I really don't mind. Tony do you have any preference? Yes common-board-devices.c would be better. > > Another minor nit: I don't think you need to mark the declaration as __init, > > only the implementation, or is it for documenting it so? > > It may be, but I don't really mind removing it. Let's remove it if > we'll move to common-board-devices.c, otherwise it probably isn't > worth the noise. OK > > Instead of the above, wouldn't it be better to have: > > #if defined(CONFIG_WL12XX_PLATFORM_DATA) > > int __init wl12xx_board_init(struct wl12xx_platform_data *wlan_data, int irq_gpio) > > { > > ... > > } > > #else > > inline int wl12xx_board_init(struct wl12xx_platform_data *wlan_data, int irq_gpio) > > { > > return 0; > > } > > #endif > > I think readability-wise we're probably better off without the #ifdef. We could optimize away a minimal amount of code for many configurations with the ifdef? :) Regards, Tony