diff options
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/checkpatch.pl | 9 | ||||
| -rwxr-xr-x | scripts/mkcompile_h | 4 |
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 | |||
| 4 | ARCH=$2 | 4 | ARCH=$2 |
| 5 | SMP=$3 | 5 | SMP=$3 |
| 6 | PREEMPT=$4 | 6 | PREEMPT=$4 |
| 7 | CC=$5 | 7 | PREEMPT_RT=$5 |
| 8 | CC=$6 | ||
| 8 | 9 | ||
| 9 | vecho() { [ "${quiet}" = "silent_" ] || echo "$@" ; } | 10 | vecho() { [ "${quiet}" = "silent_" ] || echo "$@" ; } |
| 10 | 11 | ||
| @@ -47,6 +48,7 @@ UTS_VERSION="#$VERSION" | |||
| 47 | CONFIG_FLAGS="" | 48 | CONFIG_FLAGS="" |
| 48 | if [ -n "$SMP" ] ; then CONFIG_FLAGS="SMP"; fi | 49 | if [ -n "$SMP" ] ; then CONFIG_FLAGS="SMP"; fi |
| 49 | if [ -n "$PREEMPT" ] ; then CONFIG_FLAGS="$CONFIG_FLAGS PREEMPT"; fi | 50 | if [ -n "$PREEMPT" ] ; then CONFIG_FLAGS="$CONFIG_FLAGS PREEMPT"; fi |
| 51 | if [ -n "$PREEMPT_RT" ] ; then CONFIG_FLAGS="$CONFIG_FLAGS RT"; fi | ||
| 50 | UTS_VERSION="$UTS_VERSION $CONFIG_FLAGS $TIMESTAMP" | 52 | UTS_VERSION="$UTS_VERSION $CONFIG_FLAGS $TIMESTAMP" |
| 51 | 53 | ||
| 52 | # Truncate to maximum length | 54 | # Truncate to maximum length |
