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: 9961827 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5C0F76056A for ; Wed, 20 Sep 2017 16:30:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4E2AD291A7 for ; Wed, 20 Sep 2017 16:30:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 42ADF291AF; Wed, 20 Sep 2017 16:30:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E3D5A291AB for ; Wed, 20 Sep 2017 16:30:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751986AbdITQaO (ORCPT ); Wed, 20 Sep 2017 12:30:14 -0400 Received: from mail-pg0-f68.google.com ([74.125.83.68]:33283 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751581AbdITQaL (ORCPT ); Wed, 20 Sep 2017 12:30:11 -0400 Received: by mail-pg0-f68.google.com with SMTP id i130so1921464pgc.0; Wed, 20 Sep 2017 09:30:11 -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=Twi3VghgG0pml2tLddZWpeS2CEWwF0w3U5v11xTog1AKyA6kPQ/4OGLZeO3cv6ZgOS O6eC3ztT5EgPYc+yf3+pplugqIamDFsNfexsYxYiNZAzKIrFWq4xcLX8zPqA/AEGb22M hz7OOyjEjhF5MZySlZxmRIUaWJnPlX0DPN+BUjlD1z1WS2zl8gQAULEtE8Ruy5W1e22e +1SF9kn/BbIa8+xpQugF6orcZ64tsDLl+FTWF0/huHjqHa3xuFmOAqd/Gjq5vyNaeliE A8XsZz/w01aZebYg1hIm0sCOXygo3tBr2k7JczvhMilYbS49VcKxJmvDvv+WFJSWMi2p 6jLA== X-Gm-Message-State: AHPjjUiaxJ4C5oV8EE5I3DHkAyOkaU5JZU33FVpQH/lAlILx1ykl5Yo5 T5pjJfwq0ZxEcH7fk3Wq0YI= 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 Cc: Petr Mladek , Steven Rostedt , Andrew Morton , Jessica Yu , Alexei Starovoitov , linux-ia64@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, Sergey Senozhatsky , Andy Whitcroft , Joe Perches 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> Sender: linux-parisc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-parisc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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"); } }