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.
Showing the changes to scripts/checkpatch.pl (1 of 1 file). Show all
Unified · Split
| @@ -5753,18 +5753,25 @@ sub process { · 5752 unmodified lines | ||
| 5753 | 5753 | for (my $count = $linenr; $count <= $lc; $count++) { |
| 5754 | 5754 | my $fmt = get_quoted_string($lines[$count - 1], raw_line($count, 0)); |
| 5755 | 5755 | $fmt =~ s/%%//g; |
| 5756 | − if ($fmt =~ /(\%[\*\d\.]*p(?![\WFfSsBKRraEhMmIiUDdgVCbGNO]).)/) { | |
| 5756 | + if ($fmt =~ /(\%[\*\d\.]*p(?![\WSsBKRraEhMmIiUDdgVCbGNO]).)/) { | |
| 5757 | 5757 | $bad_extension = $1; |
| 5758 | 5758 | last; |
| 5759 | 5759 | } |
| 5760 | 5760 | } |
| 5761 | 5761 | if ($bad_extension ne "") { |
| 5762 | 5762 | my $stat_real = raw_line($linenr, 0); |
| 5763 | + my $ext_type = "Invalid"; | |
| 5764 | + my $use = ""; | |
| 5763 | 5765 | for (my $count = $linenr + 1; $count <= $lc; $count++) { |
| 5764 | 5766 | $stat_real = $stat_real . "\n" . raw_line($count, 0); |
| 5765 | 5767 | } |
| 5768 | + if ($bad_extension =~ /p[Ff]/) { | |
| 5769 | + $ext_type = "Deprecated"; | |
| 5770 | + $use = " - use %pS instead"; | |
| 5771 | + $use =~ s/pS/ps/ if ($bad_extension =~ /pf/); | |
| 5772 | + } | |
| 5766 | 5773 | WARN("VSPRINTF_POINTER_EXTENSION", |
| 5767 | − "Invalid vsprintf pointer extension '$bad_extension'\n" . "$here\n$stat_real\n"); | |
| 5774 | + "$ext_type vsprintf pointer extension '$bad_extension'$use\n" . "$here\n$stat_real\n"); | |
| 5768 | 5775 | } |
| 5769 | 5776 | } |
| 5770 | 5777 | |