Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756902AbbHZS4c (ORCPT ); Wed, 26 Aug 2015 14:56:32 -0400 Received: from smtprelay0209.hostedemail.com ([216.40.44.209]:44283 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752714AbbHZS43 (ORCPT ); Wed, 26 Aug 2015 14:56:29 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::,RULES_HIT:41:355:379:541:599:973:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1539:1593:1594:1711:1714:1730:1747:1777:1792:2393:2559:2562:2828:3138:3139:3140:3141:3142:3350:3622:3866:3872:3873:4321:5007:6261:10004:10400:10848:11026:11657:11658:11914:12043:12438:12517:12519:12740:13069:13311:13357:21080,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0 X-HE-Tag: pain74_382ab455a0428 X-Filterd-Recvd-Size: 1649 Message-ID: <1440615385.2780.42.camel@perches.com> Subject: Re: [PATCH] media/pci/cobalt: Use %*ph to print small buffers From: Joe Perches To: Alexander Kuleshov Cc: Hans Verkuil , Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Date: Wed, 26 Aug 2015 11:56:25 -0700 In-Reply-To: <1440615110-11575-1-git-send-email-kuleshovmail@gmail.com> References: <1440615110-11575-1-git-send-email-kuleshovmail@gmail.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.12.11-0ubuntu3 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 959 Lines: 25 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? -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/