mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 06:44:00 -04:00
rpmsg: Constify buffer passed to send API
The rpmsg_send(), rpmsg_sendto() and other variants of sending interfaces should only send the passed data, without modifying its contents, so mark pointer 'data' as pointer to const. All users of this interface already follow this approach, so only the function declarations have to be updated. 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-3-4d7fd27f037f@oss.qualcomm.com Signed-off-by: Bjorn Andersson <andersson@kernel.org>
This commit is contained in:
committed by
Bjorn Andersson
parent
90dacbf4bf
commit
b8077b4da2
@@ -153,7 +153,7 @@ EXPORT_SYMBOL(rpmsg_destroy_ept);
|
||||
*
|
||||
* Return: 0 on success and an appropriate error value on failure.
|
||||
*/
|
||||
int rpmsg_send(struct rpmsg_endpoint *ept, void *data, int len)
|
||||
int rpmsg_send(struct rpmsg_endpoint *ept, const void *data, int len)
|
||||
{
|
||||
if (WARN_ON(!ept))
|
||||
return -EINVAL;
|
||||
@@ -182,7 +182,7 @@ EXPORT_SYMBOL(rpmsg_send);
|
||||
*
|
||||
* Return: 0 on success and an appropriate error value on failure.
|
||||
*/
|
||||
int rpmsg_sendto(struct rpmsg_endpoint *ept, void *data, int len, u32 dst)
|
||||
int rpmsg_sendto(struct rpmsg_endpoint *ept, const void *data, int len, u32 dst)
|
||||
{
|
||||
if (WARN_ON(!ept))
|
||||
return -EINVAL;
|
||||
@@ -210,7 +210,7 @@ EXPORT_SYMBOL(rpmsg_sendto);
|
||||
*
|
||||
* Return: 0 on success and an appropriate error value on failure.
|
||||
*/
|
||||
int rpmsg_trysend(struct rpmsg_endpoint *ept, void *data, int len)
|
||||
int rpmsg_trysend(struct rpmsg_endpoint *ept, const void *data, int len)
|
||||
{
|
||||
if (WARN_ON(!ept))
|
||||
return -EINVAL;
|
||||
@@ -238,7 +238,7 @@ EXPORT_SYMBOL(rpmsg_trysend);
|
||||
*
|
||||
* Return: 0 on success and an appropriate error value on failure.
|
||||
*/
|
||||
int rpmsg_trysendto(struct rpmsg_endpoint *ept, void *data, int len, u32 dst)
|
||||
int rpmsg_trysendto(struct rpmsg_endpoint *ept, const void *data, int len, u32 dst)
|
||||
{
|
||||
if (WARN_ON(!ept))
|
||||
return -EINVAL;
|
||||
|
||||
Reference in New Issue
Block a user