devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
To: Sudeep Holla <sudeep.holla-5wv7dgnIgG8@public.gmane.org>
Cc: Jassi Brar
	<jassisinghbrar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 3/4] mailbox: mailbox-test: use print_hex_dump_bytes to allow dynamic printk
Date: Fri, 12 Feb 2016 09:12:18 +0000	[thread overview]
Message-ID: <20160212091218.GR20693@x1> (raw)
In-Reply-To: <1455210808-29395-4-git-send-email-sudeep.holla-5wv7dgnIgG8@public.gmane.org>

On Thu, 11 Feb 2016, Sudeep Holla wrote:

> 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.

Printing out the data in this way is kinda the point of the driver.
But if you don't have a use for it, then I guess it's okay to
downgrade it to DEBUG, as turning debug on, or hacking the driver back
again are trivial actions.

> Cc: Jassi Brar <jassisinghbrar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> Cc: Lee Jones <lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
> Signed-off-by: Sudeep Holla <sudeep.holla-5wv7dgnIgG8@public.gmane.org>
> ---
>  drivers/mailbox/mailbox-test.c | 18 ++++++++----------
>  1 file 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,
>  	 * MMIO to subsequently pass the message through
>  	 */
>  	if (tdev->mmio && tdev->signal) {
> -		print_hex_dump(KERN_INFO, "Client: Sending: Signal: ", DUMP_PREFIX_ADDRESS,
> -			       MBOX_BYTES_PER_LINE, 1, tdev->signal, MBOX_MAX_SIG_LEN, true);
> +		print_hex_dump_bytes("Client: Sending: Signal: ", DUMP_PREFIX_ADDRESS,
> +				     tdev->signal, MBOX_MAX_SIG_LEN);
>  
>  		data = tdev->signal;
>  	} else
>  		data = tdev->message;
>  
> -	print_hex_dump(KERN_INFO, "Client: Sending: Message: ", DUMP_PREFIX_ADDRESS,
> -		       MBOX_BYTES_PER_LINE, 1, tdev->message, MBOX_MAX_MSG_LEN, true);
> +	print_hex_dump_bytes("Client: Sending: Message: ", DUMP_PREFIX_ADDRESS,
> +			     tdev->message, MBOX_MAX_MSG_LEN);
>  
>  	ret = mbox_send_message(tdev->tx_channel, data);
>  	if (ret < 0)
> @@ -222,13 +222,11 @@ static void mbox_test_receive_message(struct mbox_client *client, void *message)
>  	spin_lock_irqsave(&tdev->lock, flags);
>  	if (tdev->mmio) {
>  		memcpy_fromio(tdev->rx_buffer, tdev->mmio, MBOX_MAX_MSG_LEN);
> -		print_hex_dump(KERN_INFO, "Client: Received [MMIO]: ",
> -			       DUMP_PREFIX_ADDRESS, MBOX_BYTES_PER_LINE, 1,
> -			       tdev->rx_buffer, MBOX_MAX_MSG_LEN, true);
> +		print_hex_dump_bytes("Client: Received [MMIO]: ", DUMP_PREFIX_ADDRESS,
> +				     tdev->rx_buffer, MBOX_MAX_MSG_LEN);
>  	} else if (message) {
> -		print_hex_dump(KERN_INFO, "Client: Received [API]: ",
> -			       DUMP_PREFIX_ADDRESS, MBOX_BYTES_PER_LINE, 1,
> -			       message, MBOX_MAX_MSG_LEN, true);
> +		print_hex_dump_bytes("Client: Received [API]: ", DUMP_PREFIX_ADDRESS,
> +				     message, MBOX_MAX_MSG_LEN);
>  		memcpy(tdev->rx_buffer, message, MBOX_MAX_MSG_LEN);
>  	}
>  	spin_unlock_irqrestore(&tdev->lock, flags);

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2016-02-12  9:12 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-11 17:13 [PATCH 0/4] mailbox: mailbox-test: support single channel with separate Tx and Rx buffer Sudeep Holla
     [not found] ` <1455210808-29395-1-git-send-email-sudeep.holla-5wv7dgnIgG8@public.gmane.org>
2016-02-11 17:13   ` [PATCH 1/4] mailbox: mailbox-test: rename driver as generic test driver Sudeep Holla
2016-02-12  9:08     ` Lee Jones
2016-02-15 12:17   ` [PATCH 0/4] mailbox: mailbox-test: support single channel with separate Tx and Rx buffer Sudeep Holla
2016-02-15 12:31     ` Jassi Brar
2016-02-15 12:38       ` Sudeep Holla
2016-02-11 17:13 ` [PATCH 2/4] mailbox: mailbox-test: fix the compatible string Sudeep Holla
2016-02-12  9:08   ` Lee Jones
     [not found]   ` <1455210808-29395-3-git-send-email-sudeep.holla-5wv7dgnIgG8@public.gmane.org>
2016-02-12 16:49     ` Rob Herring
2016-02-11 17:13 ` [PATCH 3/4] mailbox: mailbox-test: use print_hex_dump_bytes to allow dynamic printk Sudeep Holla
     [not found]   ` <1455210808-29395-4-git-send-email-sudeep.holla-5wv7dgnIgG8@public.gmane.org>
2016-02-12  9:12     ` Lee Jones [this message]
2016-02-12  9:32       ` Sudeep Holla
2016-02-11 17:13 ` [PATCH 4/4] mailbox: mailbox-test: add support for separate tx/rx buffer with single channel Sudeep Holla
     [not found]   ` <1455210808-29395-5-git-send-email-sudeep.holla-5wv7dgnIgG8@public.gmane.org>
2016-02-12  9:15     ` Lee Jones
2016-02-12  9:34       ` Sudeep Holla
2016-02-12  9:17 ` [PATCH 0/4] mailbox: mailbox-test: support single channel with separate Tx and Rx buffer Lee Jones
2016-02-12  9:41   ` Sudeep Holla
     [not found]     ` <56BDA8E3.8060800-5wv7dgnIgG8@public.gmane.org>
2016-02-15 12:14       ` Sudeep Holla

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160212091218.GR20693@x1 \
    --to=lee.jones-qsej5fyqhm4dnm+yrofe0a@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=jassisinghbrar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=sudeep.holla-5wv7dgnIgG8@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).