From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932501AbcHKSlC (ORCPT ); Thu, 11 Aug 2016 14:41:02 -0400 Received: from mail-pa0-f53.google.com ([209.85.220.53]:33534 "EHLO mail-pa0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932105AbcHKSlA (ORCPT ); Thu, 11 Aug 2016 14:41:00 -0400 Date: Thu, 11 Aug 2016 11:40:56 -0700 From: Bjorn Andersson To: Lee Jones Cc: Suman Anna , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel@stlinux.com, patrice.chotard@st.com, ohad@wizery.com, ssantosh@kernel.org, linux-remoteproc@vger.kernel.org, ludovic.barre@st.com Subject: Re: [PATCH 2/2] remoteproc: core: Rework obtaining a rproc from a DT phandle Message-ID: <20160811184056.GZ26240@tuxbot> References: <20160719154905.23344-1-lee.jones@linaro.org> <20160719154905.23344-2-lee.jones@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160719154905.23344-2-lee.jones@linaro.org> 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 19 Jul 08:49 PDT 2016, Lee Jones wrote: > diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c [..] > -struct rproc *rproc_get_by_phandle(phandle phandle) > +struct rproc *of_get_rproc_by_phandle(struct device_node *np) > { > - return NULL; > + return of_get_rproc_by_index(np, 0); I agree with Suman, that this should be moved to the static inline function in remoteproc.h Giving it some more thought, based on the naming discussion, I think this should be called "of_get_rproc()". Better keep the "default accessor" short and simple and the _by_phandle() is confusing. > } > +EXPORT_SYMBOL(of_get_rproc_by_phandle); > #endif > -EXPORT_SYMBOL(rproc_get_by_phandle); [..] > diff --git a/include/linux/remoteproc.h b/include/linux/remoteproc.h [..] > static inline > -struct rproc *rproc_get_by_phandle(phandle phandle) > +struct rproc *of_get_rproc_by_phandle(struct device_node *np) > { > return NULL; > } Regards, Bjorn