Linux Media Controller development
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Alexander Kuleshov <kuleshovmail@gmail.com>
Cc: Hans Verkuil <hans.verkuil@cisco.com>,
	Mauro Carvalho Chehab <mchehab@osg.samsung.com>,
	linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] media/pci/cobalt: Use %*ph to print small buffers
Date: Wed, 26 Aug 2015 11:56:25 -0700	[thread overview]
Message-ID: <1440615385.2780.42.camel@perches.com> (raw)
In-Reply-To: <1440615110-11575-1-git-send-email-kuleshovmail@gmail.com>

On Thu, 2015-08-27 at 00:51 +0600, Alexander Kuleshov wrote:
> printk() supports %*ph format specifier for printing a small buffers,
> let's use it intead of %02x %02x...

Having just suffered this myself...

> diff --git a/drivers/media/pci/cobalt/cobalt-cpld.c b/drivers/media/pci/cobalt/cobalt-cpld.c
[]
> @@ -330,9 +330,7 @@ bool cobalt_cpld_set_freq(struct cobalt *cobalt, unsigned f_out)
>  
>  		if (!memcmp(read_regs, regs, sizeof(read_regs)))
>  			break;
> -		cobalt_dbg(1, "retry: %02x %02x %02x %02x %02x %02x\n",
> -			read_regs[0], read_regs[1], read_regs[2],
> -			read_regs[3], read_regs[4], read_regs[5]);
> +		cobalt_dbg(1, "retry: %6ph\n");

Aren't you missing something like compile testing?



  reply	other threads:[~2015-08-26 18:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-26 18:51 [PATCH] media/pci/cobalt: Use %*ph to print small buffers Alexander Kuleshov
2015-08-26 18:56 ` Joe Perches [this message]
2015-08-26 19:07   ` Alexander Kuleshov

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=1440615385.2780.42.camel@perches.com \
    --to=joe@perches.com \
    --cc=hans.verkuil@cisco.com \
    --cc=kuleshovmail@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@osg.samsung.com \
    /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