diff mbox series

[01/19] libsbefifo: Fix compilation error for undefined variable

Message ID 20200227010704.145608-2-amitay@ozlabs.org
State Superseded
Headers show
Series Add sbefifo backend | expand

Checks

Context Check Description
snowpatch_ozlabs/apply_patch warning Failed to apply on branch master (8b4611b5d8e7e2279fe4aa80c892fcfe10aa398d)
snowpatch_ozlabs/apply_patch fail Failed to apply to any branch

Commit Message

Amitay Isaacs Feb. 27, 2020, 1:06 a.m. UTC
Signed-off-by: Amitay Isaacs <amitay@ozlabs.org>
---
 libsbefifo/operation.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
diff mbox series

Patch

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;
 	}