@@ -6,13 +6,13 @@
# And the rdma-core code is not mature enough to be warning safe
# set -e
-if [ $TRAVIS_COMMIT_RANGE != "" ]; then
+if [ "x$TRAVIS_COMMIT_RANGE" != "x" ]; then
cd buildlib/
- wget https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/plain/scripts/checkpatch.pl
- wget https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/plain/scripts/spelling.txt
+ wget -q https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/plain/scripts/checkpatch.pl \
+ https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/plain/scripts/spelling.txt
DIR_FOR_PATCHES_TO_CHECK=$(mktemp -d)
git format-patch --no-cover-letter $TRAVIS_COMMIT_RANGE -o $DIR_FOR_PATCHES_TO_CHECK/
- CHECKPATCH_OPT="--no-tree --ignore PREFER_KERNEL_TYPES,FILE_PATH_CHANGES,EXECUTE_PERMISSIONS,USE_NEGATIVE_ERRNO $DIR_FOR_PATCHES_TO_CHECK/*"
+ CHECKPATCH_OPT="--no-tree --ignore PREFER_KERNEL_TYPES,FILE_PATH_CHANGES,EXECUTE_PERMISSIONS,USE_NEGATIVE_ERRNO,CONST_STRUCT $DIR_FOR_PATCHES_TO_CHECK/*"
perl checkpatch.pl $CHECKPATCH_OPT
if [ $? -ne 0 ]; then
# We rerun checkpatch to simplify parsing and to understand if we failed for errors
- Use "x$FOO" notation to avoid failures if TRAVIS_COMMIT_RANGE is not defined - Use wget -q to be quieter - Disable CONST_STRUCT since it does not work Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com> --- buildlib/travis-checkpatch | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)