From patchwork Thu Nov 9 23:48:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Senozhatsky X-Patchwork-Id: 836569 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 3yY0f90f86z9sRg for ; Fri, 10 Nov 2017 11:05:05 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="N6GJauWD"; 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 3yY0f86bCMzDrLf for ; Fri, 10 Nov 2017 11:05:04 +1100 (AEDT) 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="N6GJauWD"; 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:c00::241; helo=mail-pf0-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="N6GJauWD"; dkim-atps=neutral Received: from mail-pf0-x241.google.com (mail-pf0-x241.google.com [IPv6:2607:f8b0:400e:c00::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 3yY0Kv3gDpzDrKq for ; Fri, 10 Nov 2017 10:50:59 +1100 (AEDT) Received: by mail-pf0-x241.google.com with SMTP id 17so5414508pfn.12 for ; Thu, 09 Nov 2017 15:50:59 -0800 (PST) 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=lpzKS3JpiOqhQnEZgGht2QeeVsMdmyhYxYy367LbDrk=; b=N6GJauWDOh9cL0odbBVH1qUcPsf9jSTHSTMJw+YcNuXL8IXxORTwxvTyw3cBYuzTNp tHLC2snmn7EvR8oCRvSFgFKiTnkshsIptREk/mOaRB7+dXGdcDxAegCWL+1vl29RHYze z/pKB2SY7Cs6vDtPZpk4WP0YtFq4ua/47y3++zND7F9/AdqRj3y/W7pYn/Vaw1bNivsK t+vP9MiB5R5NKhUkLpf4GK0Om6uQLJCwlvhUAtOIH9XZ1gBKOIzAqyMKOuqIbmZwx1wl iuxfV0Oxc/9F7IKv1HTaFFI1KSYc1WLvcCafO6++iamta1RGno4JOnQ4PfAAPNu1FWuV SsGQ== 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=lpzKS3JpiOqhQnEZgGht2QeeVsMdmyhYxYy367LbDrk=; b=pQx2tQvDZp1mBoazMVs0NvGBnx0n3pmMEicVlIgEKgluP4y98nyxpSuoCls//8rmzk 6QPIk2QnVZGVLwG4mECbS2ISXj8ClCs8PKnx2ROv4k//xuW3t7wcSPLmkrX0g6UMQNQ5 xYDUkNy+PjreYXrBFDO12vh7ND+/HEU1Ch9FhxEH87ulMhHqyKYx0yaYCpKnhYV0UKwl N1+bA/dj2cuiJihpD3pe+7lB9kcR7DCca3WZacky454+GG/57QwVRgiafUrL4Jdmpead rtsARYTuOmisyE3pP+AuWl108MnkVhu9hGnvrUQ9J1cn5I06fsI78cJyyW3M5xatJuLl F9Cg== X-Gm-Message-State: AJaThX79ro+eKxdlq2+Na2belsIGmR4lq/al52vdUqXn+2AEA8uuBJDX WiJx0zRN9hqOn62zpwcRY/A= X-Google-Smtp-Source: ABhQp+Qws/PIuaomO/wTOmkrz9nO6YRP2czgooeCpPc/kdXzsQ/INez0Ct+Eh/BoaotIG3Qwg5/l9A== X-Received: by 10.98.248.5 with SMTP id d5mr2213018pfh.118.1510271457634; Thu, 09 Nov 2017 15:50:57 -0800 (PST) Received: from localhost.localdomain ([121.137.63.184]) by smtp.gmail.com with ESMTPSA id t25sm13160477pfh.67.2017.11.09.15.50.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 Nov 2017 15:50:57 -0800 (PST) From: Sergey Senozhatsky To: Tony Luck , Fenghua Yu , Helge Deller , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , James Bottomley Subject: [PATCHv4 6/6] checkpatch: add pF/pf deprecation warning Date: Fri, 10 Nov 2017 08:48:30 +0900 Message-Id: <20171109234830.5067-7-sergey.senozhatsky@gmail.com> X-Mailer: git-send-email 2.15.0 In-Reply-To: <20171109234830.5067-1-sergey.senozhatsky@gmail.com> References: <20171109234830.5067-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: Andy Whitcroft , Petr Mladek , linux-ia64@vger.kernel.org, Sergey Senozhatsky , linux-parisc@vger.kernel.org, linux-kernel@vger.kernel.org, Steven Rostedt , Sergey Senozhatsky , Jessica Yu , 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. Signed-off-by: Sergey Senozhatsky Signed-off-by: Joe Perches Cc: Andy Whitcroft Reviewed-by: Petr Mladek --- scripts/checkpatch.pl | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 3453df9f90ab..d081a2b7166e 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -5752,18 +5752,25 @@ 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 $ext_type = "Invalid"; + my $use = ""; for (my $count = $linenr + 1; $count <= $lc; $count++) { $stat_real = $stat_real . "\n" . raw_line($count, 0); } + if ($bad_extension =~ /p[Ff]/) { + $ext_type = "Deprecated"; + $use = " - use %pS instead"; + $use =~ s/pS/ps/ if ($bad_extension =~ /pf/); + } WARN("VSPRINTF_POINTER_EXTENSION", - "Invalid vsprintf pointer extension '$bad_extension'\n" . "$here\n$stat_real\n"); + "$ext_type vsprintf pointer extension '$bad_extension'$use\n" . "$here\n$stat_real\n"); } }