Re: [PATCH v4 1/2] drivers: qcom: add command DB driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
To unsubscribe from this list: send the line "unsubscribe linux-soc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux