summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandru Ardelean <ardeleanalex@gmail.com>2021-09-28 16:29:02 +0300
committerBjorn Andersson <bjorn.andersson@linaro.org>2021-10-08 22:29:27 -0500
commit63b8d79916672d35069962d87d1540c534cb2438 (patch)
tree4df27f319273593c227f56507fa35df7afa84dad
parentf0d1be1482aaab1aaadf68aa959f6d4c098a8e8f (diff)
rpmsg: virtio_rpmsg_bus: use dev_warn_ratelimited for msg with no recipient
Even though it may be user-space's fault for this error (some application terminated or crashed without cleaning up it's endpoint), the rpmsg communication should not overflow the syslog with too many messages. A dev_warn_ratelimited() seems like a good alternative in case this can occur. Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Link: https://lore.kernel.org/r/20210928132902.1594277-1-aardelean@deviqon.com
-rw-r--r--drivers/rpmsg/virtio_rpmsg_bus.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/rpmsg/virtio_rpmsg_bus.c b/drivers/rpmsg/virtio_rpmsg_bus.c
index a0634ef0420b..5da622eb1c8f 100644
--- a/drivers/rpmsg/virtio_rpmsg_bus.c
+++ b/drivers/rpmsg/virtio_rpmsg_bus.c
@@ -748,7 +748,7 @@ static int rpmsg_recv_single(struct virtproc_info *vrp, struct device *dev,
/* farewell, ept, we don't need you anymore */
kref_put(&ept->refcount, __ept_release);
} else
- dev_warn(dev, "msg received with no recipient\n");
+ dev_warn_ratelimited(dev, "msg received with no recipient\n");
/* publish the real size of the buffer */
rpmsg_sg_init(&sg, msg, vrp->buf_size);