Thread (20 messages) 20 messages, 6 authors, 2018-07-24

RE: [PATCH v6 5/5] mailbox: Add support for i.MX7D messaging unit

From: "A.s. Dong" <aisheng.dong@nxp.com>
Date: 2018-07-24 02:13:46
Also in: linux-arm-kernel

-----Original Message-----
From: Vladimir Zapolskiy [mailto:vz@mleia.com]
Sent: Tuesday, July 24, 2018 7:31 AM
To: Oleksij Rempel <o.rempel@pengutronix.de>; Shawn Guo
[off-list ref]; Fabio Estevam [off-list ref]; Rob
Herring [off-list ref]; Mark Rutland [off-list ref]; A.s.
Dong [off-list ref]; Vladimir Zapolskiy
[off-list ref]
Cc: kernel@pengutronix.de; linux-arm-kernel@lists.infradead.org;
devicetree@vger.kernel.org; dl-linux-imx [off-list ref]
Subject: Re: [PATCH v6 5/5] mailbox: Add support for i.MX7D messaging unit

Hi Oleksij,

On 07/22/2018 09:39 AM, Oleksij Rempel wrote:
quoted
The Mailbox controller is able to send messages (up to 4 32 bit words)
between the endpoints.

This driver was tested using the mailbox-test driver sending messages
between the Cortex-A7 and the Cortex-M4.

Reviewed-by: Dong Aisheng <aisheng.dong@nxp.com>
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
[snip]
quoted
+static int imx_mu_startup(struct mbox_chan *chan) {
+	struct imx_mu_priv *priv = to_imx_mu_priv(chan->mbox);
+	struct imx_mu_con_priv *cp = chan->con_priv;
+	int ret;
+
+	cp->irq_desc = devm_kasprintf(priv->dev, GFP_KERNEL,
"imx_mu_chan[%i]",
quoted
+				      cp->idx);
+	if (!cp->irq_desc)
+		return -ENOMEM;
+
Again I would suggest to move this allocation to the loop in .probe function.

[snip]
+1
Good point.
quoted
+
+	for (i = 0; i < IMX_MU_CHANS; i++) {
+		struct imx_mu_con_priv *cp = &priv->con_priv[i];
+
+		cp->idx = i;
+		cp->irq = irq;
^^^^ right over here.
quoted
+		priv->mbox_chans[i].con_priv = cp;
+	}
+
please feel free to add my technical side review tag to the next version:

Reviewed-by: Vladimir Zapolskiy <vz@mleia.com>

FWIW I find that review comments from Lucas are pretty valid, I would
recommend to incorporate them.
+1

Regards
Dong Aisheng
--
Best wishes,
Vladimir
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help