Skip to content

Commit

Permalink
Fixed up types
Browse files Browse the repository at this point in the history
  • Loading branch information
lucypa committed Mar 9, 2022
1 parent ded915e commit 1825567
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ typedef void (*notify_fn)(void);
/* Buffer descriptor */
typedef struct buff_desc {
uintptr_t encoded_addr; /* encoded dma addresses */
unsigned int len; /* associated memory lengths */
size_t len; /* associated memory lengths */
void *cookie; /* index into client side metadata */
} buff_desc_t;

Expand Down Expand Up @@ -99,7 +99,7 @@ static inline void notify(ring_handle_t *ring)
*
* @return -1 when ring is empty, 0 on success.
*/
static inline int enqueue(ring_buffer_t *ring, uintptr_t buffer, unsigned int len, void *cookie)
static inline int enqueue(ring_buffer_t *ring, uintptr_t buffer, size_t len, void *cookie)
{
if (ring_full(ring)) {
ZF_LOGE("Ring full");
Expand Down Expand Up @@ -128,7 +128,7 @@ static inline int enqueue(ring_buffer_t *ring, uintptr_t buffer, unsigned int le
*
* @return -1 when ring is empty, 0 on success.
*/
static inline int dequeue(ring_buffer_t *ring, uintptr_t *addr, unsigned int *len, void **cookie)
static inline int dequeue(ring_buffer_t *ring, uintptr_t *addr, size_t *len, void **cookie)
{
if (ring_empty(ring)) {
ZF_LOGF("Ring is empty");
Expand Down Expand Up @@ -158,7 +158,7 @@ static inline int dequeue(ring_buffer_t *ring, uintptr_t *addr, unsigned int *le
*
* @return -1 when ring is empty, 0 on success.
*/
static inline int enqueue_avail(ring_handle_t *ring, uintptr_t addr, unsigned int len, void *cookie)
static inline int enqueue_avail(ring_handle_t *ring, uintptr_t addr, size_t len, void *cookie)
{
return enqueue(ring->avail_ring, addr, len, cookie);
}
Expand All @@ -174,7 +174,7 @@ static inline int enqueue_avail(ring_handle_t *ring, uintptr_t addr, unsigned in
*
* @return -1 when ring is empty, 0 on success.
*/
static inline int enqueue_used(ring_handle_t *ring, uintptr_t addr, unsigned int len, void *cookie)
static inline int enqueue_used(ring_handle_t *ring, uintptr_t addr, size_t len, void *cookie)
{
return enqueue(ring->used_ring, addr, len, cookie);
}
Expand All @@ -189,7 +189,7 @@ static inline int enqueue_used(ring_handle_t *ring, uintptr_t addr, unsigned int
*
* @return -1 when ring is empty, 0 on success.
*/
static inline int dequeue_avail(ring_handle_t *ring, uintptr_t *addr, unsigned int *len, void **cookie)
static inline int dequeue_avail(ring_handle_t *ring, uintptr_t *addr, size_t *len, void **cookie)
{
return dequeue(ring->avail_ring, addr, len, cookie);
}
Expand All @@ -204,7 +204,7 @@ static inline int dequeue_avail(ring_handle_t *ring, uintptr_t *addr, unsigned i
*
* @return -1 when ring is empty, 0 on success.
*/
static inline int dequeue_used(ring_handle_t *ring, uintptr_t *addr, unsigned int *len, void **cookie)
static inline int dequeue_used(ring_handle_t *ring, uintptr_t *addr, size_t *len, void **cookie)
{
return dequeue(ring->used_ring, addr, len, cookie);
}
Expand All @@ -222,7 +222,7 @@ static inline int dequeue_used(ring_handle_t *ring, uintptr_t *addr, unsigned in
* @return -1 when ring is empty, 0 on success.
*/

static int driver_dequeue(ring_buffer_t *ring, uintptr_t *addr, unsigned int *len, void **pointer)
static int driver_dequeue(ring_buffer_t *ring, uintptr_t *addr, size_t *len, void **pointer)
{
if (!((ring->write_idx - ring->read_idx) % CONFIG_LIB_SHARED_RINGBUFFER_DESC_COUNT)) {
ZF_LOGW("Ring is empty");
Expand Down

0 comments on commit 1825567

Please sign in to comment.