[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75VfO7_ASHGdpkcb1dwvhyHPT31eYuAkCm2q7B+2WmtZC4g@mail.gmail.com>
Date: Thu, 1 Sep 2022 22:34:53 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Cezary Rojewski <cezary.rojewski@...el.com>
Cc: ALSA Development Mailing List <alsa-devel@...a-project.org>,
Mark Brown <broonie@...nel.org>, Takashi Iwai <tiwai@...e.com>,
Jaroslav Kysela <perex@...ex.cz>,
amadeuszx.slawinski@...ux.intel.com,
Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>,
Hans de Goede <hdegoede@...hat.com>,
Liam Girdwood <lgirdwood@...il.com>,
Kai Vehmanen <kai.vehmanen@...ux.intel.com>,
Péter Ujfalusi <peter.ujfalusi@...ux.intel.com>,
Ranjani Sridharan <ranjani.sridharan@...ux.intel.com>,
Bard Liao <yung-chuan.liao@...ux.intel.com>,
Andy Shevchenko <andy@...nel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Matthew Wilcox <willy@...radead.org>
Subject: Re: [PATCH v3 1/2] lib/string_helpers: Introduce tokenize_user_input()
On Thu, Sep 1, 2022 at 8:40 PM Cezary Rojewski
<cezary.rojewski@...el.com> wrote:
>
> Add new helper function to allow for splitting specified user string
> into a sequence of integers. Internally it makes use of get_options() so
> the returned sequence contains the integers extracted plus an additional
> element that begins the sequence and specifies the integers count.
Thanks! In general it looks good to me, but a few minor comments below.
...
> +int tokenize_user_input(const char __user *from, size_t count, int **tkns);
Not sure how I can deduct from the name what function is actually
doing. Suggested new name: int_array_parse_user().
int int_array_parse_user(const char __user *from, size_t count, int **array);
(Note that we have _user suffix for many APIs in the kernel that does
interact with user space memory)
...
> + * @tkns: Returned pointer to sequence of integers
array
...
If you are okay with this, you may add my
Reviewed-by: Andy Shevchenko <andy.shevchenko@...il.com>
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists