Message ID | 20170920162910.32053-9-sergey.senozhatsky@gmail.com (mailing list archive) |
---|---|
State | Awaiting Upstream, archived |
Headers | show |
On (09/21/17 01:29), Sergey Senozhatsky wrote: > 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' weird... somehow I sent this patch twice. please ignore this one. -ss -- To unsubscribe from this list: send the line "unsubscribe linux-parisc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
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"); } }
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 <sergey.senozhatsky@gmail.com> Cc: Andy Whitcroft <apw@canonical.com> Cc: Joe Perches <joe@perches.com> --- scripts/checkpatch.pl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)