All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>,
	bjorn.andersson@linaro.org, broonie@kernel.org, robh@kernel.org
Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org,
	bgoswami@codeaurora.org, tiwai@suse.de, plai@codeaurora.org,
	lgirdwood@gmail.com
Subject: Re: [PATCH v6 16/22] ASoC: qdsp6: audioreach: add module configuration command helpers
Date: Thu, 16 Sep 2021 10:40:11 -0500	[thread overview]
Message-ID: <dbe12aeb-3200-e7d3-7530-39e2d3aa990c@linux.intel.com> (raw)
In-Reply-To: <00472b83-f02d-70cc-7c6e-cf414dc17754@linaro.org>


>>> +int q6apm_read(struct q6apm_graph *graph)
>>> +{
>>> +    struct data_cmd_rd_sh_mem_ep_data_buffer_v2 *read;
>>> +    struct audioreach_graph_data *port;
>>> +    struct audio_buffer *ab;
>>> +    struct gpr_pkt *pkt;
>>> +    int rc, iid;
>>> +
>>> +    iid = q6apm_graph_get_tx_shmem_module_iid(graph);
>>> +    pkt = audioreach_alloc_pkt(sizeof(*read),
>>> DATA_CMD_RD_SH_MEM_EP_DATA_BUFFER_V2,
>>> +                 graph->tx_data.dsp_buf, graph->port->id, iid);
>>> +    if (IS_ERR(pkt))
>>> +        return -ENOMEM;
>>> +
>>> +    read = (void *)pkt + GPR_HDR_SIZE;
>>
>> same nit-pick on variable naming, with the additional present/past
>> grammar issue that you don't know if it's a read buffer or a pointer to
>> data read in the past.
>>
> 
> do you think adding "_cmd" suffix like read_cmd would make more sense?

My personal preference is read_buffer or write_buffer, less ambiguous
than 'read' or 'write'.

I've started cracking down on the use of 'stream' for a similar reason,
at some point no one know what the code/variables represent.

WARNING: multiple messages have this Message-ID (diff)
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>,
	bjorn.andersson@linaro.org, broonie@kernel.org, robh@kernel.org
Cc: plai@codeaurora.org, tiwai@suse.de, devicetree@vger.kernel.org,
	perex@perex.cz, alsa-devel@alsa-project.org, lgirdwood@gmail.com,
	bgoswami@codeaurora.org
Subject: Re: [PATCH v6 16/22] ASoC: qdsp6: audioreach: add module configuration command helpers
Date: Thu, 16 Sep 2021 10:40:11 -0500	[thread overview]
Message-ID: <dbe12aeb-3200-e7d3-7530-39e2d3aa990c@linux.intel.com> (raw)
In-Reply-To: <00472b83-f02d-70cc-7c6e-cf414dc17754@linaro.org>


>>> +int q6apm_read(struct q6apm_graph *graph)
>>> +{
>>> +    struct data_cmd_rd_sh_mem_ep_data_buffer_v2 *read;
>>> +    struct audioreach_graph_data *port;
>>> +    struct audio_buffer *ab;
>>> +    struct gpr_pkt *pkt;
>>> +    int rc, iid;
>>> +
>>> +    iid = q6apm_graph_get_tx_shmem_module_iid(graph);
>>> +    pkt = audioreach_alloc_pkt(sizeof(*read),
>>> DATA_CMD_RD_SH_MEM_EP_DATA_BUFFER_V2,
>>> +                 graph->tx_data.dsp_buf, graph->port->id, iid);
>>> +    if (IS_ERR(pkt))
>>> +        return -ENOMEM;
>>> +
>>> +    read = (void *)pkt + GPR_HDR_SIZE;
>>
>> same nit-pick on variable naming, with the additional present/past
>> grammar issue that you don't know if it's a read buffer or a pointer to
>> data read in the past.
>>
> 
> do you think adding "_cmd" suffix like read_cmd would make more sense?

My personal preference is read_buffer or write_buffer, less ambiguous
than 'read' or 'write'.

I've started cracking down on the use of 'stream' for a similar reason,
at some point no one know what the code/variables represent.

  reply	other threads:[~2021-09-16 17:05 UTC|newest]

Thread overview: 76+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-15 13:13 [PATCH v6 00/22] ASoC: qcom: Add AudioReach support Srinivas Kandagatla
2021-09-15 13:13 ` Srinivas Kandagatla
2021-09-15 13:13 ` [PATCH v6 01/22] soc: dt-bindings: qcom: apr: convert to yaml Srinivas Kandagatla
2021-09-15 13:13   ` Srinivas Kandagatla
2021-09-15 13:13 ` [PATCH v6 02/22] soc: dt-bindings: qcom: apr: deprecate qcom, apr-domain property Srinivas Kandagatla
2021-09-15 13:13   ` [PATCH v6 02/22] soc: dt-bindings: qcom: apr: deprecate qcom,apr-domain property Srinivas Kandagatla
2021-09-15 13:13 ` [PATCH v6 03/22] soc: qcom: apr: make code more reuseable Srinivas Kandagatla
2021-09-15 13:13   ` Srinivas Kandagatla
2021-09-15 13:13 ` [PATCH v6 04/22] soc: dt-bindings: qcom: add gpr bindings Srinivas Kandagatla
2021-09-15 13:13   ` Srinivas Kandagatla
2021-09-16 20:03   ` Rob Herring
2021-09-16 20:03     ` Rob Herring
2021-09-15 13:13 ` [PATCH v6 05/22] soc: qcom: apr: Add GPR support Srinivas Kandagatla
2021-09-15 13:13   ` Srinivas Kandagatla
2021-09-15 15:47   ` Pierre-Louis Bossart
2021-09-15 15:47     ` Pierre-Louis Bossart
2021-09-16 15:02     ` Srinivas Kandagatla
2021-09-16 15:02       ` Srinivas Kandagatla
2021-09-15 13:13 ` [PATCH v6 06/22] ASoC: dt-bindings: move LPASS dai related bindings out of q6afe Srinivas Kandagatla
2021-09-15 13:13   ` Srinivas Kandagatla
2021-09-15 13:13 ` [PATCH v6 07/22] ASoC: dt-bindings: move LPASS clocks " Srinivas Kandagatla
2021-09-15 13:13   ` Srinivas Kandagatla
2021-09-15 13:13 ` [PATCH v6 08/22] ASoC: dt-bindings: rename q6afe.h to q6dsp-lpass-ports.h Srinivas Kandagatla
2021-09-15 13:13   ` Srinivas Kandagatla
2021-09-15 13:13 ` [PATCH v6 09/22] ASoC: qdsp6: q6afe-dai: move lpass audio ports to common file Srinivas Kandagatla
2021-09-15 13:13   ` Srinivas Kandagatla
2021-09-15 13:13 ` [PATCH v6 10/22] ASoC: qdsp6: q6afe-clocks: move audio-clocks " Srinivas Kandagatla
2021-09-15 13:13   ` Srinivas Kandagatla
2021-09-15 13:13 ` [PATCH v6 11/22] ASoC: dt-bindings: q6dsp: add q6apm-lpass-dai compatible Srinivas Kandagatla
2021-09-15 13:13   ` Srinivas Kandagatla
2021-09-15 13:13 ` [PATCH v6 12/22] ASoC: dt-bindings: lpass-clocks: add q6prm clocks compatible Srinivas Kandagatla
2021-09-15 13:13   ` Srinivas Kandagatla
2021-09-15 13:13 ` [PATCH v6 13/22] ASoC: dt-bindings: add q6apm digital audio stream bindings Srinivas Kandagatla
2021-09-15 13:13   ` Srinivas Kandagatla
2021-09-16 20:05   ` Rob Herring
2021-09-16 20:05     ` Rob Herring
2021-09-15 13:13 ` [PATCH v6 14/22] ASoC: qdsp6: audioreach: add basic pkt alloc support Srinivas Kandagatla
2021-09-15 13:13   ` Srinivas Kandagatla
2021-09-15 15:54   ` Pierre-Louis Bossart
2021-09-15 15:54     ` Pierre-Louis Bossart
2021-09-16 15:02     ` Srinivas Kandagatla
2021-09-16 15:02       ` Srinivas Kandagatla
2021-09-15 13:13 ` [PATCH v6 15/22] ASoC: qdsp6: audioreach: add q6apm support Srinivas Kandagatla
2021-09-15 13:13   ` Srinivas Kandagatla
2021-09-15 16:02   ` Pierre-Louis Bossart
2021-09-15 16:02     ` Pierre-Louis Bossart
2021-09-16 15:02     ` Srinivas Kandagatla
2021-09-16 15:02       ` Srinivas Kandagatla
2021-09-15 13:13 ` [PATCH v6 16/22] ASoC: qdsp6: audioreach: add module configuration command helpers Srinivas Kandagatla
2021-09-15 13:13   ` Srinivas Kandagatla
2021-09-15 16:11   ` Pierre-Louis Bossart
2021-09-15 16:11     ` Pierre-Louis Bossart
2021-09-16 15:02     ` Srinivas Kandagatla
2021-09-16 15:02       ` Srinivas Kandagatla
2021-09-16 15:40       ` Pierre-Louis Bossart [this message]
2021-09-16 15:40         ` Pierre-Louis Bossart
2021-09-15 13:13 ` [PATCH v6 17/22] ASoC: qdsp6: audioreach: add Kconfig and Makefile Srinivas Kandagatla
2021-09-15 13:13   ` Srinivas Kandagatla
2021-09-15 13:13 ` [PATCH v6 18/22] ASoC: qdsp6: audioreach: add topology support Srinivas Kandagatla
2021-09-15 13:13   ` Srinivas Kandagatla
2021-09-15 16:22   ` Pierre-Louis Bossart
2021-09-15 16:22     ` Pierre-Louis Bossart
2021-09-16 15:02     ` Srinivas Kandagatla
2021-09-16 15:02       ` Srinivas Kandagatla
2021-09-16 16:28       ` Pierre-Louis Bossart
2021-09-16 16:28         ` Pierre-Louis Bossart
2021-09-15 13:13 ` [PATCH v6 19/22] ASoC: qdsp6: audioreach: add q6apm-dai support Srinivas Kandagatla
2021-09-15 13:13   ` Srinivas Kandagatla
2021-09-15 13:13 ` [PATCH v6 20/22] ASoC: qdsp6: audioreach: add q6apm lpass dai support Srinivas Kandagatla
2021-09-15 13:13   ` Srinivas Kandagatla
2021-09-15 13:13 ` [PATCH v6 21/22] ASoC: qdsp6: audioreach: add q6prm support Srinivas Kandagatla
2021-09-15 13:13   ` Srinivas Kandagatla
2021-09-15 13:13 ` [PATCH v6 22/22] ASoC: qdsp6: audioreach: add support for q6prm-clocks Srinivas Kandagatla
2021-09-15 13:13   ` Srinivas Kandagatla
2021-09-15 16:32 ` [PATCH v6 00/22] ASoC: qcom: Add AudioReach support Pierre-Louis Bossart
2021-09-15 16:32   ` Pierre-Louis Bossart

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=dbe12aeb-3200-e7d3-7530-39e2d3aa990c@linux.intel.com \
    --to=pierre-louis.bossart@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=bgoswami@codeaurora.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=plai@codeaurora.org \
    --cc=robh@kernel.org \
    --cc=srinivas.kandagatla@linaro.org \
    --cc=tiwai@suse.de \
    /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 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.