lkml.org 
[lkml]   [2022]   [Sep]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v5 2/2] ASoC: SOF: Remove strsplit_u32() and tokenize_input()
From
On 2022-09-02 4:25 PM, Andy Shevchenko wrote:
> On Fri, Sep 02, 2022 at 03:32:56PM +0200, Cezary Rojewski wrote:
>> Make use of global integer-array parsing helper instead of the internal
>> one as both serve same purpose. With that, both strsplit_u32() and
>> tokenize_input() become unused so remove them.
>
> More minor comments...
...

>> + ret = parse_int_array_user(from, count, (int **)&array);
>> if (ret < 0)
>> return ret;
>
>> + num_elems = *array;
>> + bytes = sizeof(*array) * num_elems;
>> + if (!num_elems || (bytes % sizeof(*desc))) {
>
> !num_elems is a dup since previous already does this check.


>> + ret = parse_int_array_user(from, count, (int **)&array);
>> if (ret < 0)
>> return ret;
>> +
>> + num_elems = *array;
>
>> + if (!num_elems) {
>> ret = -EINVAL;
>> goto exit;
>> }
>
> Ditto.

Ack for both.

\
 
 \ /
  Last update: 2022-09-04 12:09    [W:0.054 / U:1.196 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site