From 36568ff5ea22ea329936b0a11c6d4639b07d6f89 Mon Sep 17 00:00:00 2001 From: yliu79 Date: Fri, 17 May 2019 14:48:05 -0700 Subject: [PATCH] HV: remove unused function sbuf_is_empty and sbuf_get Change-Id: I5fc3c472d445fc7a60c65e87cef692471ce6a26a Tracked-On: #3123 Signed-off-by: yliu79 Reviewed-by: Yin Fengwei Acked-by: Eddie Dong --- hypervisor/debug/sbuf.c | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/hypervisor/debug/sbuf.c b/hypervisor/debug/sbuf.c index 7362999ff..6fbbf98be 100644 --- a/hypervisor/debug/sbuf.c +++ b/hypervisor/debug/sbuf.c @@ -15,11 +15,6 @@ #include #include -static inline bool sbuf_is_empty(const struct shared_buf *sbuf) -{ - return (sbuf->head == sbuf->tail); -} - uint32_t sbuf_next_ptr(uint32_t pos_arg, uint32_t span, uint32_t scope) { @@ -29,30 +24,6 @@ uint32_t sbuf_next_ptr(uint32_t pos_arg, return pos; } -uint32_t sbuf_get(struct shared_buf *sbuf, uint8_t *data) -{ - const void *from; - uint32_t ele_size; - - stac(); - if (sbuf_is_empty(sbuf)) { - clac(); - /* no data available */ - return 0; - } - - from = (void *)sbuf + SBUF_HEAD_SIZE + sbuf->head; - - (void)memcpy_s((void *)data, sbuf->ele_size, from, sbuf->ele_size); - - sbuf->head = sbuf_next_ptr(sbuf->head, sbuf->ele_size, sbuf->size); - - ele_size = sbuf->ele_size; - clac(); - - return ele_size; -} - /** * The high caller should guarantee each time there must have * sbuf->ele_size data can be write form data and this function