[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d4f46814-41b3-b3a2-2e8f-d9f3cb7638a0@linaro.org>
Date: Tue, 2 May 2017 11:52:44 +0300
From: Stanimir Varbanov <stanimir.varbanov@...aro.org>
To: Sakari Ailus <sakari.ailus@....fi>,
Stanimir Varbanov <stanimir.varbanov@...aro.org>
Cc: Mauro Carvalho Chehab <mchehab@...nel.org>,
Hans Verkuil <hverkuil@...all.nl>,
Andy Gross <andy.gross@...aro.org>,
Bjorn Andersson <bjorn.andersson@...aro.org>,
Stephen Boyd <sboyd@...eaurora.org>,
Srinivas Kandagatla <srinivas.kandagatla@...aro.org>,
linux-media@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arm-msm@...r.kernel.org
Subject: Re: [PATCH v8 05/10] media: venus: adding core part and helper
functions
Hei Sakari,
On 04/30/2017 01:21 AM, Sakari Ailus wrote:
> Hi, Stan!!
>
> On Fri, Apr 28, 2017 at 12:13:52PM +0300, Stanimir Varbanov wrote:
> ...
>> +int helper_get_bufreq(struct venus_inst *inst, u32 type,
>> + struct hfi_buffer_requirements *req)
>> +{
>> + u32 ptype = HFI_PROPERTY_CONFIG_BUFFER_REQUIREMENTS;
>> + union hfi_get_property hprop;
>> + int ret, i;
>
> unsigned int i ? It's an array index...
Thanks for pointing that out, I have to revisit all similar places as
well ...
>
>> +
>> + if (req)
>> + memset(req, 0, sizeof(*req));
>> +
>> + ret = hfi_session_get_property(inst, ptype, &hprop);
>> + if (ret)
>> + return ret;
>> +
>> + ret = -EINVAL;
>> +
>> + for (i = 0; i < HFI_BUFFER_TYPE_MAX; i++) {
>> + if (hprop.bufreq[i].type != type)
>> + continue;
>> +
>> + if (req)
>> + memcpy(req, &hprop.bufreq[i], sizeof(*req));
>> + ret = 0;
>> + break;
>> + }
>> +
>> + return ret;
>> +}
>> +EXPORT_SYMBOL_GPL(helper_get_bufreq);
>
> As these are global symbols but still specific to a single driver, it'd be
> good to have them prefixed with a common prefix. How about "venus"? You
> actually already have that in a macro in the header. :-)
You are damned right, will rework that in next version.
<snip>
--
regards,
Stan
Powered by blists - more mailing lists