From patchwork Wed Sep 20 16:29:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Senozhatsky X-Patchwork-Id: 816367 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 3xy5JB5fWJz9sP1 for ; Thu, 21 Sep 2017 02:47:22 +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="hxNwoxqH"; 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 3xy5JB3lzbzDqYG for ; Thu, 21 Sep 2017 02:47:22 +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="hxNwoxqH"; 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::241; helo=mail-pg0-x241.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="hxNwoxqH"; dkim-atps=neutral Received: from mail-pg0-x241.google.com (mail-pg0-x241.google.com [IPv6:2607:f8b0:400e:c05::241]) (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 3xy4wN6pn3zDqXw for ; Thu, 21 Sep 2017 02:30:12 +1000 (AEST) Received: by mail-pg0-x241.google.com with SMTP id d8so1912528pgt.3 for ; Wed, 20 Sep 2017 09:30:12 -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=hxNwoxqHd94Q+u14TV5UUR+RmHch00h2JSaAkpgm66G65YJEruTIMFiK5w6S3E2PA8 7oB9cO2ZoL79FJCJaKYy09sjeoZWre0L/OAu+7vmuNE83nOZWHjHzpwkDmPep1Gho6b4 Dwk8xI5qJusBR/hkdeNkk+SbylNQCNNOvz+wHPtBbOM/iwvYIBOF4VeuA3qMHrlGOcaT WkehdOpQ1s4CfP6sflofut4TGQBJQb2UvdNj2Rmsi57roFaGw+sQrMkOuxJMQSRhaCz6 Z7Ul6YqYpvQNFJSIxL2VRNJrNGsRtwNDdrQvW6v/+ae7HZ01blmmMPq/bXBqBUwpNzuJ /Q5A== 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=ZswtKxLwDrWIY7nSvtKv33SUpY46VzBRbMdexNj7gWC1yHIM48sDGMWZ//9bDGN6Ov G6Z2k7wx2EQjQaL4NtuXEn7lAARRokfkV8S6YimTL5YnijE7pb5HiK8L6wAjH+Gy2OQn k6KUc+Cu8sirCTVLMPw+1/lCR9//16Nq0fEbM8EVI9zOr1TT4cQFJ2nobbjqbinc+wev cmOG+e2C4EemNSYTazHnRGgiIgcG+h2/YzNZBgVVHJ9AqSSjWEDccye/Gity2IDFq0W1 YJhZR/Gja7uYYCOZfll1/tqMeQqacSvKJGO7Ct8m0lpUfoYkURuetre4KzOnjSloRtvc +UFQ== X-Gm-Message-State: AHPjjUiM9jMTc+GO83r7OlEC8EPKujJIXScLg/Fh7cgDqtpRVj6jjZ6S xQCnaQnrsQQgtEufU0gNhsc= X-Google-Smtp-Source: AOwi7QB077k7h1XinITHEQBMPFXV0fjIoXj/WP5nTMMWAYi+sSUfK8dLxACYu/SLhZ4H/OZm0grAdA== X-Received: by 10.98.60.14 with SMTP id j14mr2687273pfa.51.1505925011214; Wed, 20 Sep 2017 09:30:11 -0700 (PDT) Received: from localhost.localdomain ([121.137.63.184]) by smtp.gmail.com with ESMTPSA id c185sm8890567pfb.57.2017.09.20.09.30.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Sep 2017 09:30:10 -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:10 +0900 Message-Id: <20170920162910.32053-9-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"); } }