From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hannes Reinecke Subject: Re: [PATCH] scsi_dh: Fix return value of scsi_dh_attach() Date: Mon, 19 Dec 2011 12:59:16 +0100 Message-ID: <4EEF2714.1080402@suse.de> References: <1321572864-23628-1-git-send-email-richard@nod.at> <4EEDFC16.90303@nod.at> <1324219540.3091.28.camel@dabdike.int.hansenpartnership.com> <4EEDFE4E.6090104@nod.at> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Received: from cantor2.suse.de ([195.135.220.15]:39640 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752580Ab1LSL7S (ORCPT ); Mon, 19 Dec 2011 06:59:18 -0500 In-Reply-To: <4EEDFE4E.6090104@nod.at> Sender: linux-scsi-owner@vger.kernel.org List-Id: linux-scsi@vger.kernel.org To: Richard Weinberger Cc: James Bottomley , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org On 12/18/2011 03:53 PM, Richard Weinberger wrote: > Am 18.12.2011 15:45, schrieb James Bottomley: >> On Sun, 2011-12-18 at 15:43 +0100, Richard Weinberger wrote: >>> Am 18.11.2011 00:34, schrieb Richard Weinberger: >>>> scsi_dh_attach() should return a negative value on error. >>>> >>>> Signed-off-by: Richard Weinberger >>>> --- >>>> include/scsi/scsi_dh.h | 2 +- >>>> 1 files changed, 1 insertions(+), 1 deletions(-) >>>> >>>> diff --git a/include/scsi/scsi_dh.h b/include/scsi/scsi_dh.h >>>> index e3f2db2..e07ab10 100644 >>>> --- a/include/scsi/scsi_dh.h >>>> +++ b/include/scsi/scsi_dh.h >>>> @@ -74,7 +74,7 @@ static inline int scsi_dh_handler_exist(const ch= ar *name) >>>> } >>>> static inline int scsi_dh_attach(struct request_queue *req, const= char *name) >>>> { >>>> - return SCSI_DH_NOSYS; >>>> + return -SCSI_DH_NOSYS; >>>> } >>>> static inline void scsi_dh_detach(struct request_queue *q) >>>> { >>> >>> James, >>> >>> can you please pickup this patch? >> >> It still needs an ack from rdac people (other one just got overlooke= d). >> >=20 > Who are the rdac people? > I sent the patch to all addresses reported by get_maintainers.pl. >=20 Nack. This patch is wrong. scsi_dh_attach() (and, incidentally, scsi_dh_set_params()) should return a standard error value. SCSI_DH_XXX are internal to device_handler and should never see the light of day. Cheers, Hannes --=20 Dr. Hannes Reinecke zSeries & Storage hare@suse.de +49 911 74053 688 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=C3=BCrnberg GF: J. Hawn, J. Guild, F. Imend=C3=B6rffer, HRB 16746 (AG N=C3=BCrnberg= ) -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" i= n the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752855Ab1LSL7V (ORCPT ); Mon, 19 Dec 2011 06:59:21 -0500 Received: from cantor2.suse.de ([195.135.220.15]:39640 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752580Ab1LSL7S (ORCPT ); Mon, 19 Dec 2011 06:59:18 -0500 Message-ID: <4EEF2714.1080402@suse.de> Date: Mon, 19 Dec 2011 12:59:16 +0100 From: Hannes Reinecke User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.14) Gecko/20110221 SUSE/3.1.8 Thunderbird/3.1.8 MIME-Version: 1.0 To: Richard Weinberger Cc: James Bottomley , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] scsi_dh: Fix return value of scsi_dh_attach() References: <1321572864-23628-1-git-send-email-richard@nod.at> <4EEDFC16.90303@nod.at> <1324219540.3091.28.camel@dabdike.int.hansenpartnership.com> <4EEDFE4E.6090104@nod.at> In-Reply-To: <4EEDFE4E.6090104@nod.at> X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/18/2011 03:53 PM, Richard Weinberger wrote: > Am 18.12.2011 15:45, schrieb James Bottomley: >> On Sun, 2011-12-18 at 15:43 +0100, Richard Weinberger wrote: >>> Am 18.11.2011 00:34, schrieb Richard Weinberger: >>>> scsi_dh_attach() should return a negative value on error. >>>> >>>> Signed-off-by: Richard Weinberger >>>> --- >>>> include/scsi/scsi_dh.h | 2 +- >>>> 1 files changed, 1 insertions(+), 1 deletions(-) >>>> >>>> diff --git a/include/scsi/scsi_dh.h b/include/scsi/scsi_dh.h >>>> index e3f2db2..e07ab10 100644 >>>> --- a/include/scsi/scsi_dh.h >>>> +++ b/include/scsi/scsi_dh.h >>>> @@ -74,7 +74,7 @@ static inline int scsi_dh_handler_exist(const char *name) >>>> } >>>> static inline int scsi_dh_attach(struct request_queue *req, const char *name) >>>> { >>>> - return SCSI_DH_NOSYS; >>>> + return -SCSI_DH_NOSYS; >>>> } >>>> static inline void scsi_dh_detach(struct request_queue *q) >>>> { >>> >>> James, >>> >>> can you please pickup this patch? >> >> It still needs an ack from rdac people (other one just got overlooked). >> > > Who are the rdac people? > I sent the patch to all addresses reported by get_maintainers.pl. > Nack. This patch is wrong. scsi_dh_attach() (and, incidentally, scsi_dh_set_params()) should return a standard error value. SCSI_DH_XXX are internal to device_handler and should never see the light of day. Cheers, Hannes -- Dr. Hannes Reinecke zSeries & Storage hare@suse.de +49 911 74053 688 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg)