lkml.org 
[lkml]   [2018]   [Jul]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2 12/29] venus: add common capability parser
From
Date
Hi Tomasz,

On 07/02/2018 12:23 PM, Tomasz Figa wrote:
> On Thu, May 31, 2018 at 4:06 PM Tomasz Figa <tfiga@chromium.org> wrote:
>>
>> On Thu, May 31, 2018 at 1:21 AM Stanimir Varbanov
>> <stanimir.varbanov@linaro.org> wrote:
>>>
>>> Hi Tomasz,
>>>
>>> On 05/24/2018 05:16 PM, Tomasz Figa wrote:
>>>> Hi Stanimir,
>>>>
>>>> On Tue, May 15, 2018 at 5:08 PM Stanimir Varbanov <
> [snip]
>>>>
>>>>> + break;
>>>>> + }
>>>>> +
>>>>> + word++;
>>>>> + words_count--;
>>>>
>>>> If data is at |word + 1|, shouldn’t we increment |word| by |1 + |data
>>>> size||?
>>>
>>> yes, that could be possible but the firmware packets are with variable
>>> data length and don't want to make the code so complex.
>>>
>>> The idea is to search for HFI_PROPERTY_PARAM* key numbers. Yes it is not
>>> optimal but this enumeration is happen only once during driver probe.
>>>
>>
>> Hmm, do we have a guarantee that we will never find a value that
>> matches HFI_PROPERTY_PARAM*, but would be actually just some data
>> inside the payload?
>
> Ping?

OK, you are right there is guarantee that we not mixing keywords and
data. I can make parse_* functions to return how words they consumed and
increment 'word' pointer with consumed words.

--
regards,
Stan

\
 
 \ /
  Last update: 2018-07-02 11:59    [W:0.110 / U:9.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site