lkml.org 
[lkml]   [2018]   [Mar]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4 1/2] drivers: qcom: add command DB driver
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

\
 
 \ /
  Last update: 2018-03-06 17:57    [W:0.045 / U:0.756 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site