public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Cezary Rojewski <cezary.rojewski@intel.com>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: <alsa-devel@alsa-project.org>, <broonie@kernel.org>,
	<tiwai@suse.com>, <perex@perex.cz>,
	<amadeuszx.slawinski@linux.intel.com>,
	<pierre-louis.bossart@linux.intel.com>, <hdegoede@redhat.com>,
	<lgirdwood@gmail.com>, <kai.vehmanen@linux.intel.com>,
	<peter.ujfalusi@linux.intel.com>,
	<ranjani.sridharan@linux.intel.com>,
	<yung-chuan.liao@linux.intel.com>, <willy@infradead.org>,
	<linux-kernel@vger.kernel.org>, <andy@kernel.org>,
	<intel-poland@eclists.intel.com>
Subject: Re: [PATCH v5 2/2] ASoC: SOF: Remove strsplit_u32() and tokenize_input()
Date: Sun, 4 Sep 2022 12:09:05 +0200	[thread overview]
Message-ID: <83184fe9-d2a1-8488-65fa-3735b3359bca@intel.com> (raw)
In-Reply-To: <YxISRG13SGScC5Fn@smile.fi.intel.com>

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.

  reply	other threads:[~2022-09-04 10:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-02 13:32 [PATCH v5 0/2] lib/string_helpers: Introduce parse_int_array_user() Cezary Rojewski
2022-09-02 13:32 ` [PATCH v5 1/2] " Cezary Rojewski
2022-09-02 13:32 ` [PATCH v5 2/2] ASoC: SOF: Remove strsplit_u32() and tokenize_input() Cezary Rojewski
2022-09-02 14:25   ` Andy Shevchenko
2022-09-04 10:09     ` Cezary Rojewski [this message]
2022-09-02 14:16 ` [PATCH v5 0/2] lib/string_helpers: Introduce parse_int_array_user() Andy Shevchenko
2022-09-04 10:21   ` Cezary Rojewski

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=83184fe9-d2a1-8488-65fa-3735b3359bca@intel.com \
    --to=cezary.rojewski@intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=amadeuszx.slawinski@linux.intel.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=andy@kernel.org \
    --cc=broonie@kernel.org \
    --cc=hdegoede@redhat.com \
    --cc=intel-poland@eclists.intel.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: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox