From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751305AbdCNPlC (ORCPT ); Tue, 14 Mar 2017 11:41:02 -0400 Received: from mail.savoirfairelinux.com ([208.88.110.44]:53182 "EHLO mail.savoirfairelinux.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750848AbdCNPkM (ORCPT ); Tue, 14 Mar 2017 11:40:12 -0400 Subject: Re: [PATCH v2 4/6] bus: add driver for the Technologic Systems NBUS To: Linus Walleij References: <20170203194729.20995-1-sebastien.bourdelin@savoirfairelinux.com> <20170203194729.20995-5-sebastien.bourdelin@savoirfairelinux.com> <82dfdbb8-58fc-45b4-685c-98be11341e45@savoirfairelinux.com> Cc: "linux-kernel@vger.kernel.org" , linux-watchdog@vger.kernel.org, "linux-arm-kernel@lists.infradead.org" , "devicetree@vger.kernel.org" , kernel , Rob Herring , Guenter Roeck , Fabio Estevam , Mark Featherston , kris@embeddedarm.com, Simon Horman , Thierry Reding , Jon Hunter , Florian Fainelli , Sascha Hauer , Shawn Guo , Russell King , Wim Van Sebroeck , Mark Rutland , damien.riegel@savoirfairelinux.com, Lucile Quirion , Olof Johansson , Arnd Bergmann , "Suzuki K. Poulose" , Will Deacon , Masahiro Yamada From: Sebastien Bourdelin Message-ID: <07e0e4b2-36a5-a37e-ea04-d05158d11fba@savoirfairelinux.com> Date: Tue, 14 Mar 2017 11:40:08 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Linus, On 03/14/2017 09:23 AM, Linus Walleij wrote: > On Wed, Feb 22, 2017 at 5:56 PM, Sebastien Bourdelin > wrote: >> On 02/04/2017 05:14 AM, Linus Walleij wrote: > >>>> + gpiod_set_array_value_cansleep(gpios->ndescs, gpios->desc, values); >>> >>> This can also fail and you should check the return code and print an error >>> message if it does. >>> >> As far as i understood, the "gpiod_set_array_value_cansleep(...)" >> function doesn't return >> anything, it will return immediately if gpios->desc is null but nothing >> else. >> Did i miss something? > > No I did, sorry about that. > > We *should* make these functions return errors but currently they do not. > Ok got it. Thanks! >>> Error codes? >>> >> Same question here, these functions only make call to >> "gpiod_set_value_cansleep(...)", >> which as far as i understood doesn't return any error code. > > Yeah, forget that. > Ok. >>>> + gpiod_set_value_cansleep(ts_nbus->csn, 1); >>> >>> Here too. >>> >> Same question, doesn't seem to have an error code. > > That too. > Ok. > Yours, > Linus Walleij > Best regards, Sebastien Bourdelin.