Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp169671imu; Mon, 26 Nov 2018 09:19:47 -0800 (PST) X-Google-Smtp-Source: AFSGD/W+JKF2HJXxnDBc9UTYchvASDDxAvdciUS3DU5G7WU5yNaiyZ1vFefHpxOIW07mwhRHDTIy X-Received: by 2002:a62:5658:: with SMTP id k85mr18631413pfb.231.1543252787564; Mon, 26 Nov 2018 09:19:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543252787; cv=none; d=google.com; s=arc-20160816; b=ah84pi0bUH5u17faom0jX9biq1b2pAq+zFDtNV0/jaxXggSjTmSM7YPfyQKxrkZogS 5gDBhbO687Hhs8sqUY/rf9UeQQSLL90gvPDIlrqU5m4g28zF7yUOU5hyP5LxYvL58Ytc 8XmaGYuHybZBK1aGUyYtFraGsirKphnRh9CmdoH2tFuGEY5j5sjJHdAe797oK5LCpucK wHUD25nND1O1nR8RaND8s5nvLoplMnjwwpYKcyqiy7TUhJDDPn52MvEYOSUoA8nj5vOY QiJ6AdiXYgtUzsFWrK6aymU6HRMahSMmCm/QjfZUfoCpdp8AFVeoSRj7Ci33efP5R3im 1NLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=BzIIY/HVOzmCryfnQg/T3EFOJXAUDFlObeWglS3U2OE=; b=ftkRSYeKsfIT1+1elvffuNirIWRch00i+8YN1s+JjqRGYRAE1UgHTtovMujosO+U84 +7essJrnx7y7JuZ1q6AId9288AlwCN+M4befJjDhYAnj44tydzqyQ7ZgESrlcqHz69JO yMoBNFy3LrtTKpdzz7Brqiro7rXkVVsyYXG1M94y+1/mEWGfhbdd2uj/Ei6oOmD1nylB 4+oT1QmCTQMrBF/ccc2BlAdqG1BKqO44Wf5OaLs1rTmGNh1l6DbxH1lXKPtAp2bWc0M3 5LEBYCFU+86iVisCR5Nh/FawjhNgP2kCc1Br8upCsjNmaTgIq6PkLKnJA6Jy9bH8vf8b EekA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u1-v6si803481pfb.4.2018.11.26.09.18.38; Mon, 26 Nov 2018 09:19:47 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726425AbeK0EIh (ORCPT + 99 others); Mon, 26 Nov 2018 23:08:37 -0500 Received: from smtprelay0049.hostedemail.com ([216.40.44.49]:36914 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726254AbeK0EIg (ORCPT ); Mon, 26 Nov 2018 23:08:36 -0500 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay06.hostedemail.com (Postfix) with ESMTP id E1F7C1822451D; Mon, 26 Nov 2018 17:13:51 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::,RULES_HIT:41:355:379:599:960:968:973:982:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1541:1567:1593:1594:1711:1714:1730:1747:1777:1792:1801:2393:2559:2562:2828:2895:3138:3139:3140:3141:3142:3622:3865:3866:3867:3868:3870:3871:3874:4321:4605:5007:6119:7809:7903:8660:8957:10004:10400:10848:11232:11658:11914:12043:12663:12740:12760:12895:13069:13148:13230:13311:13357:13439:14181:14659:14721:14773:21080:21324:21433:21627:30003:30054:30056:30091,0,RBL:47.151.153.53:@perches.com:.lbl8.mailshell.net-62.8.0.100 64.201.201.201,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:28,LUA_SUMMARY:none X-HE-Tag: bat42_3ea9cc07bb914 X-Filterd-Recvd-Size: 2846 Received: from XPS-9350.home (unknown [47.151.153.53]) (Authenticated sender: joe@perches.com) by omf10.hostedemail.com (Postfix) with ESMTPA; Mon, 26 Nov 2018 17:13:50 +0000 (UTC) Message-ID: <48bb15770ef1755a0210db8137045176864d2ece.camel@perches.com> Subject: Re: RFC: script to convert vsprintf uses of %pf to %ps and %pF to %pS From: Joe Perches To: Sergey Senozhatsky Cc: Linus Torvalds , LKML , Steven Rostedt , Petr Mladek , Sergey Senozhatsky Date: Mon, 26 Nov 2018 09:13:48 -0800 In-Reply-To: <20181126060824.GG540@jagdpanzerIV> References: <8eb7769cb8550e82105b71ba67fd603394e23b1e.camel@perches.com> <20181126053517.GF540@jagdpanzerIV> <20181126060824.GG540@jagdpanzerIV> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.30.1-1build1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2018-11-26 at 15:08 +0900, Sergey Senozhatsky wrote: > > There are approximately these total uses of the symbolic > > lookup vsprintf extensions %p[SsFf]: > > > > $ git grep '".*[^%]%p[SsFf]' | \ > > grep -oh '%p[SsFf]' | sort | uniq -c | sort -rn > > 231 %pS > > 65 %ps > > 60 %pf > > 47 %pF > > I didn't bother to remove "pf/pF" because I didn't want to count on: > a) everyone running checkpatch.pl > b) everyone testing all printk-s they added > > I guess pf/pF still can sneak in. Any use of %p could sneak in. And thanks, the checkpatch test for %p should be updated too. > But I don't have a really strong opinion on this. If general > consensus is that we shall remove deprecated specifiers, then > I'm fine. I think converting deprecated things is generally good. Also, the %p lettering space is limited, so cleaning deprecated extensions is useful. > After running this script I still have a bunch of leftovers: > > // > // these two are probably not really relevant, but still - %pF/%pf > // > tools/lib/traceevent/event-parse.c: if (asprintf(&format, "%%pf: (NO FORMAT FOUND at %llx)\n", addr) < 0) > tools/lib/traceevent/event-parse.c: if (asprintf(&format, "%s: %s", "%pf", printk->printk) < 0) I was not/am not sure about those. > arch/um/kernel/sysrq.c: pr_info(" [<%08lx>] %s%pF\n", address, reliable ? "" : "? ", > arch/x86/xen/multicalls.c: printk(KERN_DEBUG " call %2d/%d: op=%lu arg=[%lx] result=%ld\t%pF\n", > kernel/async.c: pr_debug("calling %lli_%pF @ %i\n", > kernel/async.c: pr_debug("initcall %lli_%pF returned 0 after %lld usecs\n", Missed those by using \b, thanks again.