Граф коммитов

10 Коммитов

Автор SHA1 Сообщение Дата
Stephen Hemminger dbbe33e99f headers_check: fix perl warnings
According to PBP; best way practice is to use local reference for file
handle and three argument open. Also perl prototypes are a mistake.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: WANG Cong <amwang@redhat.com>
Cc: Michal Marek <mmarek@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-03-07 21:43:07 +01:00
Amerigo Wang 67b7ebe091 kbuild/headers_check: refine extern check
'extern' checking information is not clear, refine it.
Plus, fix a comment.

Signed-off-by: WANG Cong <amwang@redhat.com>
[sam: redid the extern error message]
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2009-06-09 22:37:56 +02:00
Robert P. J. Day 1581c1cede scripts/headers_check.pl: correct RE in header CONFIG leak check
Correct the regular expression in scripts/headers_check.pl to include '_'
as a valid character in the class; otherwise, the check will report a
"leaked" symbol of CONFIG_A_B_C as merely CONFIG_A.

This patch will make no difference whatsoever in the current kernel tree
as the call to the perl routine that does that check is currently
commented out:

                &check_include();
                &check_asm_types();
                &check_sizetypes();
                &check_prototypes();
                # Dropped for now. Too much noise &check_config();

However, I noticed that problem when I was building the yum downloadable
kernel source rpm for fedora 11 (beta), which *does* run that check, and
that's where the problem became obvious.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Cc: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2009-06-09 22:37:52 +02:00
Sam Ravnborg 7e3fa56141 kbuild: drop check for CONFIG_ in headers_check
The check for references to CONFIG_ symbols in exported headers turned
out to be too agressive with the current state of affairs.
After the work of Jaswinder to clean up all relevant cases we are down
to almost pure noise.

So lets drop the check for now - we can always add it back later
should our headers be ready for that.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-01-31 00:36:15 +01:00
Sam Ravnborg b67ff8ce12 kbuild: ignore a few files in headers_check
The new check for asm/types.h and linux/types.h had
a few false positives.

o We cannot let linux/types.h include linux/types.h
o The int-ll64.h and int-ll64.h define the types
  and are included by linux/types.h

Handle this by hardcoding the filenames in the headers_check script.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2009-01-02 20:43:27 +01:00
Sam Ravnborg 483b41218f kbuild: add checks for include of linux/types in userspace headers
If we see __[us](8|16|32|64) then we must include <linux/types.h>
If wee see include of <asm/types.h> then we recommend <linux/types.h>

Original script from Mike but modified by me.

Cc: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2009-01-02 20:43:26 +01:00
Sam Ravnborg 7e557a2509 kbuild: check for leaked CONFIG_ symbols to userspace
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2009-01-02 20:43:23 +01:00
Mike Frysinger 46b8af50ba headers_check.pl: disallow extern's
Since prototypes with "extern" refer to kernel functions, they make no
sense in userspace, so reject them automatically.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
[sam: made it into a warning]
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2009-01-02 20:43:22 +01:00
Jeremy Huntwork 15a2ee74d2 Fix incompatibility with versions of Perl less than 5.6.0
Fix headers_install.pl and headers_check.pl to be compatible with versions
of Perl less than 5.6.0.  It has been tested with Perl 5.005_03 and 5.8.8.
I realize this may not be an issue for most people, but there will still
be some that hit it, I imagine.  There are three basic issues:

1. Prior to 5.6.0 open() only used 2 arguments, and the versions of
the scripts in 2.6.27.1 use 3.
2. 5.6.0 also introduced the ability to use uninitialized scalar
variables as file handles, which the current scripts make use of.
3. Lastly, 5.6.0 also introduced the pragma 'use warnings'. We can use
the -w switch and be backwards compatible.

Signed-off-by: Jeremy Huntwork <jhuntwork@lightcubesolutions.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-10-29 22:38:37 +01:00
Sam Ravnborg 7712401ae9 kbuild: optimize headers_* targets
Move the core functionality of headers_install
and headers_check to two small perl scripts.
The makefile is adapted to use the perl scrip and
changed to operate on all files in a directory.
So if one file is changed then all files in the
directory is processed.

perl were chosen for the helper scripts because this
is pure text processing which perl is good at and
especially the headers_check.pl script are expected to
see changes / new checks implmented.

The speed is ~300% faster on this box.
And the output generated to the screen is now down to
two lines per directory (one for install, one for check)
so it is easier to scroll back after a kernel build.

The perl scripts has been brought to sanity by patient
feedback from: Vegard Nossum <vegard.nossum@gmail.com>

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-07-25 22:12:16 +02:00