From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758376AbcFANLx (ORCPT ); Wed, 1 Jun 2016 09:11:53 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44892 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758357AbcFANLu (ORCPT ); Wed, 1 Jun 2016 09:11:50 -0400 Date: Wed, 1 Jun 2016 09:11:43 -0400 From: Neil Horman To: David Kershner Cc: corbet@lwn.net, tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, gregkh@linuxfoundation.org, erik.arfvidson@unisys.com, timothy.sell@unisys.com, hofrat@osadl.org, dzickus@redhat.com, jes.sorensen@redhat.com, alexander.curtin@unisys.com, janani.rvchndrn@gmail.com, sudipm.mukherjee@gmail.com, prarit@redhat.com, david.binder@unisys.com, dan.j.williams@intel.com, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, driverdev-devel@linuxdriverproject.org, sparmaintainer@unisys.com Subject: Re: [PATCH v2 02/27] staging: unisys: visorchipset change -1 return value Message-ID: <20160601131143.GA4578@hmsreliant.think-freely.org> References: <1464748013-31309-1-git-send-email-david.kershner@unisys.com> <1464748013-31309-3-git-send-email-david.kershner@unisys.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1464748013-31309-3-git-send-email-david.kershner@unisys.com> User-Agent: Mutt/1.6.1 (2016-04-27) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Wed, 01 Jun 2016 13:11:49 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 31, 2016 at 10:26:28PM -0400, David Kershner wrote: > From: Erik Arfvidson > > This patch changes the vague -1 return value to -EINVAL > > Signed-off-by: Erik Arfvidson > Signed-off-by: David Kershner > Reviewed-by: Tim Sell > --- > drivers/staging/unisys/visorbus/visorchipset.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/unisys/visorbus/visorchipset.c b/drivers/staging/unisys/visorbus/visorchipset.c > index 5ba5936..d248c94 100644 > --- a/drivers/staging/unisys/visorbus/visorchipset.c > +++ b/drivers/staging/unisys/visorbus/visorchipset.c > @@ -1613,7 +1613,7 @@ parahotplug_request_complete(int id, u16 active) > } > > spin_unlock(¶hotplug_request_list_lock); > - return -1; > + return -EINVAL; > } > > /* > -- > 1.9.1 > Why return anything here, every caller of this function ignores the return code entirely. Alternatively, passing the EINVAL back from the caller seems reasonable. Neil