Commit 27fa680f authored by Sudeep Holla's avatar Sudeep Holla Committed by Jassi Brar

mailbox: mailbox-test: use print_hex_dump_bytes to allow dynamic printk

Reduce the logging from info to debug. Also use print_hex_dump_bytes
instead as it has support for dynamic printk providing options to
conditionally enable/disable these logs.

Cc: Lee Jones <lee.jones@linaro.org>
Signed-off-by: default avatarSudeep Holla <sudeep.holla@arm.com>
Signed-off-by: default avatarJassi Brar <jaswinder.singh@linaro.org>
parent c4280137
...@@ -113,15 +113,15 @@ static ssize_t mbox_test_message_write(struct file *filp, ...@@ -113,15 +113,15 @@ static ssize_t mbox_test_message_write(struct file *filp,
* MMIO to subsequently pass the message through * MMIO to subsequently pass the message through
*/ */
if (tdev->mmio && tdev->signal) { if (tdev->mmio && tdev->signal) {
print_hex_dump(KERN_INFO, "Client: Sending: Signal: ", DUMP_PREFIX_ADDRESS, print_hex_dump_bytes("Client: Sending: Signal: ", DUMP_PREFIX_ADDRESS,
MBOX_BYTES_PER_LINE, 1, tdev->signal, MBOX_MAX_SIG_LEN, true); tdev->signal, MBOX_MAX_SIG_LEN);
data = tdev->signal; data = tdev->signal;
} else } else
data = tdev->message; data = tdev->message;
print_hex_dump(KERN_INFO, "Client: Sending: Message: ", DUMP_PREFIX_ADDRESS, print_hex_dump_bytes("Client: Sending: Message: ", DUMP_PREFIX_ADDRESS,
MBOX_BYTES_PER_LINE, 1, tdev->message, MBOX_MAX_MSG_LEN, true); tdev->message, MBOX_MAX_MSG_LEN);
ret = mbox_send_message(tdev->tx_channel, data); ret = mbox_send_message(tdev->tx_channel, data);
if (ret < 0) if (ret < 0)
...@@ -222,13 +222,11 @@ static void mbox_test_receive_message(struct mbox_client *client, void *message) ...@@ -222,13 +222,11 @@ static void mbox_test_receive_message(struct mbox_client *client, void *message)
spin_lock_irqsave(&tdev->lock, flags); spin_lock_irqsave(&tdev->lock, flags);
if (tdev->mmio) { if (tdev->mmio) {
memcpy_fromio(tdev->rx_buffer, tdev->mmio, MBOX_MAX_MSG_LEN); memcpy_fromio(tdev->rx_buffer, tdev->mmio, MBOX_MAX_MSG_LEN);
print_hex_dump(KERN_INFO, "Client: Received [MMIO]: ", print_hex_dump_bytes("Client: Received [MMIO]: ", DUMP_PREFIX_ADDRESS,
DUMP_PREFIX_ADDRESS, MBOX_BYTES_PER_LINE, 1, tdev->rx_buffer, MBOX_MAX_MSG_LEN);
tdev->rx_buffer, MBOX_MAX_MSG_LEN, true);
} else if (message) { } else if (message) {
print_hex_dump(KERN_INFO, "Client: Received [API]: ", print_hex_dump_bytes("Client: Received [API]: ", DUMP_PREFIX_ADDRESS,
DUMP_PREFIX_ADDRESS, MBOX_BYTES_PER_LINE, 1, message, MBOX_MAX_MSG_LEN);
message, MBOX_MAX_MSG_LEN, true);
memcpy(tdev->rx_buffer, message, MBOX_MAX_MSG_LEN); memcpy(tdev->rx_buffer, message, MBOX_MAX_MSG_LEN);
} }
spin_unlock_irqrestore(&tdev->lock, flags); spin_unlock_irqrestore(&tdev->lock, flags);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment