History

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.

Krzysztof Kozlowski committed 8 months ago

Commit 90dacbf1 parent 4251dab2 files · +2 −2Browse files

Unified · Split

2 files
  1. drivers/remoteproc/mtk_scp.c +1 −1
  2. include/linux/rpmsg/mtk_rpmsg.h +1 −1
drivers/remoteproc/mtk_scp.c+1−1
@@ -1078,7 +1078,7 @@ static void scp_unregister_ipi(struct platform_device *pdev, u32 id) · 1077 unmodified lines
1078 scp_ipi_unregister(scp, id);1078 scp_ipi_unregister(scp, id);
1079}1079}
1080 1080
1081static int scp_send_ipi(struct platform_device *pdev, u32 id, void *buf,1081static int scp_send_ipi(struct platform_device *pdev, u32 id, const void *buf,
1082 unsigned int len, unsigned int wait)1082 unsigned int len, unsigned int wait)
1083{1083{
1084 struct mtk_scp *scp = platform_get_drvdata(pdev);1084 struct mtk_scp *scp = platform_get_drvdata(pdev);
include/linux/rpmsg/mtk_rpmsg.h+1−1
@@ -25,7 +25,7 @@ struct mtk_rpmsg_info { · 24 unmodified lines
25 ipi_handler_t handler, void *priv);25 ipi_handler_t handler, void *priv);
26 void (*unregister_ipi)(struct platform_device *pdev, u32 id);26 void (*unregister_ipi)(struct platform_device *pdev, u32 id);
27 int (*send_ipi)(struct platform_device *pdev, u32 id,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 int ns_ipi_id;29 int ns_ipi_id;
30};30};
31 31

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t