path: root/scripts/
AgeCommit message (Collapse)Author
2012-03-26headers_check: recursively search for linux/types.h inclusionBobby Powers currently emits some spurious warnings, especially for the drm headers, about using __[us]{8,16,32,64} types without including linux/types.h. Recursively search for types.h inclusion, avoiding circular references. Signed-off-by: Bobby Powers <> Cc: Sam Ravnborg <> Cc: Dave Airlie <> Signed-off-by: Andrew Morton <> Signed-off-by: Michal Marek <>
2010-12-14headers_check: Fix warning
Fix the warning text too, per Randy. Cc: Alexander Shishkin <> Cc: Michal Marek <> Cc: Randy Dunlap <> Cc: Stephen Hemminger <> Cc: WANG Cong <> Signed-off-by: Andrew Morton <> Signed-off-by: Michal Marek <>
2010-12-14headers_check: better search for functions in
Some headers don't bother with "extern" in function prototypes, which results in said prototypes being unnoticed and exported to userland. This patch slightly improves detection of such cases by checking for C type names as well in the beginning of a line. Signed-off-by: Alexander Shishkin <> Cc: Stephen Hemminger <> Cc: Michal Marek <> Cc: WANG Cong <> Cc: Randy Dunlap <> Signed-off-by: Andrew Morton <> Signed-off-by: Michal Marek <>
2010-03-07headers_check: fix perl warningsStephen Hemminger
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 <> Acked-by: WANG Cong <> Cc: Michal Marek <> Signed-off-by: Andrew Morton <> Signed-off-by: Michal Marek <>
2009-06-09kbuild/headers_check: refine extern checkAmerigo Wang
'extern' checking information is not clear, refine it. Plus, fix a comment. Signed-off-by: WANG Cong <> [sam: redid the extern error message] Acked-by: Arnd Bergmann <> Signed-off-by: Sam Ravnborg <>
2009-06-09scripts/ correct RE in header CONFIG leak checkRobert P. J. Day
Correct the regular expression in scripts/ 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 <> Cc: David Woodhouse <> Signed-off-by: Andrew Morton <> Signed-off-by: Sam Ravnborg <>
2009-01-31kbuild: drop check for CONFIG_ in headers_checkSam Ravnborg
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 <> Signed-off-by: Ingo Molnar <>
2009-01-02kbuild: ignore a few files in headers_checkSam Ravnborg
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 <>
2009-01-02kbuild: add checks for include of linux/types in userspace headersSam Ravnborg
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 <> Signed-off-by: Sam Ravnborg <>
2009-01-02kbuild: check for leaked CONFIG_ symbols to userspaceSam Ravnborg
Signed-off-by: Sam Ravnborg <> disallow extern'sMike Frysinger
Since prototypes with "extern" refer to kernel functions, they make no sense in userspace, so reject them automatically. Signed-off-by: Mike Frysinger <> [sam: made it into a warning] Signed-off-by: Sam Ravnborg <>
2008-10-29Fix incompatibility with versions of Perl less than 5.6.0Jeremy Huntwork
Fix and 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 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 <> Signed-off-by: Andrew Morton <> Signed-off-by: Sam Ravnborg <>
2008-07-25kbuild: optimize headers_* targetsSam Ravnborg
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 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 <> Signed-off-by: Sam Ravnborg <>