Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756204AbaFQPqf (ORCPT ); Tue, 17 Jun 2014 11:46:35 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:53405 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756098AbaFQPqd (ORCPT ); Tue, 17 Jun 2014 11:46:33 -0400 Date: Tue, 17 Jun 2014 08:50:30 -0700 From: Greg KH To: Jeff Liu Cc: James Bottomley , Christoph Lameter , Andrew Morton , Pekka Enberg , Matt Mackall , benh@kernel.crashing.org, paulus@samba.org, schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com, herbert@gondor.apana.org.au, davem@davemloft.net, stefanr@s5r6.in-berlin.de, joro@8bytes.org, jejb@parisc-linux.org, deller@gmx.de, bhelgaas@google.com, clm@fb.com, Josef Bacik , swhiteho@redhat.com, bharrosh@panasas.com, bhalevy@primarydata.com, ccaulfie@redhat.com, teigland@redhat.com, "Theodore Ts'o" , adilger.kernel@dilger.ca, jaegeuk@kernel.org, cm224.lee@samsung.com, Mark Fasheh , Joel Becker , casey@schaufler-ca.com, LKML Subject: Re: [PATCH 01/24] kobject: return actual error on kset_create_and_add Message-ID: <20140617155030.GA14259@kroah.com> References: <53A04FF7.5050900@oracle.com> <1403016160.27991.1.camel@dabdike.int.hansenpartnership.com> <53A05704.4070203@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <53A05704.4070203@oracle.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 17, 2014 at 10:56:04PM +0800, Jeff Liu wrote: > > On 06/17/2014 22:42 PM, James Bottomley wrote: > > On Tue, 2014-06-17 at 22:25 +0800, Jeff Liu wrote: > >> From: Jie Liu > >> > >> It's better to return the actual error rather than NULL because > >> kset_register() can failed due to other reasons. > >> > >> Cc: Christoph Lameter > >> Cc: Greg Kroah-Hartman > >> Cc: Andrew Morton > >> Cc: Pekka Enberg > >> Cc: Matt Mackall > >> Cc: Benjamin Herrenschmidt > >> Cc: Paul Mackerras > >> Cc: Martin Schwidefsky > >> Cc: Heiko Carstens > >> Cc: Herbert Xu > >> Cc: David S. Miller > >> Cc: Stefan Richter > >> Cc: Joerg Roedel > >> Cc: James E.J. Bottomley > >> Cc: Helge Deller > >> Cc: Bjorn Helgaas > >> Cc: Chris Mason > >> Cc: Josef Bacik > >> Cc: Steven Whitehouse > >> Cc: Boaz Harrosh > >> Cc: Benny Halevy > >> Cc: Christine Caulfield > >> Cc: David Teigland > >> Cc: Theodore Ts'o > >> Cc: Andreas Dilger > >> Cc: Jaegeuk Kim > >> Cc: Changman Lee > >> Cc: Mark Fasheh > >> Cc: Joel Becker > >> Cc: Casey Schaufler > >> Signed-off-by: Jie Liu > >> --- > >> lib/kobject.c | 4 ++-- > >> 1 file changed, 2 insertions(+), 2 deletions(-) > >> > >> diff --git a/lib/kobject.c b/lib/kobject.c > >> index 58751bb..538c617 100644 > >> --- a/lib/kobject.c > >> +++ b/lib/kobject.c > >> @@ -919,11 +919,11 @@ struct kset *kset_create_and_add(const char *name, > >> > >> kset = kset_create(name, uevent_ops, parent_kobj); > >> if (!kset) > >> - return NULL; > >> + return ERR_PTR(-ENOMEM); > >> error = kset_register(kset); > >> if (error) { > >> kfree(kset); > >> - return NULL; > >> + return ERR_PTR(error); > >> } > >> return kset; > >> } > > > > This patch series isn't bisectable. When changing an error signal from > > NULL to non-NULL, you have to do it as one patch, otherwise if a > > bisection lands in here we'll get error returns from all our kobject > > kset code and the kernel won't boot. > > Thanks for pointing this out. > > > It's fine if you're sending it out as 24 patches for review, but it has > > to be applied as a single one. > > Ok, I'll post the v2 patch as a single one once this series has been reviewed. Also, now that you sent a bunch of different patches out, some maintainers will not realize that this first one has to be applied (i.e. you gave them no sense that there was a dependancy.) You will have to watch very carefully to ensure that those patches do not now get accepted, as they will break the existing code. Not good. greg k-h -- 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/