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-i2c@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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ee0-f50.google.com (mail-ee0-f50.google.com [74.125.83.50]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 971602C007C for ; Mon, 18 Feb 2013 02:12:44 +1100 (EST) Received: by mail-ee0-f50.google.com with SMTP id e51so2470280eek.9 for ; Sun, 17 Feb 2013 07:12:39 -0800 (PST) Sender: Peter Korsgaard From: Peter Korsgaard To: Doug Anderson Subject: Re: [PATCH] i2c: Remove unneeded xxx_set_drvdata(..., NULL) calls References: <1360953682-25066-1-git-send-email-dianders@chromium.org> <1360970315-32116-1-git-send-email-dianders@chromium.org> Date: Sun, 17 Feb 2013 16:12:31 +0100 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") Message-ID: <87txpboty7.fsf@dell.be.48ers.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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 Song , linux-omap@vger.kernel.org, Mika Westerberg , Oskar Schirmer , Fabio Estevam , davinci-linux-open-source@linux.davincidsp.com, Shawn Guo , Jim Cromie , Greg Kroah-Hartman , Tomoya MORINAGA , linux-kernel@vger.kernel.org, Kyungmin Park , Viresh Kumar , Karol Lewandowski , Jiri Kosina , STEricsson , Joe Perches , Andrew Morton , Alessandro Rubini , linuxppc-dev@lists.ozlabs.org, Alexander Stein List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , >>>>> "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 From mboxrd@z Thu Jan 1 00:00:00 1970 From: jacmet@sunsite.dk (Peter Korsgaard) Date: Sun, 17 Feb 2013 16:12:31 +0100 Subject: [PATCH] i2c: Remove unneeded xxx_set_drvdata(..., NULL) calls 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") References: <1360953682-25066-1-git-send-email-dianders@chromium.org> <1360970315-32116-1-git-send-email-dianders@chromium.org> Message-ID: <87txpboty7.fsf@dell.be.48ers.dk> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.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