From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751727AbdFKAUx (ORCPT ); Sat, 10 Jun 2017 20:20:53 -0400 Received: from smtprelay0037.hostedemail.com ([216.40.44.37]:39936 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751634AbdFKAUw (ORCPT ); Sat, 10 Jun 2017 20:20:52 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::,RULES_HIT:41:355:379:541:599:800:960:973:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1538:1593:1594:1711:1714:1730:1747:1777:1792:2393:2553:2559:2562:2828:3138:3139:3140:3141:3142:3350:3622:3865:3866:3871:4321:4605:5007:6119:7904:10004:10400:10848:11026:11232:11473:11658:11914:12438:12740:12760:12895:13069:13180:13229:13311:13357:13439:14181:14659:14721:21080:21627:30012:30054:30070:30090:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:128,LUA_SUMMARY:none X-HE-Tag: cake25_4172a2de3114a X-Filterd-Recvd-Size: 1646 Message-ID: <1497140448.3254.3.camel@perches.com> Subject: Re: [PATCH] drm: Use vsnprintf extension %ph From: Joe Perches To: Andy Shevchenko Cc: Daniel Vetter , Jani Nikula , Sean Paul , David Airlie , dri-devel@lists.freedesktop.org, "linux-kernel@vger.kernel.org" Date: Sat, 10 Jun 2017 17:20:48 -0700 In-Reply-To: References: Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.22.6-1ubuntu1 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 On Sat, 2017-06-10 at 19:12 +0300, Andy Shevchenko wrote: > On Wed, May 31, 2017 at 2:35 AM, Joe Perches wrote: > > Using the extension saves a bit of code. > > + seq_printf(m, "faux/mst: %*ph\n", 2, buf); > > + seq_printf(m, "mst ctrl: %*ph\n", 1, buf); > > + seq_printf(m, "branch oui: %*phN devid: ", 3, buf); > > All above may use shorter form, i.e. > "..., "%Xph", buf);", where X is a constant written explicitly inplace. I know. Consistency is better though. Note the use of DP_RECEIVER_CAP_SIZE, etc...