[PATCH 02/30] kernel-doc: include line numbers for function prototypes

From: Mauro Carvalho Chehab
Date: Wed Sep 09 2020 - 13:01:07 EST


This should solve bad error reports like this one:

./include/linux/iio/iio.h:0: WARNING: Unknown target name: "devm".

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@xxxxxxxxxx>
---
scripts/kernel-doc | 2 ++
1 file changed, 2 insertions(+)

diff --git a/scripts/kernel-doc b/scripts/kernel-doc
index d1b445665ad6..3982d47048a7 100755
--- a/scripts/kernel-doc
+++ b/scripts/kernel-doc
@@ -1594,6 +1594,8 @@ sub dump_function($$) {
my $file = shift;
my $noret = 0;

+ print_lineno($.);
+
$prototype =~ s/^static +//;
$prototype =~ s/^extern +//;
$prototype =~ s/^asmlinkage +//;
--
2.26.2