diff options
author | Mark Brown <broonie@kernel.org> | 2019-05-02 11:20:29 +0900 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-05-02 11:20:29 +0900 |
commit | 2e5f081003f033d37be3faf052aaccc8b6a44aa5 (patch) | |
tree | 6d07a9bfff47b20f997ecce96162b8ca9cf7b19c /include/trace/events | |
parent | 58b860ed4a77d9cb17b78e663a0341b79a12e240 (diff) | |
parent | d61ad23cb3be09ff4956e9b9794134456522817f (diff) |
Merge branch 'spi-5.2' into spi-next
Diffstat (limited to 'include/trace/events')
-rw-r--r-- | include/trace/events/spi.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/include/trace/events/spi.h b/include/trace/events/spi.h index aef6869f563d..0dd9171d2ad8 100644 --- a/include/trace/events/spi.h +++ b/include/trace/events/spi.h @@ -131,9 +131,11 @@ DECLARE_EVENT_CLASS(spi_transfer, __field( struct spi_transfer *, xfer ) __field( int, len ) __dynamic_array(u8, rx_buf, - spi_valid_rxbuf(msg, xfer) ? xfer->len : 0) + spi_valid_rxbuf(msg, xfer) ? + (xfer->len < 64 ? xfer->len : 64) : 0) __dynamic_array(u8, tx_buf, - spi_valid_txbuf(msg, xfer) ? xfer->len : 0) + spi_valid_txbuf(msg, xfer) ? + (xfer->len < 64 ? xfer->len : 64) : 0) ), TP_fast_assign( @@ -144,11 +146,11 @@ DECLARE_EVENT_CLASS(spi_transfer, if (spi_valid_txbuf(msg, xfer)) memcpy(__get_dynamic_array(tx_buf), - xfer->tx_buf, xfer->len); + xfer->tx_buf, __get_dynamic_array_len(tx_buf)); if (spi_valid_rxbuf(msg, xfer)) memcpy(__get_dynamic_array(rx_buf), - xfer->rx_buf, xfer->len); + xfer->rx_buf, __get_dynamic_array_len(rx_buf)); ), TP_printk("spi%d.%d %p len=%d tx=[%*phD] rx=[%*phD]", |