ref: 435a0f18d5a5f372b4d5a30953e8d6bfd9cf6d17
parent: 477ab764da4534bc95acab205dc561562d764af2
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sat May 27 10:44:48 EDT 2023
sdnvme: revert removal of braces, fix empty if-body warning removing braces here triggers a warning for emptry if body because dmaflush() is a empty macro in pc/pc64 kernels.
--- a/sys/src/9/port/sdnvme.c
+++ b/sys/src/9/port/sdnvme.c
@@ -208,8 +208,9 @@
SQ *sq = ws->queue;
Ctlr *ctlr = sq->ctlr;
- if(e != nil)
+ if(e != nil){
dmaflush(1, e, 64);
+ }
coherence();
ctlr->reg[DBell + ((sq-ctlr->sq)*2+0 << ctlr->dstrd)] = sq->tail & sq->mask;
if(sq > ctlr->sq) {
@@ -269,8 +270,9 @@
count -= n;
lba += n;
}
- if(!write)
+ if(!write){
dmaflush(0, a, p - (uchar*)a);
+ }
return p - (uchar*)a;
}