From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: Suman Anna <s-anna@ti.com>
Cc: Lee Jones <lee.jones@linaro.org>,
Tony Lindgren <tony@atomide.com>,
"ohad@wizery.com" <ohad@wizery.com>,
"kernel@stlinux.com" <kernel@stlinux.com>,
"linux-remoteproc@vger.kernel.org"
<linux-remoteproc@vger.kernel.org>,
"patrice.chotard@st.com" <patrice.chotard@st.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"ludovic.barre@st.com" <ludovic.barre@st.com>,
"ssantosh@kernel.org" <ssantosh@kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
Dave Gerlach <d-gerlach@ti.com>
Subject: Re: [PATCH 1/2] remoteproc: core: Add rproc OF look-up functions
Date: Fri, 12 Aug 2016 11:07:51 -0700 [thread overview]
Message-ID: <20160812180751.GH26240@tuxbot> (raw)
In-Reply-To: <06f795ef-e71c-2cda-5306-5b75e0f15125@ti.com>
On Fri 12 Aug 09:37 PDT 2016, Suman Anna wrote:
> Hi Bjorn,
>
> >> On 08/11/2016 02:31 AM, Lee Jones wrote:
> >>> On Wed, 10 Aug 2016, Suman Anna wrote:
> >>>
> >>>> On 08/10/2016 04:19 PM, Bjorn Andersson wrote:
> >>>>> On Wed 10 Aug 14:04 PDT 2016, Suman Anna wrote:
> >>>>>
> >>>>>> On 08/10/2016 03:40 PM, Bjorn Andersson wrote:
> >>>>>>> On Wed 10 Aug 12:37 PDT 2016, Suman Anna wrote:
> >>>>>>>
> >>>>>>>> Hi Lee, Bjorn,
> >>>>>>>>
> >>>>>>>> On 08/10/2016 12:40 PM, Bjorn Andersson wrote:
> >>>>>>>>> On Tue 19 Jul 08:49 PDT 2016, Lee Jones wrote:
> >>>>>>>>>
> >>>>>>>>>> - of_rproc_by_index(): look-up and obtain a reference to a rproc
> >>>>>>>>>> using the DT phandle "rprocs" and a index.
> >>>>>>>>>>
> >>>>>>>>>> - of_rproc_by_name(): lookup and obtain a reference to a rproc
> >>>>>>>>>> using the DT phandle "rprocs" and "rproc-names".
> >>>>>>>>>>
> >>>>>>>>>> Signed-off-by: Ludovic Barre <ludovic.barre@st.com>
> >>>>>>>>>> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> >>>>>>>>>> ---
> >>>>>>>>>
> >>>>>>>>> I'm happy with this, so I whipped up a binding document describing our
> >>>>>>>>> two new properties. Waiting for an opinion on that before I merge this.
>
> One last comment on this is the return code convention change on these
> rproc_get APIs. I am fine in general with returning ERR_PTRs, but most
> of the remoteproc code is using NULL checking for rproc. If you remember
> the discussion back during the hwspinlock DT conversion [1], Ohad
> preferred to return NULL, and that's why even the rproc_get_by_phandle
> was returning NULL. We ought to make this consistent across the board if
> we want to make this switch.
>
I think it makes sense to return the actual error from these functions,
if nothing else to keep it consistent with other frameworks.
The other case I see returning NULL is rproc_alloc(), which is think is
analog to kmalloc(), so I think that's fine to keep.
Luckily wkup_m3 is the only consumer of this API in the kernel today, so
we shouldn't have any issues wrt changing the return value here.
> regards
> Suman
>
> [1] http://marc.info/?t=138965891200008
Regards,
Bjorn
next prev parent reply other threads:[~2016-08-12 18:07 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-19 15:49 [PATCH 1/2] remoteproc: core: Add rproc OF look-up functions Lee Jones
2016-07-19 15:49 ` [PATCH 2/2] remoteproc: core: Rework obtaining a rproc from a DT phandle Lee Jones
2016-08-10 17:15 ` Bjorn Andersson
2016-08-10 18:27 ` Santosh Shilimkar
2016-08-10 20:31 ` Bjorn Andersson
2016-08-11 18:40 ` Bjorn Andersson
2016-08-10 17:40 ` [PATCH 1/2] remoteproc: core: Add rproc OF look-up functions Bjorn Andersson
2016-08-10 19:37 ` Suman Anna
2016-08-10 20:40 ` Bjorn Andersson
2016-08-10 21:04 ` Suman Anna
2016-08-10 21:19 ` Bjorn Andersson
2016-08-10 22:44 ` Suman Anna
2016-08-11 7:31 ` Lee Jones
2016-08-11 16:04 ` Suman Anna
2016-08-11 16:23 ` Suman Anna
2016-08-12 16:37 ` Suman Anna
2016-08-12 18:07 ` Bjorn Andersson [this message]
2016-08-12 18:45 ` Suman Anna
2016-08-15 13:55 ` Lee Jones
2016-08-11 18:23 ` Bjorn Andersson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160812180751.GH26240@tuxbot \
--to=bjorn.andersson@linaro.org \
--cc=d-gerlach@ti.com \
--cc=kernel@stlinux.com \
--cc=lee.jones@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-remoteproc@vger.kernel.org \
--cc=ludovic.barre@st.com \
--cc=ohad@wizery.com \
--cc=patrice.chotard@st.com \
--cc=s-anna@ti.com \
--cc=ssantosh@kernel.org \
--cc=tony@atomide.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).