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: 9961833 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 D501C60208 for ; Wed, 20 Sep 2017 16:30:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C795E29198 for ; Wed, 20 Sep 2017 16:30:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BBF392919B; Wed, 20 Sep 2017 16:30:37 +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 6A62D29198 for ; Wed, 20 Sep 2017 16:30:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751001AbdITQaK (ORCPT ); Wed, 20 Sep 2017 12:30:10 -0400 Received: from mail-pg0-f67.google.com ([74.125.83.67]:33258 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751581AbdITQaG (ORCPT ); Wed, 20 Sep 2017 12:30:06 -0400 Received: by mail-pg0-f67.google.com with SMTP id i130so1921317pgc.0; Wed, 20 Sep 2017 09:30:05 -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=EmgYqXY8JxsFKDr6VqXADvLiVgIsPfrcZU6zOAXo42CXwYltjveryaWy0hOqsJ/8d9 sqUAMAq+OJn0xwP4UPDCdtWkNYX1acut5J3mKfV8NWt6fiDvggtoaNOBpSg6rsJDY6Mo /biLtzSfPigsDrud0GeKTV8dVfy4C/mzCGX56+8VcFg3cqSSByoDm2wZFWUnYKtq8+R3 i09qJXjKgvSzegVJsb0I9AOkFHhyRvG4rKIuHRDF4fKGVPirhXohbbRYELuOQWXp9E1I 5uhJsY/y0YdgoqFbJRuniYWrPvtF6HN8cpoyy6o4WLRM7qmB/VCWORhK6WpSJL7KXWLe OmpA== X-Gm-Message-State: AHPjjUgl91SvMOcmXDHB7xoAUiTUfldceX9sCItb3iB/9hxg756rWArL Sm+69Pxj4UwNgB041gdrN8Y= 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 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: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> 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"); } }