diff options
author | Sudeep Holla <sudeep.holla@arm.com> | 2016-02-19 11:01:17 -0500 |
---|---|---|
committer | Jassi Brar <jaswinder.singh@linaro.org> | 2016-03-04 02:02:19 -0500 |
commit | 27fa680f7f4143f1d04945dbcded0f52e26e5d56 (patch) | |
tree | 1e8ccb2a274dee5cfd2e6bf386b887d909ab5c37 | |
parent | c428013783dc969d9d298e81b2d276a9dc0003ab (diff) |
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: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
-rw-r--r-- | drivers/mailbox/mailbox-test.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/drivers/mailbox/mailbox-test.c b/drivers/mailbox/mailbox-test.c index 036a852b5fa1..f690f11969a1 100644 --- a/drivers/mailbox/mailbox-test.c +++ b/drivers/mailbox/mailbox-test.c | |||
@@ -113,15 +113,15 @@ static ssize_t mbox_test_message_write(struct file *filp, | |||
113 | * MMIO to subsequently pass the message through | 113 | * MMIO to subsequently pass the message through |
114 | */ | 114 | */ |
115 | if (tdev->mmio && tdev->signal) { | 115 | if (tdev->mmio && tdev->signal) { |
116 | print_hex_dump(KERN_INFO, "Client: Sending: Signal: ", DUMP_PREFIX_ADDRESS, | 116 | print_hex_dump_bytes("Client: Sending: Signal: ", DUMP_PREFIX_ADDRESS, |
117 | MBOX_BYTES_PER_LINE, 1, tdev->signal, MBOX_MAX_SIG_LEN, true); | 117 | tdev->signal, MBOX_MAX_SIG_LEN); |
118 | 118 | ||
119 | data = tdev->signal; | 119 | data = tdev->signal; |
120 | } else | 120 | } else |
121 | data = tdev->message; | 121 | data = tdev->message; |
122 | 122 | ||
123 | print_hex_dump(KERN_INFO, "Client: Sending: Message: ", DUMP_PREFIX_ADDRESS, | 123 | print_hex_dump_bytes("Client: Sending: Message: ", DUMP_PREFIX_ADDRESS, |
124 | MBOX_BYTES_PER_LINE, 1, tdev->message, MBOX_MAX_MSG_LEN, true); | 124 | tdev->message, MBOX_MAX_MSG_LEN); |
125 | 125 | ||
126 | ret = mbox_send_message(tdev->tx_channel, data); | 126 | ret = mbox_send_message(tdev->tx_channel, data); |
127 | if (ret < 0) | 127 | if (ret < 0) |
@@ -222,13 +222,11 @@ static void mbox_test_receive_message(struct mbox_client *client, void *message) | |||
222 | spin_lock_irqsave(&tdev->lock, flags); | 222 | spin_lock_irqsave(&tdev->lock, flags); |
223 | if (tdev->mmio) { | 223 | if (tdev->mmio) { |
224 | memcpy_fromio(tdev->rx_buffer, tdev->mmio, MBOX_MAX_MSG_LEN); | 224 | memcpy_fromio(tdev->rx_buffer, tdev->mmio, MBOX_MAX_MSG_LEN); |
225 | print_hex_dump(KERN_INFO, "Client: Received [MMIO]: ", | 225 | print_hex_dump_bytes("Client: Received [MMIO]: ", DUMP_PREFIX_ADDRESS, |
226 | DUMP_PREFIX_ADDRESS, MBOX_BYTES_PER_LINE, 1, | 226 | tdev->rx_buffer, MBOX_MAX_MSG_LEN); |
227 | tdev->rx_buffer, MBOX_MAX_MSG_LEN, true); | ||
228 | } else if (message) { | 227 | } else if (message) { |
229 | print_hex_dump(KERN_INFO, "Client: Received [API]: ", | 228 | print_hex_dump_bytes("Client: Received [API]: ", DUMP_PREFIX_ADDRESS, |
230 | DUMP_PREFIX_ADDRESS, MBOX_BYTES_PER_LINE, 1, | 229 | message, MBOX_MAX_MSG_LEN); |
231 | message, MBOX_MAX_MSG_LEN, true); | ||
232 | memcpy(tdev->rx_buffer, message, MBOX_MAX_MSG_LEN); | 230 | memcpy(tdev->rx_buffer, message, MBOX_MAX_MSG_LEN); |
233 | } | 231 | } |
234 | spin_unlock_irqrestore(&tdev->lock, flags); | 232 | spin_unlock_irqrestore(&tdev->lock, flags); |