Commit bc7ff5c3 authored by Jialin Li's avatar Jialin Li
Browse files

fix compiler errors/warnings

parent 878a01f9
...@@ -78,13 +78,13 @@ void Runner::IssueDma(DMAOp &op) { ...@@ -78,13 +78,13 @@ void Runner::IssueDma(DMAOp &op) {
// can directly issue // can directly issue
#ifdef DEBUG_NICBM #ifdef DEBUG_NICBM
printf("nicbm: issuing dma op %p addr %lx len %zu pending %zu\n", &op, printf("nicbm: issuing dma op %p addr %lx len %zu pending %zu\n", &op,
op.dma_addr, op.len, dma_pending); op.dma_addr_, op.len_, dma_pending_);
#endif #endif
DmaDo(op); DmaDo(op);
} else { } else {
#ifdef DEBUG_NICBM #ifdef DEBUG_NICBM
printf("nicbm: enqueuing dma op %p addr %lx len %zu pending %zu\n", &op, printf("nicbm: enqueuing dma op %p addr %lx len %zu pending %zu\n", &op,
op.dma_addr, op.len, dma_pending); op.dma_addr_, op.len_, dma_pending_);
#endif #endif
dma_queue_.push_back(&op); dma_queue_.push_back(&op);
} }
...@@ -229,8 +229,8 @@ void Runner::H2DReadcomp(volatile struct SimbricksProtoPcieH2DReadcomp *rc) { ...@@ -229,8 +229,8 @@ void Runner::H2DReadcomp(volatile struct SimbricksProtoPcieH2DReadcomp *rc) {
DMAOp *op = (DMAOp *)(uintptr_t)rc->req_id; DMAOp *op = (DMAOp *)(uintptr_t)rc->req_id;
#ifdef DEBUG_NICBM #ifdef DEBUG_NICBM
printf("nicbm: completed dma read op %p addr %lx len %zu\n", op, op->dma_addr, printf("nicbm: completed dma read op %p addr %lx len %zu\n", op, op->dma_addr_,
op->len); op->len_);
#endif #endif
memcpy(op->data_, (void *)rc->data, op->len_); memcpy(op->data_, (void *)rc->data, op->len_);
...@@ -245,7 +245,7 @@ void Runner::H2DWritecomp(volatile struct SimbricksProtoPcieH2DWritecomp *wc) { ...@@ -245,7 +245,7 @@ void Runner::H2DWritecomp(volatile struct SimbricksProtoPcieH2DWritecomp *wc) {
#ifdef DEBUG_NICBM #ifdef DEBUG_NICBM
printf("nicbm: completed dma write op %p addr %lx len %zu\n", op, printf("nicbm: completed dma write op %p addr %lx len %zu\n", op,
op->dma_addr, op->len); op->dma_addr_, op->len_);
#endif #endif
dev_.DmaComplete(*op); dev_.DmaComplete(*op);
......
...@@ -118,7 +118,7 @@ bool DescRing::empty() { ...@@ -118,7 +118,7 @@ bool DescRing::empty() {
} }
bool DescRing::full() { bool DescRing::full() {
return (this->_currHead - this->_tailPtr >= this->_size); return (this->_currHead - this->_tailPtr >= (int)this->_size);
} }
bool DescRing::updatePtr(ptr_t ptr, bool head) { bool DescRing::updatePtr(ptr_t ptr, bool head) {
...@@ -290,7 +290,7 @@ void TxRing::dmaDone(DMAOp *op) { ...@@ -290,7 +290,7 @@ void TxRing::dmaDone(DMAOp *op) {
delete op; delete op;
break; break;
default: default:
fprintf(stderr, "Unknown DMA type %u\n", op->type); fprintf(stderr, "Unknown DMA type %d\n", op->type);
abort(); abort();
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment