Skip to contentSkip to conversation

kbuild: don't warn about linux/version.h not including itself

PATCH Superseded Peter Foley 2 participants 2 messages Apr 24, 2011 – Apr 26, 2011 Kbuild

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kbuild: don't warn about linux/version.h not including itself

This patch makes checkversion.pl not warn that include/linux/version.h dosen't include itself.

---
 scripts/checkversion.pl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
scripts/checkversion.pl +1 -1
index b444e89..b9150c7 100755
@@ -47,7 +47,7 @@ foreach my $file (@ARGV) {
     }
 
     # Report used version IDs without include?
-    if ($fUseVersion && ! $iLinuxVersion) {
+    if ($fUseVersion && ! $iLinuxVersion && $file !~ "include/linux/version.h") {
 	print "$file: $.: need linux/version.h\n";
     }
 
Signature · 1 line
1.7.5.rc1
#1 lore raw
Quoted 13 lines · Peter Foley

This patch makes checkversion.pl not warn that include/linux/version.h dosen't include itself.

---
 scripts/checkversion.pl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
scripts/checkversion.pl +0 -0
index b444e89..b9150c7 100755

scripts/checkversion.pl foreach my $file (@ARGV) { · line 50

Quoted 5 lines
scripts/checkversion.pl +1 -1
@@ -47,7 +47,7 @@ foreach my $file (@ARGV) {
     }
 
     # Report used version IDs without include?
-    if ($fUseVersion && ! $iLinuxVersion) {
+    if ($fUseVersion && ! $iLinuxVersion && $file !~ "include/linux/version.h") {

A more obvious fix would be to check the filename right at the beginning of the loop and skip to the next iteration if it is version.h. Also, you should escape the '.' in the regexp.

Michal