Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5323139imu; Sun, 25 Nov 2018 21:37:34 -0800 (PST) X-Google-Smtp-Source: AFSGD/V5cy9tABMOlqA+bCIe1HXB9DljBFLmArHaKrzAhlCT/A7Dz31oWEule6LaYPpTnJ541nff X-Received: by 2002:a63:b105:: with SMTP id r5mr23683518pgf.442.1543210654269; Sun, 25 Nov 2018 21:37:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543210654; cv=none; d=google.com; s=arc-20160816; b=ruPlcwNfE3ze5KbQ8JiT6XeiIf9wI6pGleRszzA4mXu+Eayl3pRN0TFZ2I7CG6fEkE 9udDNkwBd4z+L5a8MAPhNYmPlo2Lo4Xp38SwISqfsFNuBM6F1YAk2Vw5S6J+2XQgyvd4 SmMLIxZhCn/A4S/YBu9sX7xuDA8000aSZF97Suug0GZWoJihO+gtAzTxIfsin6JxUt58 b+BvimP/S9SF6plcz5unB6agj8zTcg/cnewcR1XxpfVYOrRfE0BHZFS1c2lUIRmJyijt 9ZNhW2XyM8xav7ypG2XOXIw1ZNL0Nu4Pr9HXd4NFGJCDTzwemSxqW4jkhg8WZKPu+INd NOnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=UASEVsBr/lMSjsse1LkWTVfsgjxLgJj3/bMR5xsyChI=; b=fUo1L6LvaaoS+DvSwx1wgAD+9pOkJi/Mwzq1JpynMKxlLXIubU+wtaHtqCwq0Nr9ph 4Nf6OC6kdEzWBEHZ8Rp3459tnwtGLcUN1VhBBPbGR8pqUnFIwrEMOGEZrWwrMmCLLs6V qN0bZTUJGkgQkhe3GR5tvTMzEVqqI1j3fdOiFwKDF+FuZuMsa0SMaPdbJjSlOmGUiknm 4bbndU4DqTWxYNrnvIiApqaOtEEWG1uMqKZ2KvEda8l/MDEsbSSJDe2Li59ayGu4QzcU W/rornslkx8UEjC0c/wv4gT9eBSqFQD/3VoJfJR0BYdypU3lphQmhOcBeLantdkywS1q LmqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=W56uKNp8; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u6si50283487plz.220.2018.11.25.21.37.17; Sun, 25 Nov 2018 21:37:34 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=W56uKNp8; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726176AbeKZQ2U (ORCPT + 99 others); Mon, 26 Nov 2018 11:28:20 -0500 Received: from mail-pf1-f194.google.com ([209.85.210.194]:37560 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726144AbeKZQ2U (ORCPT ); Mon, 26 Nov 2018 11:28:20 -0500 Received: by mail-pf1-f194.google.com with SMTP id u3-v6so6006198pfm.4 for ; Sun, 25 Nov 2018 21:35:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=UASEVsBr/lMSjsse1LkWTVfsgjxLgJj3/bMR5xsyChI=; b=W56uKNp8fyOscLP1LXcH7/Zh3MhPlbEu1mBz4vBFEzxAYy6xMlQ+MAeKgbYDbqti2k mQsYu+5I86ZK9k+6RWT0+nFFPnlFQmfMTlGu2SnQkwv3Jq2aELnVSA9jJOv5GdCDkBiJ L+UA727E9l3Lpu24v2g6xowXAssqs+cYw4yU8lwlhIiuiMTZnmqzhOd+SX0fsXfUB0gI 6o8fLdsLpe1Eh/HndfJIiL/bl2gSdRisyg3wYl1ATYmsg17hHVGSQLZt5A2rPHa55jaa acTuMi8K/JELc5dsAhJ2zrPxcbCRFx64EaeDVQOgKf0Ve1U8CiQhGiagM5x/cafT+zsZ nYKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=UASEVsBr/lMSjsse1LkWTVfsgjxLgJj3/bMR5xsyChI=; b=IJIFCM2CsJN9gfR768nw69BOwKhremu+s1CBw73lSsM6XjALsN2hrlYmoVTA9YiTTf FbarweR/I9c0297p3S65Z4MC/mtORzrrNUbPso5waJ4zhILJvAmNERoU+QAmuHYn1AYL IP6tBjOb48YczvoxRNhNubWf05ocA9pgzNIB1nu5QHjXmXyPRM5pDdbY9La+k0R+cBF/ kQMKuqVwIVwFafOU/+kIae6dSisgR1DQGVAYIWFLczeFPHrCLPk+p2QJnMd8dik0dfd4 TiJnoHe8+SiHCxeba/xz5Wb9QqMT9CTMJTPlLZW3Thl/+Rh87yKpMb2frXhqZVsmYLOJ IzKA== X-Gm-Message-State: AA+aEWah2vWZjM0cMUNrzmz1g4RVSxrvvIVnC/x34QlTVnAj2lwgPiVI Qj5hRwwzc4lRbi4O3vJAUOTlMa0h X-Received: by 2002:a63:5207:: with SMTP id g7mr23666535pgb.253.1543210521603; Sun, 25 Nov 2018 21:35:21 -0800 (PST) Received: from localhost ([175.223.33.236]) by smtp.gmail.com with ESMTPSA id f64sm144482100pfh.0.2018.11.25.21.35.19 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 25 Nov 2018 21:35:20 -0800 (PST) Date: Mon, 26 Nov 2018 14:35:17 +0900 From: Sergey Senozhatsky To: Joe Perches Cc: Sergey Senozhatsky , Linus Torvalds , LKML Subject: Re: RFC: script to convert vsprintf uses of %pf to %ps and %pF to %pS Message-ID: <20181126053517.GF540@jagdpanzerIV> References: <8eb7769cb8550e82105b71ba67fd603394e23b1e.camel@perches.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8eb7769cb8550e82105b71ba67fd603394e23b1e.camel@perches.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Cc-ing Petr and Steven On (11/25/18 01:13), Joe Perches wrote: > commit 04b8eb7a4ccd ("symbol lookup: introduce dereference_symbol_descriptor()}" > > deprecated vsprintf extension %pf and %pF. > > 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. 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. > which is about a 3:1 ratio favoring %pS > > so a script to convert all the %pf uses to %ps and %pF uses to %pS > could be useful. > > There are a few files that appear should not be converted. > > $ git grep -w --name-only -i '%pf'| \ > grep -vP '^(?:Documentation|tools|include/linux/freezer.h)'| \ > xargs sed -i -e 's/%pf/%ps/g' -e 's/%pF/%pS/g' > > If that script above is run, it leaves the following patch > to be applied: 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) 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", -ss