Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753805Ab2EBKLz (ORCPT ); Wed, 2 May 2012 06:11:55 -0400 Received: from metis.ext.pengutronix.de ([92.198.50.35]:37122 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753317Ab2EBKLw (ORCPT ); Wed, 2 May 2012 06:11:52 -0400 Date: Wed, 2 May 2012 12:11:32 +0200 From: Sascha Hauer To: Russell King - ARM Linux Cc: Saravana Kannan , Mike Turquette , Arnd Bergman , linux-arm-kernel@lists.infradead.org, Andrew Lunn , Paul Walmsley , Linus Walleij , Stephen Boyd , linux-arm-msm@vger.kernel.org, Mark Brown , Magnus Damm , linux-kernel@vger.kernel.org, Rob Herring , Richard Zhao , Grant Likely , Deepak Saxena , Amit Kucheria , Jamie Iles , Jeremy Kerr , Thomas Gleixner , Shawn Guo Subject: Re: [PATCH] clk: Use a separate struct for holding init data. Message-ID: <20120502101132.GW4141@pengutronix.de> References: <1335419936-10881-1-git-send-email-skannan@codeaurora.org> <20120502095816.GG20478@pengutronix.de> <20120502100225.GB24211@n2100.arm.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120502100225.GB24211@n2100.arm.linux.org.uk> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-IRC: #ptxdist @freenode X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-Uptime: 12:09:13 up 171 days, 17:56, 87 users, load average: 2.19, 2.72, 2.01 User-Agent: Mutt/1.5.21 (2010-09-15) X-SA-Exim-Connect-IP: 2001:6f8:1178:2:21e:67ff:fe11:9c5c X-SA-Exim-Mail-From: sha@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1054 Lines: 27 On Wed, May 02, 2012 at 11:02:25AM +0100, Russell King - ARM Linux wrote: > > > > There is a mux->hw.init = &init missing here. > > What happens to mux->hw.init long term? Because once this function > returns, that pointer will no longer be valid. It's not used after clk_register, so everything should be fine. > It would be a good > idea to NULL it out in clk_register() once its done with, to ensure > that no one comes up with the idea of using it later. Enforcing this is a good idea. Sascha -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | -- 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/