From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752156AbbDJFGE (ORCPT ); Fri, 10 Apr 2015 01:06:04 -0400 Received: from mail-pa0-f54.google.com ([209.85.220.54]:34346 "EHLO mail-pa0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750869AbbDJFF5 (ORCPT ); Fri, 10 Apr 2015 01:05:57 -0400 Date: Fri, 10 Apr 2015 10:35:43 +0530 From: Sudip Mukherjee To: Wolfram Sang Cc: Jean Delvare , Arnd Bergmann , Greg Kroah-Hartman , Rodolfo Giometti , "James E.J. Bottomley" , Mark Brown , Willy Tarreau , Jaroslav Kysela , Takashi Iwai , linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org, netdev@vger.kernel.org, linux-scsi@vger.kernel.org, linux-spi@vger.kernel.org, devel@driverdev.osuosl.org, alsa-devel@alsa-project.org Subject: Re: [PATCH 12/14] i2c-parport: return proper error values from attach Message-ID: <20150410050543.GA3561@sudip-PC> References: <1428492040-5581-1-git-send-email-sudipm.mukherjee@gmail.com> <1428492040-5581-13-git-send-email-sudipm.mukherjee@gmail.com> <20150409071307.GA1166@katana> <20150409113342.5621af83@endymion.delvare> <20150409102528.GC1166@katana> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150409102528.GC1166@katana> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 09, 2015 at 12:25:28PM +0200, Wolfram Sang wrote: > > > It doesn't really matter that the error codes are different, it matters > > that they are meaningful. As much as possible you should pass error > > codes from the lower layers. parport_claim_or_block() and > > i2c_bit_add_bus() return proper error codes so you should record and > > transmit them. > > Oh, surely yes. I assumed they don't and this series is a first step to > fix this. Should have looked myself. Thanks for jumping in here. > I planned this series to be the first step to fix the attach function which does not return it succeeded or failed. And if attach has failed then there is no reason that module_init will report success. But as Greg pointed out that the first step should be to bring the parallel port in the driver model. I am working on that now, I will post a v2 of this series once that modification is done, and that will need extensive testing. regards sudip