diff mbox

[rdma-core,06/21] Tidy travis sparse check

Message ID 1500926429-31822-7-git-send-email-jgunthorpe@obsidianresearch.com (mailing list archive)
State Accepted
Headers show

Commit Message

Jason Gunthorpe July 24, 2017, 8 p.m. UTC
- 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(-)
diff mbox

Patch

diff --git a/buildlib/travis-checkpatch b/buildlib/travis-checkpatch
index 8f80d025a96828..ef7df4e62df6d6 100755
--- a/buildlib/travis-checkpatch
+++ b/buildlib/travis-checkpatch
@@ -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