diff options
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/Makefile.asm-generic | 1 | ||||
-rwxr-xr-x | scripts/checkpatch.pl | 5 | ||||
-rwxr-xr-x | scripts/depmod.sh | 48 |
3 files changed, 54 insertions, 0 deletions
diff --git a/scripts/Makefile.asm-generic b/scripts/Makefile.asm-generic index 490122c3e2aa..40caf3c26cd5 100644 --- a/scripts/Makefile.asm-generic +++ b/scripts/Makefile.asm-generic | |||
@@ -17,6 +17,7 @@ quiet_cmd_wrap = WRAP $@ | |||
17 | cmd_wrap = echo "\#include <asm-generic/$*.h>" >$@ | 17 | cmd_wrap = echo "\#include <asm-generic/$*.h>" >$@ |
18 | 18 | ||
19 | all: $(patsubst %, $(obj)/%, $(generic-y)) | 19 | all: $(patsubst %, $(obj)/%, $(generic-y)) |
20 | @: | ||
20 | 21 | ||
21 | $(obj)/%.h: | 22 | $(obj)/%.h: |
22 | $(call cmd,wrap) | 23 | $(call cmd,wrap) |
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 8657f99bfb2b..b0aa2c680593 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl | |||
@@ -1943,6 +1943,11 @@ sub process { | |||
1943 | WARN("LINUX_VERSION_CODE should be avoided, code should be for the version to which it is merged\n" . $herecurr); | 1943 | WARN("LINUX_VERSION_CODE should be avoided, code should be for the version to which it is merged\n" . $herecurr); |
1944 | } | 1944 | } |
1945 | 1945 | ||
1946 | # check for uses of printk_ratelimit | ||
1947 | if ($line =~ /\bprintk_ratelimit\s*\(/) { | ||
1948 | WARN("Prefer printk_ratelimited or pr_<level>_ratelimited to printk_ratelimit\n" . $herecurr); | ||
1949 | } | ||
1950 | |||
1946 | # printk should use KERN_* levels. Note that follow on printk's on the | 1951 | # printk should use KERN_* levels. Note that follow on printk's on the |
1947 | # same line do not need a level, so we use the current block context | 1952 | # same line do not need a level, so we use the current block context |
1948 | # to try and find and validate the current printk. In summary the current | 1953 | # to try and find and validate the current printk. In summary the current |
diff --git a/scripts/depmod.sh b/scripts/depmod.sh new file mode 100755 index 000000000000..3b029cba2baf --- /dev/null +++ b/scripts/depmod.sh | |||
@@ -0,0 +1,48 @@ | |||
1 | #!/bin/sh | ||
2 | # | ||
3 | # A depmod wrapper used by the toplevel Makefile | ||
4 | |||
5 | if test $# -ne 2; then | ||
6 | echo "Usage: $0 /sbin/depmod <kernelrelease>" >&2 | ||
7 | exit 1 | ||
8 | fi | ||
9 | DEPMOD=$1 | ||
10 | KERNELRELEASE=$2 | ||
11 | |||
12 | if ! "$DEPMOD" -V 2>/dev/null | grep -q module-init-tools; then | ||
13 | echo "Warning: you may need to install module-init-tools" >&2 | ||
14 | echo "See http://www.codemonkey.org.uk/docs/post-halloween-2.6.txt" >&2 | ||
15 | sleep 1 | ||
16 | fi | ||
17 | |||
18 | if ! test -r System.map -a -x "$DEPMOD"; then | ||
19 | exit 0 | ||
20 | fi | ||
21 | # older versions of depmod require the version string to start with three | ||
22 | # numbers, so we cheat with a symlink here | ||
23 | depmod_hack_needed=true | ||
24 | mkdir -p .tmp_depmod/lib/modules/$KERNELRELEASE | ||
25 | if "$DEPMOD" -b .tmp_depmod $KERNELRELEASE 2>/dev/null; then | ||
26 | if test -e .tmp_depmod/lib/modules/$KERNELRELEASE/modules.dep -o \ | ||
27 | -e .tmp_depmod/lib/modules/$KERNELRELEASE/modules.dep.bin; then | ||
28 | depmod_hack_needed=false | ||
29 | fi | ||
30 | fi | ||
31 | if $depmod_hack_needed; then | ||
32 | symlink="$INSTALL_MOD_PATH/lib/modules/99.98.$KERNELRELEASE" | ||
33 | ln -s "$KERNELRELEASE" "$symlink" | ||
34 | KERNELRELEASE=99.98.$KERNELRELEASE | ||
35 | fi | ||
36 | |||
37 | set -- -ae -F System.map | ||
38 | if test -n "$INSTALL_MOD_PATH"; then | ||
39 | set -- "$@" -b "$INSTALL_MOD_PATH" | ||
40 | fi | ||
41 | "$DEPMOD" "$@" "$KERNELRELEASE" | ||
42 | ret=$? | ||
43 | |||
44 | if $depmod_hack_needed; then | ||
45 | rm -f "$symlink" | ||
46 | fi | ||
47 | |||
48 | exit $ret | ||