]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
remoteproc: mtk_scp: Constify buffer passed to scp_send_ipi()
authorKrzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Tue, 17 Mar 2026 12:36:51 +0000 (13:36 +0100)
committerBjorn Andersson <andersson@kernel.org>
Mon, 6 Apr 2026 14:37:51 +0000 (09:37 -0500)
scp_send_ipi() should only send the passed buffer, without modifying its
contents, so mark pointer 'buf' as pointer to const.

Acked-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20260317-rpmsg-send-const-v3-2-4d7fd27f037f@oss.qualcomm.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
drivers/remoteproc/mtk_scp.c
include/linux/rpmsg/mtk_rpmsg.h

index 4651311aeb074d6b300f6aef123b45304ece7361..b5c052c72a1b2711620f397e96b6da4fcdb6620e 100644 (file)
@@ -1078,7 +1078,7 @@ static void scp_unregister_ipi(struct platform_device *pdev, u32 id)
        scp_ipi_unregister(scp, id);
 }
 
-static int scp_send_ipi(struct platform_device *pdev, u32 id, void *buf,
+static int scp_send_ipi(struct platform_device *pdev, u32 id, const void *buf,
                        unsigned int len, unsigned int wait)
 {
        struct mtk_scp *scp = platform_get_drvdata(pdev);
index 363b60178040b2406b3d4bdea2cfa00753a139b4..badcbc89917fc2707672b880b2c0a54f180d0f26 100644 (file)
@@ -25,7 +25,7 @@ struct mtk_rpmsg_info {
                            ipi_handler_t handler, void *priv);
        void (*unregister_ipi)(struct platform_device *pdev, u32 id);
        int (*send_ipi)(struct platform_device *pdev, u32 id,
-                       void *buf, unsigned int len, unsigned int wait);
+                       const void *buf, unsigned int len, unsigned int wait);
        int ns_ipi_id;
 };