From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752066AbdLJPCi (ORCPT ); Sun, 10 Dec 2017 10:02:38 -0500 Received: from mail.kernel.org ([198.145.29.99]:46316 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751726AbdLJPCg (ORCPT ); Sun, 10 Dec 2017 10:02:36 -0500 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 285E120C01 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=jic23@kernel.org Date: Sun, 10 Dec 2017 15:02:33 +0000 From: Jonathan Cameron To: Bartosz Golaszewski Cc: Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] iio: dummy_evgen: modify the return value check for irq_sim_init() Message-ID: <20171210150233.258d329e@archlinux> In-Reply-To: References: <20171127105449.27535-1-brgl@bgdev.pl> <20171202114338.58c077dc@archlinux> X-Mailer: Claws Mail 3.15.1-dirty (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 2 Dec 2017 16:33:59 +0100 Bartosz Golaszewski wrote: > 2017-12-02 12:43 GMT+01:00 Jonathan Cameron : > > On Mon, 27 Nov 2017 11:54:49 +0100 > > Bartosz Golaszewski wrote: > > > >> As discussed with Marc Zyngier: irq_sim_init() and its devres variant > >> should return the base of the allocated interrupt range on success > >> rather than 0. This will be modified later - first, change the way > >> users handle the return value of these routines. > >> > >> Signed-off-by: Bartosz Golaszewski > > I'm happy to take this but if it goes via my tree whilst the > > other changes take a different path you are going to slow things > > down considerably (a kernel cycle for this change to be in the > > upstream of where the fix gets applied). So I would bundle > > it up in a single patch set with the more major changes. > > > > If you still want me to take it let me know, but if it > > might go via another route then > > > > Acked-by: Jonathan Cameron > > > > Thanks, > > > > Jonathan > >> --- > >> drivers/iio/dummy/iio_dummy_evgen.c | 2 +- > >> 1 file changed, 1 insertion(+), 1 deletion(-) > >> > >> diff --git a/drivers/iio/dummy/iio_dummy_evgen.c b/drivers/iio/dummy/iio_dummy_evgen.c > >> index fe8884543da0..efd0005f59b4 100644 > >> --- a/drivers/iio/dummy/iio_dummy_evgen.c > >> +++ b/drivers/iio/dummy/iio_dummy_evgen.c > >> @@ -56,7 +56,7 @@ static int iio_dummy_evgen_create(void) > >> return -ENOMEM; > >> > >> ret = irq_sim_init(&iio_evgen->irq_sim, IIO_EVENTGEN_NO); > >> - if (ret) { > >> + if (ret < 0) { > >> kfree(iio_evgen); > >> return ret; > >> } > > > > There's no hurry with that, it doesn't cause any problems really and > the same change must be applied to gpio-mockup. I planned to actually > change the return value for 4.17 after all users are modified for > 4.16. > > How does it sound? It's fine if slow. Up to you though. Anyhow, I've applied this to the togreg branch of iio.git and pushed out as testing for the autobuilders to play with it. Thanks, Jonathan > > Thanks, > Bartosz