Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

remoteproc: mtk_scp_ipi: Constify buffer passed to scp_ipi_send()

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 <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-1-4d7fd27f037f@oss.qualcomm.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>

authored by

Krzysztof Kozlowski and committed by
Bjorn Andersson
4251dab9 82c43bae

+2 -2
+1 -1
drivers/remoteproc/mtk_scp_ipi.c
··· 156 156 * 157 157 * Return: 0 if sending data successfully, -error on error. 158 158 **/ 159 - int scp_ipi_send(struct mtk_scp *scp, u32 id, void *buf, unsigned int len, 159 + int scp_ipi_send(struct mtk_scp *scp, u32 id, const void *buf, unsigned int len, 160 160 unsigned int wait) 161 161 { 162 162 struct mtk_share_obj __iomem *send_obj = scp->send_buf;
+1 -1
include/linux/remoteproc/mtk_scp.h
··· 58 58 void *priv); 59 59 void scp_ipi_unregister(struct mtk_scp *scp, u32 id); 60 60 61 - int scp_ipi_send(struct mtk_scp *scp, u32 id, void *buf, unsigned int len, 61 + int scp_ipi_send(struct mtk_scp *scp, u32 id, const void *buf, unsigned int len, 62 62 unsigned int wait); 63 63 64 64 unsigned int scp_get_vdec_hw_capa(struct mtk_scp *scp);