From 582523142975c7993af81ff8007ff8e0e96f6dee Mon Sep 17 00:00:00 2001 From: Ahmad Fatoum Date: Tue, 2 Feb 2021 20:40:57 +0100 Subject: printk: port over Linux print_hex_dump_bytes/print_hex_dump_debug print_hex_dump in barebox always prints a hex dump. Most users use it for debugging though, so import Linux helpers to do so to cut down on the #ifdef DEBUG. Signed-off-by: Ahmad Fatoum Signed-off-by: Sascha Hauer --- drivers/mfd/rave-sp.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'drivers/mfd') diff --git a/drivers/mfd/rave-sp.c b/drivers/mfd/rave-sp.c index 8fc46b66bb..ef569dd513 100644 --- a/drivers/mfd/rave-sp.c +++ b/drivers/mfd/rave-sp.c @@ -269,9 +269,8 @@ static int rave_sp_write(struct rave_sp *sp, const u8 *data, u8 data_size) length = dest - frame; - if (IS_ENABLED(DEBUG)) - print_hex_dump(0, "rave-sp tx: ", DUMP_PREFIX_NONE, - 16, 1, frame, length, false); + print_hex_dump_debug("rave-sp tx: ", DUMP_PREFIX_NONE, 16, 1, + frame, length, false); return serdev_device_write(sp->serdev, frame, length, SECOND); } @@ -406,9 +405,8 @@ static void rave_sp_receive_frame(struct rave_sp *sp, struct device_d *dev = sp->serdev->dev; u8 crc_calculated[checksum_length]; - if (IS_ENABLED(DEBUG)) - print_hex_dump(0, "rave-sp rx: ", DUMP_PREFIX_NONE, - 16, 1, data, length, false); + print_hex_dump_debug("rave-sp rx: ", DUMP_PREFIX_NONE, 16, 1, + data, length, false); if (unlikely(length <= checksum_length)) { dev_warn(dev, "Dropping short frame\n"); -- cgit v1.2.3