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 05/22] soc: qcom: apr: Add GPR support
Date: Wed, 15 Sep 2021 10:47:10 -0500 [thread overview]
Message-ID: <83c503aa-7cb2-e6fa-e22a-b359a9cb9059@linux.intel.com> (raw)
In-Reply-To: <20210915131333.19047-6-srinivas.kandagatla@linaro.org>
> +gpr_port_t *gpr_alloc_port(struct apr_device *gdev, struct device *dev,
> + gpr_port_cb cb, void *priv)
> +{
> + struct packet_router *pr = dev_get_drvdata(gdev->dev.parent);
> + gpr_port_t *port;
> + struct pkt_router_svc *svc;
> + int id;
> +
> + port = kzalloc(sizeof(*port), GFP_KERNEL);
> + if (!port)
> + return ERR_PTR(-ENOMEM);
> +
> + svc = port;
> + svc->callback = cb;
> + svc->pr = pr;
> + svc->priv = priv;
> + svc->dev = dev;
> + spin_lock_init(&svc->lock);
> +
> + spin_lock(&pr->svcs_lock);
> + id = idr_alloc_cyclic(&pr->svcs_idr, svc, GPR_DYNAMIC_PORT_START,
> + GPR_DYNAMIC_PORT_END, GFP_ATOMIC);
> + if (id < 0) {
> + dev_err(dev, "Unable to allocate dynamic GPR src port\n");
> + kfree(port);
> + spin_unlock(&pr->svcs_lock);
> + return ERR_PTR(-ENOMEM);
> + }
> +
> + svc->id = id;
> + spin_unlock(&pr->svcs_lock);
> +
> + dev_info(dev, "Adding GPR src port (%x)\n", svc->id);
nit-pick: isn't this a bit verbose?
> +
> + return port;
> +}
> +EXPORT_SYMBOL_GPL(gpr_alloc_port);
> +struct gpr_pkt {
> + struct gpr_hdr hdr;
> + uint32_t payload[0];
> +};
looks like a zero-length array?
should this be
struct gpr_pkt {
struct gpr_hdr hdr;
uint32_t payload[];
};
?
next prev parent reply other threads:[~2021-09-15 16:34 UTC|newest]
Thread overview: 38+ 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 ` [PATCH v6 01/22] soc: dt-bindings: qcom: apr: convert to yaml 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 ` [PATCH v6 04/22] soc: dt-bindings: qcom: add gpr bindings Srinivas Kandagatla
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 15:47 ` Pierre-Louis Bossart [this message]
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 ` [PATCH v6 07/22] ASoC: dt-bindings: move LPASS clocks " 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 ` [PATCH v6 09/22] ASoC: qdsp6: q6afe-dai: move lpass audio ports to common file 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 ` [PATCH v6 11/22] ASoC: dt-bindings: q6dsp: add q6apm-lpass-dai compatible 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 ` [PATCH v6 13/22] ASoC: dt-bindings: add q6apm digital audio stream bindings Srinivas Kandagatla
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 15:54 ` Pierre-Louis Bossart
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 16:02 ` Pierre-Louis Bossart
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 16:11 ` Pierre-Louis Bossart
2021-09-16 15:02 ` Srinivas Kandagatla
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 ` [PATCH v6 18/22] ASoC: qdsp6: audioreach: add topology support Srinivas Kandagatla
2021-09-15 16:22 ` Pierre-Louis Bossart
2021-09-16 15:02 ` Srinivas Kandagatla
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 ` [PATCH v6 20/22] ASoC: qdsp6: audioreach: add q6apm lpass dai support Srinivas Kandagatla
2021-09-15 13:13 ` [PATCH v6 21/22] ASoC: qdsp6: audioreach: add q6prm support Srinivas Kandagatla
2021-09-15 13:13 ` [PATCH v6 22/22] ASoC: qdsp6: audioreach: add support for q6prm-clocks Srinivas Kandagatla
2021-09-15 16:32 ` [PATCH v6 00/22] ASoC: qcom: Add AudioReach support 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=83c503aa-7cb2-e6fa-e22a-b359a9cb9059@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=perex@perex.cz \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).