aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/checkpatch.pl9
-rwxr-xr-xscripts/mkcompile_h4
2 files changed, 6 insertions, 7 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 3257d3d96767..46f47ac7ebbe 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2618,14 +2618,11 @@ sub process {
2618 WARN("__func__ should be used instead of gcc specific __FUNCTION__\n" . $herecurr); 2618 WARN("__func__ should be used instead of gcc specific __FUNCTION__\n" . $herecurr);
2619 } 2619 }
2620 2620
2621# check for semaphores used as mutexes 2621# check for semaphores initialized locked
2622 if ($line =~ /^.\s*(DECLARE_MUTEX|init_MUTEX)\s*\(/) { 2622 if ($line =~ /sema_init\(.*,\s*0\)/) {
2623 WARN("mutexes are preferred for single holder semaphores\n" . $herecurr);
2624 }
2625# check for semaphores used as mutexes
2626 if ($line =~ /^.\s*init_MUTEX_LOCKED\s*\(/) {
2627 WARN("consider using a completion\n" . $herecurr); 2623 WARN("consider using a completion\n" . $herecurr);
2628 } 2624 }
2625
2629# recommend strict_strto* over simple_strto* 2626# recommend strict_strto* over simple_strto*
2630 if ($line =~ /\bsimple_(strto.*?)\s*\(/) { 2627 if ($line =~ /\bsimple_(strto.*?)\s*\(/) {
2631 WARN("consider using strict_$1 in preference to simple_$1\n" . $herecurr); 2628 WARN("consider using strict_$1 in preference to simple_$1\n" . $herecurr);
diff --git a/scripts/mkcompile_h b/scripts/mkcompile_h
index 23dbad80cce9..20fc5f65ba9a 100755
--- a/scripts/mkcompile_h
+++ b/scripts/mkcompile_h
@@ -4,7 +4,8 @@ TARGET=$1
4ARCH=$2 4ARCH=$2
5SMP=$3 5SMP=$3
6PREEMPT=$4 6PREEMPT=$4
7CC=$5 7PREEMPT_RT=$5
8CC=$6
8 9
9vecho() { [ "${quiet}" = "silent_" ] || echo "$@" ; } 10vecho() { [ "${quiet}" = "silent_" ] || echo "$@" ; }
10 11
@@ -47,6 +48,7 @@ UTS_VERSION="#$VERSION"
47CONFIG_FLAGS="" 48CONFIG_FLAGS=""
48if [ -n "$SMP" ] ; then CONFIG_FLAGS="SMP"; fi 49if [ -n "$SMP" ] ; then CONFIG_FLAGS="SMP"; fi
49if [ -n "$PREEMPT" ] ; then CONFIG_FLAGS="$CONFIG_FLAGS PREEMPT"; fi 50if [ -n "$PREEMPT" ] ; then CONFIG_FLAGS="$CONFIG_FLAGS PREEMPT"; fi
51if [ -n "$PREEMPT_RT" ] ; then CONFIG_FLAGS="$CONFIG_FLAGS RT"; fi
50UTS_VERSION="$UTS_VERSION $CONFIG_FLAGS $TIMESTAMP" 52UTS_VERSION="$UTS_VERSION $CONFIG_FLAGS $TIMESTAMP"
51 53
52# Truncate to maximum length 54# Truncate to maximum length