Skip to content

Commit 90dacbf

Browse files
krzkandersson
authored andcommitted
remoteproc: mtk_scp: Constify buffer passed to scp_send_ipi()
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>
1 parent 4251dab commit 90dacbf

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/remoteproc/mtk_scp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1078,7 +1078,7 @@ static void scp_unregister_ipi(struct platform_device *pdev, u32 id)
10781078
scp_ipi_unregister(scp, id);
10791079
}
10801080

1081-
static int scp_send_ipi(struct platform_device *pdev, u32 id, void *buf,
1081+
static int scp_send_ipi(struct platform_device *pdev, u32 id, const void *buf,
10821082
unsigned int len, unsigned int wait)
10831083
{
10841084
struct mtk_scp *scp = platform_get_drvdata(pdev);

include/linux/rpmsg/mtk_rpmsg.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ struct mtk_rpmsg_info {
2525
ipi_handler_t handler, void *priv);
2626
void (*unregister_ipi)(struct platform_device *pdev, u32 id);
2727
int (*send_ipi)(struct platform_device *pdev, u32 id,
28-
void *buf, unsigned int len, unsigned int wait);
28+
const void *buf, unsigned int len, unsigned int wait);
2929
int ns_ipi_id;
3030
};
3131

0 commit comments

Comments
 (0)