From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Carpenter Subject: Re: [PATCH 01/14] parport: return value of attach and parport_register_driver Date: Wed, 8 Apr 2015 14:44:37 +0300 Message-ID: <20150408114437.GI10964@mwanda> References: <1428492040-5581-1-git-send-email-sudipm.mukherjee@gmail.com> <1428492040-5581-2-git-send-email-sudipm.mukherjee@gmail.com> <20150408113832.GH10964@mwanda> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: devel@driverdev.osuosl.org, Rodolfo Giometti , linux-scsi@vger.kernel.org, Arnd Bergmann , Wolfram Sang , Takashi Iwai , Greg Kroah-Hartman , linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, "James E.J. Bottomley" , Jaroslav Kysela , Mark Brown , linux-i2c@vger.kernel.org, Willy Tarreau , alsa-devel@alsa-project.org, netdev@vger.kernel.org, Jean Delvare To: Sudip Mukherjee Return-path: Content-Disposition: inline In-Reply-To: <20150408113832.GH10964@mwanda> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: driverdev-devel-bounces@linuxdriverproject.org Sender: "devel" List-Id: linux-spi.vger.kernel.org On Wed, Apr 08, 2015 at 02:38:32PM +0300, Dan Carpenter wrote: > 1) We can't apply this patch on its own so this way of breaking up the > patches doesn't work. > The right thing is to do add an attach_ret(). static int do_attach(drv) { if (drv->attach_ret) return drv->attach_ret(); drv->attach(); return 0; } Then we convert one driver to use the new function pointer and see if it simplifies the code. If so we can transition the others as well. If not then we give up. regards, dan carpenter