Skip to content

Commit 36568ff

Browse files
ying2liuacrnsi
authored andcommitted
HV: remove unused function sbuf_is_empty and sbuf_get
Change-Id: I5fc3c472d445fc7a60c65e87cef692471ce6a26a Tracked-On: #3123 Signed-off-by: yliu79 <ying2.liu@intel.com> Reviewed-by: Yin Fengwei <fengwei.yin@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
1 parent c5391d2 commit 36568ff

File tree

1 file changed

+0
-29
lines changed

1 file changed

+0
-29
lines changed

hypervisor/debug/sbuf.c

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,6 @@
1515
#include <cpu.h>
1616
#include <per_cpu.h>
1717

18-
static inline bool sbuf_is_empty(const struct shared_buf *sbuf)
19-
{
20-
return (sbuf->head == sbuf->tail);
21-
}
22-
2318
uint32_t sbuf_next_ptr(uint32_t pos_arg,
2419
uint32_t span, uint32_t scope)
2520
{
@@ -29,30 +24,6 @@ uint32_t sbuf_next_ptr(uint32_t pos_arg,
2924
return pos;
3025
}
3126

32-
uint32_t sbuf_get(struct shared_buf *sbuf, uint8_t *data)
33-
{
34-
const void *from;
35-
uint32_t ele_size;
36-
37-
stac();
38-
if (sbuf_is_empty(sbuf)) {
39-
clac();
40-
/* no data available */
41-
return 0;
42-
}
43-
44-
from = (void *)sbuf + SBUF_HEAD_SIZE + sbuf->head;
45-
46-
(void)memcpy_s((void *)data, sbuf->ele_size, from, sbuf->ele_size);
47-
48-
sbuf->head = sbuf_next_ptr(sbuf->head, sbuf->ele_size, sbuf->size);
49-
50-
ele_size = sbuf->ele_size;
51-
clac();
52-
53-
return ele_size;
54-
}
55-
5627
/**
5728
* The high caller should guarantee each time there must have
5829
* sbuf->ele_size data can be write form data and this function

0 commit comments

Comments
 (0)