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>
This commit is contained in:
parent
c5391d2592
commit
36568ff5ea
|
@ -15,11 +15,6 @@
|
|||
#include <cpu.h>
|
||||
#include <per_cpu.h>
|
||||
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue