From mboxrd@z Thu Jan 1 00:00:00 1970 From: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= Subject: Re: [PATCH v2 1/7] spi/imx: do not make copy of spi_imx_devtype_data Date: Mon, 11 Jul 2011 09:31:36 +0200 Message-ID: <20110711073136.GA13840@pengutronix.de> References: <1310231801-18761-1-git-send-email-shawn.guo@linaro.org> <1310231801-18761-2-git-send-email-shawn.guo@linaro.org> <19994.41750.920408.162356@ipc1.ka-ro> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Cc: patches-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org, spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, Sascha Hauer , linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org To: Lothar =?iso-8859-1?Q?Wa=DFmann?= Return-path: Content-Disposition: inline In-Reply-To: <19994.41750.920408.162356-VjFSrY7JcPWvSplVBqRQBQ@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org Sender: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org List-Id: linux-spi.vger.kernel.org On Mon, Jul 11, 2011 at 09:15:34AM +0200, Lothar Wa=DFmann wrote: > Hi, > = > Shawn Guo writes: > > spi_imx_devtype_data has already been driver private data. There is > > really no need to make a copy in spi_imx_data. Instead, a reference > > pointer works perfectly fine. > > = > You obviously overlooked, that the copy is done on purpose to keep > only the data that is actually needed and discard everything else > after initialisation. though you could argue that __devinitdata isn't discarded on modern systems anyhow (and Shawn's patch takes care of removing that annotation). Best regards Uwe -- = Pengutronix e.K. | Uwe Kleine-K=F6nig | Industrial Linux Solutions | http://www.pengutronix.de/ |