From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753089AbbDHLp3 (ORCPT ); Wed, 8 Apr 2015 07:45:29 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:45045 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751176AbbDHLpY (ORCPT ); Wed, 8 Apr 2015 07:45:24 -0400 Date: Wed, 8 Apr 2015 14:44:37 +0300 From: Dan Carpenter To: Sudip Mukherjee Cc: devel@driverdev.osuosl.org, Rodolfo Giometti , linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org, Arnd Bergmann , Wolfram Sang , Takashi Iwai , Greg Kroah-Hartman , alsa-devel@alsa-project.org, "James E.J. Bottomley" , Jaroslav Kysela , Mark Brown , linux-i2c@vger.kernel.org, Willy Tarreau , linux-spi@vger.kernel.org, netdev@vger.kernel.org, Jean Delvare Subject: Re: [PATCH 01/14] parport: return value of attach and parport_register_driver 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-Disposition: inline In-Reply-To: <20150408113832.GH10964@mwanda> User-Agent: Mutt/1.5.21 (2010-09-15) X-Source-IP: userv0022.oracle.com [156.151.31.74] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@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