[Pdbg] [PATCH 01/23] libsbefifo: Fix compilation error for undefined variable
Amitay Isaacs
amitay at ozlabs.org
Tue Apr 14 12:47:28 AEST 2020
We didn't hit this because of the LOG() macro which is only enabled with
-DLIBSBEFIFO_DEBUG=1.
Signed-off-by: Amitay Isaacs <amitay at ozlabs.org>
Reviewed-by: Alistair Popple <alistair at popple.id.au>
---
libsbefifo/operation.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/libsbefifo/operation.c b/libsbefifo/operation.c
index 07d9f64..8717f15 100644
--- a/libsbefifo/operation.c
+++ b/libsbefifo/operation.c
@@ -60,17 +60,18 @@ static int sbefifo_transport(struct sbefifo_context *sctx, uint8_t *msg, uint32_
int rc;
size_t buflen;
+
buflen = msg_len;
rc = sbefifo_write(sctx, msg, buflen);
if (rc) {
- LOG("write: cmd=%08x, rc=%d\n", cmd, rc);
+ LOG("write: cmd=%08x, rc=%d\n", be32toh(*(uint32_t *)(msg+4)), rc);
return rc;
}
buflen = *out_len;
rc = sbefifo_read(sctx, out, &buflen);
if (rc) {
- LOG("read: cmd=%08x, buflen=%zu, rc=%d\n", cmd, buflen, rc);
+ LOG("read: cmd=%08x, buflen=%zu, rc=%d\n", be32toh(*(uint32_t *)(msg+4)), buflen, rc);
return rc;
}
--
2.25.2
More information about the Pdbg
mailing list