Skip to content

Commit ffed838

Browse files
gportaymbolivar-nordic
authored andcommitted
drivers: spi_context: fix some LOG_DBG warnings
This casts the char * buffers to void * before giving them to the LOG_DBG function to fix a warning at runtime. Signed-off-by: Gaël PORTAY <gael.portay@gmail.com>
1 parent a45caf8 commit ffed838

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

drivers/spi/spi_context.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,8 @@ void spi_context_buffers_setup(struct spi_context *ctx,
312312
" tx buf/len %p/%zu, rx buf/len %p/%zu",
313313
ctx->current_tx, ctx->tx_count,
314314
ctx->current_rx, ctx->rx_count,
315-
ctx->tx_buf, ctx->tx_len, ctx->rx_buf, ctx->rx_len);
315+
(void *)ctx->tx_buf, ctx->tx_len,
316+
(void *)ctx->rx_buf, ctx->rx_len);
316317
}
317318

318319
static ALWAYS_INLINE
@@ -340,7 +341,7 @@ void spi_context_update_tx(struct spi_context *ctx, uint8_t dfs, uint32_t len)
340341
ctx->tx_buf += dfs * len;
341342
}
342343

343-
LOG_DBG("tx buf/len %p/%zu", ctx->tx_buf, ctx->tx_len);
344+
LOG_DBG("tx buf/len %p/%zu", (void *)ctx->tx_buf, ctx->tx_len);
344345
}
345346

346347
static ALWAYS_INLINE
@@ -387,7 +388,7 @@ void spi_context_update_rx(struct spi_context *ctx, uint8_t dfs, uint32_t len)
387388
ctx->rx_buf += dfs * len;
388389
}
389390

390-
LOG_DBG("rx buf/len %p/%zu", ctx->rx_buf, ctx->rx_len);
391+
LOG_DBG("rx buf/len %p/%zu", (void *)ctx->rx_buf, ctx->rx_len);
391392
}
392393

393394
static ALWAYS_INLINE

0 commit comments

Comments
 (0)