Skip to content

Commit

Permalink
spi/trace: drop useless and wrong (but harmless) casts
Browse files Browse the repository at this point in the history
bus_num, chip_select and len are already ints, so there is no gain in
casting them to int. xfer is a pointer to a struct spi_transfer. Casting
that to struct spi_message * is wrong but as only the pointer value is
used for the %p format specifier no harm is done.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Uwe Kleine-König authored and Mark Brown committed Jan 7, 2019
1 parent 560b097 commit 983f6ae
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions include/trace/events/spi.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,9 @@ DECLARE_EVENT_CLASS(spi_transfer,
__entry->len = xfer->len;
),

TP_printk("spi%d.%d %p len=%d", (int)__entry->bus_num,
(int)__entry->chip_select,
(struct spi_message *)__entry->xfer,
(int)__entry->len)
TP_printk("spi%d.%d %p len=%d",
__entry->bus_num, __entry->chip_select,
__entry->xfer, __entry->len)
);

DEFINE_EVENT(spi_transfer, spi_transfer_start,
Expand Down

0 comments on commit 983f6ae

Please sign in to comment.