[PATCH v4 1/2] lib/string_helpers: Introduce parse_int_array_user()

Cezary Rojewski cezary.rojewski at intel.com
Fri Sep 2 14:47:47 CEST 2022


On 2022-09-02 2:23 PM, Amadeusz Sławiński wrote:
> On 9/2/2022 2:29 PM, Cezary Rojewski wrote:

...

>> +/**
>> + * parse_int_array_user - Split string into a sequence of integers
>> + * @from:    The user space buffer to read from
>> + * @ppos:    The current position in the buffer
> 
> There is no such parameter?
> 
>> + * @count:    The maximum number of bytes to read
>> + * @tkns:    Returned pointer to sequence of integers
> 
> s/tkns/array/ ?
> 
>> + *
>> + * On success @tkns is allocated and initialized with a sequence of
> 
> ditto
> 
>> + * integers extracted from the @from plus an additional element that
>> + * begins the sequence and specifies the integers count.
>> + *
>> + * Caller takes responsibility for freeing @tkns when it is no longer
> 
> ditto
> 
>> + * needed.
>> + */
>> +int parse_int_array_user(const char __user *from, size_t count, int 
>> **array)

Ack. Will send an update shortly.


Regards,
Czarek


More information about the Alsa-devel mailing list