0001-rpmsg-remove-the-address-check-in-rpmsg_send-rpmsg_t.patch 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. From 5bc0ae0942fa9a4b9d321e31445457c31c888530 Mon Sep 17 00:00:00 2001
  2. From: Xiang Xiao <xiaoxiang@xiaomi.com>
  3. Date: Fri, 24 Apr 2020 01:44:31 +0800
  4. Subject: [PATCH 01/10] rpmsg: remove the address check in
  5. rpmsg_send/rpmsg_trysend
  6. since rpmsg_send_offchannel_raw already do the same validation
  7. Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
  8. ---
  9. lib/include/openamp/rpmsg.h | 4 ----
  10. 1 file changed, 4 deletions(-)
  11. diff --git a/lib/include/openamp/rpmsg.h open-amp/lib/include/openamp/rpmsg.h
  12. index f2a6454..8401c38 100644
  13. --- a/lib/include/openamp/rpmsg.h
  14. +++ open-amp/lib/include/openamp/rpmsg.h
  15. @@ -146,8 +146,6 @@ int rpmsg_send_offchannel_raw(struct rpmsg_endpoint *ept, uint32_t src,
  16. static inline int rpmsg_send(struct rpmsg_endpoint *ept, const void *data,
  17. int len)
  18. {
  19. - if (ept->dest_addr == RPMSG_ADDR_ANY)
  20. - return RPMSG_ERR_ADDR;
  21. return rpmsg_send_offchannel_raw(ept, ept->addr, ept->dest_addr, data,
  22. len, true);
  23. }
  24. @@ -216,8 +214,6 @@ static inline int rpmsg_send_offchannel(struct rpmsg_endpoint *ept,
  25. static inline int rpmsg_trysend(struct rpmsg_endpoint *ept, const void *data,
  26. int len)
  27. {
  28. - if (ept->dest_addr == RPMSG_ADDR_ANY)
  29. - return RPMSG_ERR_ADDR;
  30. return rpmsg_send_offchannel_raw(ept, ept->addr, ept->dest_addr, data,
  31. len, false);
  32. }
  33. --
  34. 2.17.1