static-checks-coding-style.sh: Make it actually check the last patch

This script is documented as "Check coding style on the last patch", but
doesn't work like that and actually runs on already existinf commits on
the branch too. If some of those commits were merged with codestyle
exceptions, this leads to false positive codestyle errors, completely
unrelated to the current patch.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Change-Id: Ibf5763fdeecf2bacc64f0bf215dfbbcf31b3e480
diff --git a/script/static-checks/static-checks-coding-style.sh b/script/static-checks/static-checks-coding-style.sh
index 6d2ce79..1c074ef 100755
--- a/script/static-checks/static-checks-coding-style.sh
+++ b/script/static-checks/static-checks-coding-style.sh
@@ -17,15 +17,10 @@
 
 LOG_FILE=$(mktemp -t coding-style-check.XXXX)
 
-# Make the patch against the specified remote branch
-if [ -n "$CODING_STYLE_BASE_BRANCH" ]; then
-	BASE_COMMIT="BASE_COMMIT=$CODING_STYLE_BASE_BRANCH"
-fi
-
 chmod +x $CI_ROOT/script/static-checks/checkpatch.pl
 
 CHECKPATCH=$CI_ROOT/script/static-checks/checkpatch.pl \
-  make checkpatch &> "$LOG_FILE"
+  make checkpatch BASE_COMMIT=HEAD^ &> "$LOG_FILE"
 RES=$?
 
 if [[ "$RES" == 0 ]]; then