[PATCH v2 1/5] remoteproc: mtp_scp_ipi: Constify buffer passed to scp_ipi_send()

Krzysztof Kozlowski posted 5 patches 4 weeks, 1 day ago
There is a newer version of this series
[PATCH v2 1/5] remoteproc: mtp_scp_ipi: Constify buffer passed to scp_ipi_send()
Posted by Krzysztof Kozlowski 4 weeks, 1 day ago
scp_ipi_send() should only send the passed buffer, without modifying its
contents, so mark pointer 'buf' as pointer to const.

Acked-by: Mathieu Poirier <mathieuu.poirier@linaro.org>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
---

Patch necessary for the further patches, please keep with the rest.
---
 drivers/remoteproc/mtk_scp_ipi.c   | 2 +-
 include/linux/remoteproc/mtk_scp.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/remoteproc/mtk_scp_ipi.c b/drivers/remoteproc/mtk_scp_ipi.c
index 7a37e273b3af..ee2f1121411f 100644
--- a/drivers/remoteproc/mtk_scp_ipi.c
+++ b/drivers/remoteproc/mtk_scp_ipi.c
@@ -156,7 +156,7 @@ EXPORT_SYMBOL_GPL(scp_ipi_unlock);
  *
  * Return: 0 if sending data successfully, -error on error.
  **/
-int scp_ipi_send(struct mtk_scp *scp, u32 id, void *buf, unsigned int len,
+int scp_ipi_send(struct mtk_scp *scp, u32 id, const void *buf, unsigned int len,
 		 unsigned int wait)
 {
 	struct mtk_share_obj __iomem *send_obj = scp->send_buf;
diff --git a/include/linux/remoteproc/mtk_scp.h b/include/linux/remoteproc/mtk_scp.h
index 344ff41c22c7..4070537d6542 100644
--- a/include/linux/remoteproc/mtk_scp.h
+++ b/include/linux/remoteproc/mtk_scp.h
@@ -58,7 +58,7 @@ int scp_ipi_register(struct mtk_scp *scp, u32 id, scp_ipi_handler_t handler,
 		     void *priv);
 void scp_ipi_unregister(struct mtk_scp *scp, u32 id);
 
-int scp_ipi_send(struct mtk_scp *scp, u32 id, void *buf, unsigned int len,
+int scp_ipi_send(struct mtk_scp *scp, u32 id, const void *buf, unsigned int len,
 		 unsigned int wait);
 
 unsigned int scp_get_vdec_hw_capa(struct mtk_scp *scp);

-- 
2.51.0
Re: [PATCH v2 1/5] remoteproc: mtp_scp_ipi: Constify buffer passed to scp_ipi_send()
Posted by AngeloGioacchino Del Regno 4 weeks, 1 day ago
Il 10/03/26 12:22, Krzysztof Kozlowski ha scritto:
> scp_ipi_send() should only send the passed buffer, without modifying its
> contents, so mark pointer 'buf' as pointer to const.
> 
> Acked-by: Mathieu Poirier <mathieuu.poirier@linaro.org>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>

Please fix the commit title - that should be `remoteproc: mtk_scp_ipi: .....`

After which:

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Re: [PATCH v2 1/5] remoteproc: mtp_scp_ipi: Constify buffer passed to scp_ipi_send()
Posted by Krzysztof Kozlowski 4 weeks, 1 day ago
On 10/03/2026 12:22, Krzysztof Kozlowski wrote:
> scp_ipi_send() should only send the passed buffer, without modifying its
> contents, so mark pointer 'buf' as pointer to const.
> 
> Acked-by: Mathieu Poirier <mathieuu.poirier@linaro.org>

This email bounces:

"Your message wasn't delivered to mathieuu.poirier@linaro.org because
the address couldn't be found, or is unable to receive mail."

I got it from ack here:
https://lore.kernel.org/all/aS3AU0gEEOvWs4Uw@p14s/

so a hint: it's nice to have templates for responses, to avoid making
mistakes in own name/address. Mine is for example very long, so even I
could not type it correctly...


Best regards,
Krzysztof