[Pdbg] [PATCH v2 01/19] libsbefifo: Fix compilation error for undefined variable
Alistair Popple
alistair at popple.id.au
Thu Apr 9 12:10:09 AEST 2020
We didn't hit this because of the LOG() macro which is only enabled with
-DLIBSBEFIFO_DEBUG=1.
Reviewed-by: Alistair Popple <alistair at popple.id.au>
On Tuesday, 7 April 2020 4:15:55 PM AEST Amitay Isaacs wrote:
> Signed-off-by: Amitay Isaacs <amitay at ozlabs.org>
> ---
> 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;
> }
More information about the Pdbg
mailing list