Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756626AbYLJWGv (ORCPT ); Wed, 10 Dec 2008 17:06:51 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755721AbYLJWGh (ORCPT ); Wed, 10 Dec 2008 17:06:37 -0500 Received: from smtp.movial.fi ([62.236.91.34]:42748 "EHLO smtp.movial.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755717AbYLJWGg (ORCPT ); Wed, 10 Dec 2008 17:06:36 -0500 Message-ID: <42393.88.114.236.15.1228946794.squirrel@webmail.movial.fi> In-Reply-To: <20081210212659.GA6132@zarina> References: <20081210163819.17cf4628@lxorguk.ukuu.org.uk> <45755.88.114.236.15.1228932236.squirrel@webmail.movial.fi> <20081210212659.GA6132@zarina> Date: Thu, 11 Dec 2008 00:06:34 +0200 (EET) Subject: Re: [PATCH 1/28] drivers/base/platform.c: Drop return value from platform_driver remove functions From: "Vorobiev Dmitri" To: cbouatmailru@gmail.com Cc: "Vorobiev Dmitri" , "Alan Cox" , "Julia Lawall" , gregkh@suse.de, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-scsi@vger.kernel.org User-Agent: SquirrelMail/1.4.9a MIME-Version: 1.0 Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1972 Lines: 60 > On Wed, Dec 10, 2008 at 08:03:56PM +0200, Vorobiev Dmitri wrote: >> > On Wed, 10 Dec 2008 17:26:26 +0100 (CET) >> > Julia Lawall wrote: >> > >> >> From: Julia Lawall >> >> >> >> The return value of the remove function of a driver structure, and >> thus >> >> of >> >> a platform_driver structure, is ultimately ignored >> > >> > Currently >> >> Are there really any plans about actually using the return value? > > It's often used by the drivers, but currently not handled by > the subsystem. For example, _remove() callback might return -EBUSY > or -EAGAIN, which means that whoever called the _remove() should > try later. Sure, it's easy to find drivers, which that return a non-dummy value from the remove() callback thinking that someone up there will take care of the error. The point is, however, that 1) the SGI Indy SCSI controller driver doesn't compile cleanly [2], and SCSI maintainers do not apply the patch because, in principle, the (*remove)() callback should not return int since the return value is discarded [1]; 2) the changes in the platform driver framework are, as it seems, not acceptable because the non-dummy return values can, in principle, be used for error checking. All that I actually care about is to get rid of this: <<< CC [M] drivers/scsi/sgiwd93.o drivers/scsi/sgiwd93.c:314: warning: initialization from incompatible pointer type <<< I don't care whether the compilation warning is gone because [2] is applied, or the entire platform driver framework is combed though to change int to void. Thanks, Dmitri [1] http://kerneltrap.org/mailarchive/linux-scsi/2008/12/3/4300474 [2] http://kerneltrap.org/mailarchive/linux-scsi/2008/11/20/4169644 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/