From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Korsgaard Subject: Re: [PATCH] i2c: Remove unneeded xxx_set_drvdata(..., NULL) calls Date: Sun, 17 Feb 2013 16:12:31 +0100 Message-ID: <87txpboty7.fsf@dell.be.48ers.dk> References: <1360953682-25066-1-git-send-email-dianders@chromium.org> <1360970315-32116-1-git-send-email-dianders@chromium.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1360970315-32116-1-git-send-email-dianders@chromium.org> (Doug Anderson's message of "Fri, 15 Feb 2013 15:18:35 -0800") List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linuxppc-dev-bounces+glppe-linuxppc-embedded-2=m.gmane.org@lists.ozlabs.org Sender: "Linuxppc-dev" To: Doug Anderson Cc: Wolfram Sang , Tony Lindgren , Linus Walleij , Thierry Reding , Sekhar Nori , linux-i2c@vger.kernel.org, Guan Xuetao , Kevin Hilman , Sonic Zhang , linux-arm-kernel@lists.infradead.org, Deepak Sikri , Havard Skinnemoen , Marek Vasut , Pawel Moll , Stephen Warren , Sascha Hauer , Uwe =?utf-8?Q?Kleine?= =?utf-8?Q?-K=C3=B6nig?= , Rob Herring , uclinux-dist-devel@blackfin.uclinux.org, Jean Delvare , Lars-Peter Clausen , "Ben Dooks (embedded platforms)" , Barry List-Id: linux-omap@vger.kernel.org >>>>> "Doug" == Doug Anderson writes: Doug> There is simply no reason to be manually setting the private driver Doug> data to NULL in the remove/fail to probe cases. This is just extra Doug> cruft code that can be removed. Doug> A few notes: Doug> * Nothing relies on drvdata being set to NULL. Doug> * The __device_release_driver() function eventually calls Doug> dev_set_drvdata(dev, NULL) anyway, so there's no need to do it Doug> twice. Doug> * I verified that there were no cases where xxx_get_drvdata() was Doug> being called in these drivers and checking for / relying on the NULL Doug> return value. Doug> This could be cleaned up kernel-wide but for now just take the baby Doug> step and remove from the i2c subsystem. Doug> Reported-by: Wolfram Sang Doug> Reported-by: Stephen Warren Doug> Signed-off-by: Doug Anderson For i2c-ocores.c + i2c-mux-gpio.c: Acked-by: Peter Korsgaard -- Bye, Peter Korsgaard