diff options
author | Paulo Miguel Almeida <paulo.miguel.almeida.rodenas@gmail.com> | 2022-02-25 21:03:17 +1300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-02-25 10:09:02 +0100 |
commit | 91c9ba35bb0695279c6924ef7e364196ce59a7c6 (patch) | |
tree | 451548262516960475b93a1844b83082189e2765 | |
parent | 57078a3c2e24fcc1ee8b7d44b69d27dba41c6598 (diff) |
staging: pi433: add index value to write dev_dbg statement
Add index value to the string that will be printed by dev_dbg for better
easier visualisation when debugging. For instance, if I have a big
message payload that will inevitably get split into chunks, it would be
a hassle trying to debug if the offset of the original payload that got
sent at that time.
This patch adds index value to write dev_dbg statement.
Signed-off-by: Paulo Miguel Almeida <paulo.miguel.almeida.rodenas@gmail.com>
Link: https://lore.kernel.org/r/YhiNRSi7jijxJWCL@mail.google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/pi433/rf69.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/pi433/rf69.c b/drivers/staging/pi433/rf69.c index 901f8db3e3ce..1a0081ebf63c 100644 --- a/drivers/staging/pi433/rf69.c +++ b/drivers/staging/pi433/rf69.c @@ -869,7 +869,7 @@ int rf69_write_fifo(struct spi_device *spi, u8 *buffer, unsigned int size) /* print content written from fifo for debugging purposes */ for (i = 0; i < size; i++) - dev_dbg(&spi->dev, "0x%x\n", buffer[i]); + dev_dbg(&spi->dev, "%d - 0x%x\n", i, buffer[i]); return spi_write(spi, local_buffer, size + 1); } |