From: Andy Shevchenko <andy.shevchenko@gmail.com> To: Cezary Rojewski <cezary.rojewski@intel.com> Cc: "ALSA Development Mailing List" <alsa-devel@alsa-project.org>, "Mark Brown" <broonie@kernel.org>, "Takashi Iwai" <tiwai@suse.com>, "Jaroslav Kysela" <perex@perex.cz>, amadeuszx.slawinski@linux.intel.com, "Pierre-Louis Bossart" <pierre-louis.bossart@linux.intel.com>, "Hans de Goede" <hdegoede@redhat.com>, "Liam Girdwood" <lgirdwood@gmail.com>, "Kai Vehmanen" <kai.vehmanen@linux.intel.com>, "Péter Ujfalusi" <peter.ujfalusi@linux.intel.com>, "Ranjani Sridharan" <ranjani.sridharan@linux.intel.com>, "Bard Liao" <yung-chuan.liao@linux.intel.com>, "Andy Shevchenko" <andy@kernel.org>, "Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>, "Matthew Wilcox" <willy@infradead.org> Subject: Re: [PATCH v3 1/2] lib/string_helpers: Introduce tokenize_user_input() Date: Thu, 1 Sep 2022 22:34:53 +0300 [thread overview] Message-ID: <CAHp75VfO7_ASHGdpkcb1dwvhyHPT31eYuAkCm2q7B+2WmtZC4g@mail.gmail.com> (raw) In-Reply-To: <20220901175022.334824-2-cezary.rojewski@intel.com> On Thu, Sep 1, 2022 at 8:40 PM Cezary Rojewski <cezary.rojewski@intel.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@gmail.com> -- With Best Regards, Andy Shevchenko
WARNING: multiple messages have this Message-ID (diff)
From: Andy Shevchenko <andy.shevchenko@gmail.com> To: Cezary Rojewski <cezary.rojewski@intel.com> Cc: "Andy Shevchenko" <andy@kernel.org>, "ALSA Development Mailing List" <alsa-devel@alsa-project.org>, "Kai Vehmanen" <kai.vehmanen@linux.intel.com>, "Liam Girdwood" <lgirdwood@gmail.com>, "Bard Liao" <yung-chuan.liao@linux.intel.com>, "Pierre-Louis Bossart" <pierre-louis.bossart@linux.intel.com>, "Matthew Wilcox" <willy@infradead.org>, "Takashi Iwai" <tiwai@suse.com>, "Hans de Goede" <hdegoede@redhat.com>, "Mark Brown" <broonie@kernel.org>, "Ranjani Sridharan" <ranjani.sridharan@linux.intel.com>, amadeuszx.slawinski@linux.intel.com, "Péter Ujfalusi" <peter.ujfalusi@linux.intel.com>, "Linux Kernel Mailing List" <linux-kernel@vger.kernel.org> Subject: Re: [PATCH v3 1/2] lib/string_helpers: Introduce tokenize_user_input() Date: Thu, 1 Sep 2022 22:34:53 +0300 [thread overview] Message-ID: <CAHp75VfO7_ASHGdpkcb1dwvhyHPT31eYuAkCm2q7B+2WmtZC4g@mail.gmail.com> (raw) In-Reply-To: <20220901175022.334824-2-cezary.rojewski@intel.com> On Thu, Sep 1, 2022 at 8:40 PM Cezary Rojewski <cezary.rojewski@intel.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@gmail.com> -- With Best Regards, Andy Shevchenko
next prev parent reply other threads:[~2022-09-01 19:35 UTC|newest] Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-09-01 17:50 [PATCH v3 0/2] lib/string_helpers: Introduce tokenize_user_input() Cezary Rojewski 2022-09-01 17:50 ` Cezary Rojewski 2022-09-01 17:50 ` [PATCH v3 1/2] " Cezary Rojewski 2022-09-01 17:50 ` Cezary Rojewski 2022-09-01 19:34 ` Andy Shevchenko [this message] 2022-09-01 19:34 ` Andy Shevchenko 2022-09-02 7:46 ` Cezary Rojewski 2022-09-02 7:46 ` Cezary Rojewski 2022-09-02 9:04 ` Andy Shevchenko 2022-09-02 9:04 ` Andy Shevchenko 2022-09-01 17:50 ` [PATCH v3 2/2] ASoC: SOF: Remove strsplit_u32() and tokenize_input() Cezary Rojewski 2022-09-01 17:50 ` Cezary Rojewski 2022-09-01 19:38 ` Andy Shevchenko 2022-09-01 19:38 ` Andy Shevchenko 2022-09-02 11:51 ` Cezary Rojewski 2022-09-02 11:51 ` Cezary Rojewski 2022-09-02 20:28 [PATCH v3 1/2] lib/string_helpers: Introduce tokenize_user_input() kernel test robot
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=CAHp75VfO7_ASHGdpkcb1dwvhyHPT31eYuAkCm2q7B+2WmtZC4g@mail.gmail.com \ --to=andy.shevchenko@gmail.com \ --cc=alsa-devel@alsa-project.org \ --cc=amadeuszx.slawinski@linux.intel.com \ --cc=andy@kernel.org \ --cc=broonie@kernel.org \ --cc=cezary.rojewski@intel.com \ --cc=hdegoede@redhat.com \ --cc=kai.vehmanen@linux.intel.com \ --cc=lgirdwood@gmail.com \ --cc=linux-kernel@vger.kernel.org \ --cc=perex@perex.cz \ --cc=peter.ujfalusi@linux.intel.com \ --cc=pierre-louis.bossart@linux.intel.com \ --cc=ranjani.sridharan@linux.intel.com \ --cc=tiwai@suse.com \ --cc=willy@infradead.org \ --cc=yung-chuan.liao@linux.intel.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.