From: Lina Iyer <ilina@codeaurora.org>
To: Stephen Boyd <sboyd@kernel.org>
Cc: andy.gross@linaro.org, david.brown@linaro.org,
linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org,
rnayak@codeaurora.org, bjorn.andersson@linaro.org,
linux-kernel@vger.kernel.org,
Mahesh Sivasubramanian <msivasub@codeaurora.org>
Subject: Re: [PATCH v4 1/2] drivers: qcom: add command DB driver
Date: Tue, 6 Mar 2018 09:56:19 -0700 [thread overview]
Message-ID: <20180306165619.GD4930@codeaurora.org> (raw)
In-Reply-To: <20180306162140.GC4930@codeaurora.org>
On Tue, Mar 06 2018 at 09:21 -0700, Lina Iyer wrote:
>On Mon, Mar 05 2018 at 11:42 -0700, Stephen Boyd wrote:
>>Quoting Lina Iyer (2018-02-26 09:58:01)
>>>+size_t cmd_db_read_aux_data_len(const char *id)
>>>+{
>>>+ int ret;
>>>+ struct entry_header ent;
>>>+ struct rsc_hdr rsc_hdr;
>>>+
>>>+ ret = cmd_db_get_header_by_rsc_id(id, &ent, &rsc_hdr);
>>
>>A bunch of code is calling this function. Why not change the user
>>interface to use an opaque 'resource' cookie that we can 'get' or 'find'
>>and then use that cookie in the rest of the API to pull out the data
>>that's desired?
>>
>Fair point. Let me find out. I suspect this was done to keep the API
>similar to other non-Linux interfaces. I am not sure why they all didn't
>use a handle instead of char *.
>
I was reminded that the APIs are generally used once for each resource
and are used for multiple resources and usually only at init. The handle
method doesn't buy much in benefits.
-- Lina
next prev parent reply other threads:[~2018-03-06 16:56 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-26 17:58 [PATCH v4 0/2] drivers/qcom: add Command DB support Lina Iyer
2018-02-26 17:58 ` [PATCH v4 1/2] drivers: qcom: add command DB driver Lina Iyer
2018-03-05 18:42 ` Stephen Boyd
2018-03-06 16:21 ` Lina Iyer
2018-03-06 16:56 ` Lina Iyer [this message]
2018-03-06 22:08 ` Stephen Boyd
2018-03-06 22:08 ` Stephen Boyd
2018-02-26 17:58 ` [PATCH v4 2/2] dt-bindings: introduce Command DB for QCOM SoCs Lina Iyer
2018-03-05 21:10 ` Rob Herring
2018-03-05 23:14 ` Bjorn Andersson
2018-03-06 15:57 ` Lina Iyer
2018-03-07 19:02 ` Bjorn Andersson
2018-03-16 18:26 ` Stephen Boyd
2018-03-16 19:55 ` Bjorn Andersson
2018-03-06 0:21 ` Stephen Boyd
2018-03-06 15:57 ` Lina Iyer
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=20180306165619.GD4930@codeaurora.org \
--to=ilina@codeaurora.org \
--cc=andy.gross@linaro.org \
--cc=bjorn.andersson@linaro.org \
--cc=david.brown@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-soc@vger.kernel.org \
--cc=msivasub@codeaurora.org \
--cc=rnayak@codeaurora.org \
--cc=sboyd@kernel.org \
/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