[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5d8eadba-dc58-5f84-93ad-0430de049958@linaro.org>
Date: Thu, 15 Jul 2021 11:32:06 +0100
From: Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
To: Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>,
bjorn.andersson@...aro.org, broonie@...nel.org, robh@...nel.org
Cc: devicetree@...r.kernel.org, alsa-devel@...a-project.org,
bgoswami@...eaurora.org, lgirdwood@...il.com, tiwai@...e.de,
plai@...eaurora.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 07/16] ASoC: qcom: audioreach: add module configuration
command helpers
Thanks Pierre,
On 14/07/2021 17:48, Pierre-Louis Bossart wrote:
>
>> +static int audioreach_shmem_set_media_format(struct q6apm_graph *graph,
>> + struct audioreach_module *module,
>> + int direction, uint32_t rate,
>> + uint32_t num_channels,
>> + u8 channel_map[PCM_MAX_NUM_CHANNEL],
>> + uint16_t bits_per_sample)
>> +{
>> + struct apm_module_param_data *param_data;
>> + struct payload_media_fmt_pcm *cfg;
>> + struct media_format *header;
>> + int rc, payload_size;
>> + struct gpr_pkt *pkt;
>> + void *p;
>> +
>> + if (num_channels < 0 || num_channels > 2)
>> + dev_err(graph->dev, "Error: Invalid channels (%d)!\n", num_channels);
>
> that doesn't sound good, you flag num_channels as an invalid value but still continue using it.
I forgot to run cppcheck after doing make W=1 C=1.
It did catch these, will fix all such instances before I send out next
version.
--srini
Powered by blists - more mailing lists