From patchwork Mon Feb 3 14:35:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 235837 List-Id: U-Boot discussion From: sjg at chromium.org (Simon Glass) Date: Mon, 3 Feb 2020 07:35:50 -0700 Subject: [PATCH v2 04/32] mailbox: Rename free() to rfree() In-Reply-To: <20200203143618.74619-1-sjg@chromium.org> References: <20200203143618.74619-1-sjg@chromium.org> Message-ID: <20200203073614.v2.4.I48608cdc95aee9e6e906d0e8d3b4169eeb104558@changeid> This function name conflicts with our desire to #define free() to something else on sandbox. Since it deals with resources, rename it to rfree(). Signed-off-by: Simon Glass --- Changes in v2: None drivers/mailbox/k3-sec-proxy.c | 2 +- drivers/mailbox/mailbox-uclass.c | 4 ++-- drivers/mailbox/sandbox-mbox.c | 2 +- drivers/mailbox/stm32-ipcc.c | 2 +- drivers/mailbox/tegra-hsp.c | 2 +- include/mailbox-uclass.h | 4 ++-- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/mailbox/k3-sec-proxy.c b/drivers/mailbox/k3-sec-proxy.c index b07b56cf97..1194c6f029 100644 --- a/drivers/mailbox/k3-sec-proxy.c +++ b/drivers/mailbox/k3-sec-proxy.c @@ -291,7 +291,7 @@ static int k3_sec_proxy_recv(struct mbox_chan *chan, void *data) struct mbox_ops k3_sec_proxy_mbox_ops = { .of_xlate = k3_sec_proxy_of_xlate, .request = k3_sec_proxy_request, - .free = k3_sec_proxy_free, + .rfree = k3_sec_proxy_free, .send = k3_sec_proxy_send, .recv = k3_sec_proxy_recv, }; diff --git a/drivers/mailbox/mailbox-uclass.c b/drivers/mailbox/mailbox-uclass.c index 5968c9b7eb..a6d2d1f5b8 100644 --- a/drivers/mailbox/mailbox-uclass.c +++ b/drivers/mailbox/mailbox-uclass.c @@ -105,8 +105,8 @@ int mbox_free(struct mbox_chan *chan) debug("%s(chan=%p)\n", __func__, chan); - if (ops->free) - return ops->free(chan); + if (ops->rfree) + return ops->rfree(chan); return 0; } diff --git a/drivers/mailbox/sandbox-mbox.c b/drivers/mailbox/sandbox-mbox.c index bc917b3de4..442ca633a1 100644 --- a/drivers/mailbox/sandbox-mbox.c +++ b/drivers/mailbox/sandbox-mbox.c @@ -87,7 +87,7 @@ static const struct udevice_id sandbox_mbox_ids[] = { struct mbox_ops sandbox_mbox_mbox_ops = { .request = sandbox_mbox_request, - .free = sandbox_mbox_free, + .rfree = sandbox_mbox_free, .send = sandbox_mbox_send, .recv = sandbox_mbox_recv, }; diff --git a/drivers/mailbox/stm32-ipcc.c b/drivers/mailbox/stm32-ipcc.c index c3df9678a7..d4035a85f2 100644 --- a/drivers/mailbox/stm32-ipcc.c +++ b/drivers/mailbox/stm32-ipcc.c @@ -152,7 +152,7 @@ static const struct udevice_id stm32_ipcc_ids[] = { struct mbox_ops stm32_ipcc_mbox_ops = { .request = stm32_ipcc_request, - .free = stm32_ipcc_free, + .rfree = stm32_ipcc_free, .send = stm32_ipcc_send, .recv = stm32_ipcc_recv, }; diff --git a/drivers/mailbox/tegra-hsp.c b/drivers/mailbox/tegra-hsp.c index 9bee886561..c463e6a2be 100644 --- a/drivers/mailbox/tegra-hsp.c +++ b/drivers/mailbox/tegra-hsp.c @@ -175,7 +175,7 @@ static const struct udevice_id tegra_hsp_ids[] = { struct mbox_ops tegra_hsp_mbox_ops = { .of_xlate = tegra_hsp_of_xlate, .request = tegra_hsp_request, - .free = tegra_hsp_free, + .rfree = tegra_hsp_free, .send = tegra_hsp_send, .recv = tegra_hsp_recv, }; diff --git a/include/mailbox-uclass.h b/include/mailbox-uclass.h index e0618aad97..3c60c76506 100644 --- a/include/mailbox-uclass.h +++ b/include/mailbox-uclass.h @@ -49,14 +49,14 @@ struct mbox_ops { */ int (*request)(struct mbox_chan *chan); /** - * free - Free a previously requested channel. + * rfree - Free a previously requested channel. * * This is the implementation of the client mbox_free() API. * * @chan: The channel to free. * @return 0 if OK, or a negative error code. */ - int (*free)(struct mbox_chan *chan); + int (*rfree)(struct mbox_chan *chan); /** * send - Send a message over a mailbox channel *