scp_send_ipi() should only send the passed buffer, without modifying its contents, so mark pointer 'buf' as pointer to const.
Unified · Split
| @@ -1078,7 +1078,7 @@ static void scp_unregister_ipi(struct platform_device *pdev, u32 id) · 1077 unmodified lines | ||
| 1078 | 1078 | scp_ipi_unregister(scp, id); |
| 1079 | 1079 | } |
| 1080 | 1080 | |
| 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, | |
| 1082 | 1082 | unsigned int len, unsigned int wait) |
| 1083 | 1083 | { |
| 1084 | 1084 | struct mtk_scp *scp = platform_get_drvdata(pdev); |
| @@ -25,7 +25,7 @@ struct mtk_rpmsg_info { · 24 unmodified lines | ||
| 25 | 25 | ipi_handler_t handler, void *priv); |
| 26 | 26 | void (*unregister_ipi)(struct platform_device *pdev, u32 id); |
| 27 | 27 | 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); | |
| 29 | 29 | int ns_ipi_id; |
| 30 | 30 | }; |
| 31 | 31 | |