From patchwork Wed Sep 20 16:29:09 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Senozhatsky X-Patchwork-Id: 816366 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3xy5Fz1sn5z9t2Q for ; Thu, 21 Sep 2017 02:45:27 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="g33OEuK6"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3xy5Fz0XpBzDqj8 for ; Thu, 21 Sep 2017 02:45:27 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="g33OEuK6"; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:400e:c05::242; helo=mail-pg0-x242.google.com; envelope-from=sergey.senozhatsky@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="g33OEuK6"; dkim-atps=neutral Received: from mail-pg0-x242.google.com (mail-pg0-x242.google.com [IPv6:2607:f8b0:400e:c05::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3xy4wH0rbhzDqYY for ; Thu, 21 Sep 2017 02:30:07 +1000 (AEST) Received: by mail-pg0-x242.google.com with SMTP id u18so1919413pgo.1 for ; Wed, 20 Sep 2017 09:30:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=HJqhUlNnWHdffPLzDjDRPKA3+7BArB5/r6DxGIZj5oI=; b=g33OEuK6nTtEpDQOIPbrRhPIn/I4HgD2NHO2mWXr3Q4fbDS0yC58g79e5XVh6pfII/ Sl6TatUiOsHhqn7s0Uo7NLmkbt+V+4uYZ9N4+/zcfOCsi9kjD4x1qPzeIbEl6YOTuK5r ntqJkG+2GEaXMYJL7h1uQ1jAfdq2uxSra1h9Zj650pYR0aaDq9BNI7Dg4K1aDcNg0l1z vrVdc2kvTioAPArW/A/qZIfjWzdeyAPHxbjfwV2kR0pqHRZGBepFkot6seoR7nC9u2La 04AWWWRqDyTiEuIEQH3mhlAUb6/vJZMExDPb2VSn41W1uEZzCK8WqIZHQBc9yuRjQ6cC VBfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=HJqhUlNnWHdffPLzDjDRPKA3+7BArB5/r6DxGIZj5oI=; b=Ue/wxaMqdGlq5iV1jngQ0GUBQSvNzcOxzdYYNzt1gfnOxFUOvS69hBThJx5+vK85CN 16qkoyJSK0q0cq0CTU8QB5II1BKQ8nvZhMZ8coDErxTlFhG7CUkvvudb50M0REAZwyap 4pLPzhc0k24TX+M6d0LGdcoegB2dmKUei7ayfYGR5g+/WJEZFa8Ucg50RT8b9Yr24UT0 2hRduamGVaciyfdmtW9UBk5NpyZtH8jd49Zeyu05MU+VhzzGzUmoXqHADZaikEl21xgA tXf0mrLBB1mCpDgCrsHDZ+alqJtZyGqKv2dHaVeeJJEJ4rnga2XfyPAp3CyM/Bpibx46 1Brg== X-Gm-Message-State: AHPjjUh+TB5e0+HkX83GdnfD3rny8fUA9hgohIAVdnaPtAd9TCttBlmy dPsdHZXNEhu9wIg4gm7KSbw= X-Google-Smtp-Source: AOwi7QDFueRMZKFGzhb2953NehyciXW4SyKQCVnC2ZD58b12+vb/xEkXNNtIeP6AR0LqOv5K7lFGXQ== X-Received: by 10.98.12.84 with SMTP id u81mr2735453pfi.93.1505925005415; Wed, 20 Sep 2017 09:30:05 -0700 (PDT) Received: from localhost.localdomain ([121.137.63.184]) by smtp.gmail.com with ESMTPSA id c185sm8890567pfb.57.2017.09.20.09.30.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Sep 2017 09:30:04 -0700 (PDT) From: Sergey Senozhatsky To: Tony Luck , Fenghua Yu , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , James Bottomley , Helge Deller Subject: [RFC][PATCH v2 7/7] checkpatch: add pF/pf deprecation warning Date: Thu, 21 Sep 2017 01:29:09 +0900 Message-Id: <20170920162910.32053-8-sergey.senozhatsky@gmail.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20170920162910.32053-1-sergey.senozhatsky@gmail.com> References: <20170920162910.32053-1-sergey.senozhatsky@gmail.com> X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.24 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Petr Mladek , linux-ia64@vger.kernel.org, linux-parisc@vger.kernel.org, Alexei Starovoitov , Steven Rostedt , linux-kernel@vger.kernel.org, Sergey Senozhatsky , Jessica Yu , Andy Whitcroft , Joe Perches , Andrew Morton , linuxppc-dev@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" We deprecated '%pF/%pf' printk specifiers, since '%pS/%ps' is now smart enough to handle function pointer dereference on platforms where such dereference is required. checkpatch warning example: WARNING: Use '%pS/%ps' instead. This pointer extension was deprecated: '%pF' Signed-off-by: Sergey Senozhatsky Cc: Andy Whitcroft Cc: Joe Perches --- scripts/checkpatch.pl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index dd2c262aebbf..5945e4843466 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -5762,18 +5762,20 @@ sub process { for (my $count = $linenr; $count <= $lc; $count++) { my $fmt = get_quoted_string($lines[$count - 1], raw_line($count, 0)); $fmt =~ s/%%//g; - if ($fmt =~ /(\%[\*\d\.]*p(?![\WFfSsBKRraEhMmIiUDdgVCbGNO]).)/) { + if ($fmt =~ /(\%[\*\d\.]*p(?![\WSsBKRraEhMmIiUDdgVCbGNO]).)/) { $bad_extension = $1; last; } } if ($bad_extension ne "") { my $stat_real = raw_line($linenr, 0); + my $error_msg = "Invalid vsprintf pointer extension "; for (my $count = $linenr + 1; $count <= $lc; $count++) { $stat_real = $stat_real . "\n" . raw_line($count, 0); } + $error_msg = "Use '%pS/%ps' instead. This pointer extension was deprecated:" if ($bad_extension =~ /pF|pf/); WARN("VSPRINTF_POINTER_EXTENSION", - "Invalid vsprintf pointer extension '$bad_extension'\n" . "$here\n$stat_real\n"); + "$error_msg '$bad_extension'\n" . "$here\n$stat_real\n"); } }