From mboxrd@z Thu Jan 1 00:00:00 1970 From: Roger Quadros Subject: Re: [PATCH 11/17] soc: ti: pruss: add pruss_get()/put() API Date: Fri, 23 Nov 2018 11:40:48 +0200 Message-ID: <5BF7CB20.7060502@ti.com> References: <1542886753-17625-1-git-send-email-rogerq@ti.com> <1542886753-17625-12-git-send-email-rogerq@ti.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: Arnd Bergmann Cc: Tony Lindgren , Rob Herring , Beno??t Cousson , Santosh Shilimkar , Ohad Ben-Cohen , Bjorn Andersson , Suman Anna , Sekhar Nori , Tero Kristo , nsaulnier@ti.com, jreeder@ti.com, Murali Karicheri , woods.technical@gmail.com, linux-omap , linux-remoteproc@vger.kernel.org, Linux Kernel Mailing List , DTML List-Id: linux-omap@vger.kernel.org On 23/11/18 10:20, Arnd Bergmann wrote: > On Thu, Nov 22, 2018 at 12:41 PM Roger Quadros wrote: > >> + >> + if (IS_ERR_OR_NULL(rproc)) >> + return ERR_PTR(-EINVAL); > > > Any usage of IS_ERR_OR_NULL() tends to be an indication of a badly > designed API. Please change this to allow only one of the two to be passed > around. The user of this API has to call pru_rproc_get() which never returns NULL. So IS_ERR() should suffice here. > > Arnd > cheers, -roger -- Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki