[PATCH 2/6] kernel-doc: init kernel version

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <linux-kernel@...>
Cc: <akpm@...>, Johannes Berg <johannes@...>, <sam@...>
Date: Wednesday, October 24, 2007 - 6:08 pm

From: Johannes Berg <johannes@sipsolutions.net>

The kernel-doc script triggers a perl warning when invoked
without KERNELVERSION in the environment, rather make it use
the string "unknown kernel version" instead.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>

---
 scripts/kernel-doc |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- linux-2.6.23-git19.orig/scripts/kernel-doc
+++ linux-2.6.23-git19/scripts/kernel-doc
@@ -334,7 +334,7 @@ while ($ARGV[0] =~ m/^-(.*)/) {
 
 # get kernel version from env
 sub get_kernel_version() {
-    my $version;
+    my $version = 'unknown kernel version';
 
     if (defined($ENV{'KERNELVERSION'})) {
 	$version = $ENV{'KERNELVERSION'};


-- 

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 0/6] kernel-doc: add DOC: sections support, Randy Dunlap, (Wed Oct 24, 6:08 pm)
Re: [PATCH 0/6] kernel-doc: add DOC: sections support, Sam Ravnborg, (Fri Oct 26, 4:18 pm)
Re: [PATCH 0/6] kernel-doc: add DOC: sections support, Matt Mackall, (Thu Oct 25, 1:29 pm)
Re: [PATCH 0/6] kernel-doc: add DOC: sections support, Randy Dunlap, (Thu Oct 25, 1:36 pm)
Re: [PATCH 0/6] kernel-doc: add DOC: sections support, Matt Mackall, (Thu Oct 25, 3:21 pm)
Re: [PATCH 0/6] kernel-doc: add DOC: sections support, Johannes Berg, (Fri Oct 26, 6:48 am)
Re: [PATCH 0/6] kernel-doc: add DOC: sections support, Matt Mackall, (Fri Oct 26, 10:46 am)
Re: [PATCH 0/6] kernel-doc: add DOC: sections support, Johannes Berg, (Fri Oct 26, 4:32 pm)
[PATCH 3/6] kernel-doc: single DOC: selection, Randy Dunlap, (Wed Oct 24, 6:08 pm)
[PATCH 2/6] kernel-doc: init kernel version, Randy Dunlap, (Wed Oct 24, 6:08 pm)
[PATCH 4/6] kernel-doc: process functions, not DOC:, Randy Dunlap, (Wed Oct 24, 6:08 pm)
[PATCH 5/6] kernel-doc: use no-doc option, Randy Dunlap, (Wed Oct 24, 6:08 pm)
[PATCH 1/6] kernel-doc: fix xml output mode, Randy Dunlap, (Wed Oct 24, 6:08 pm)