Commit Graph

16 Commits (6e32887f917b8e5a870e2d485139820ee5161b4f)

Author SHA1 Message Date
Paul Fertser a9a5c17cf5 checkpatch: fix check for the FSF address
Commit 4525c0a4c4 cherry-picked check
for the FSF address presence from upstream. However, it has a typo
resulting in this obscure error when triggered:

Use of uninitialized value in concatenation (.) or string at /home/jenkins/.jenkins/jobs/openocd-gerrit/workspace/tools/scripts/checkpatch.pl line 1258.
ERROR:

This patch fixes it.

Change-Id: Ia417ef4782d21c8b3f1d39de88c4ab850a5a6630
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/2414
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2015-01-08 23:05:24 +00:00
Antony Pavlov 4525c0a4c4 checkpatch.pl: check for the FSF mailing address
This check code is imported from Linux v3.17 checkpatch.pl.

Change-Id: If39d834ee9b6131bccc92de38fd7c108650bd2f1
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Reviewed-on: http://openocd.zylin.com/2341
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Tested-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-11-24 22:23:38 +00:00
Antony Pavlov c5d8988316 checkpatch.pl: check for openocd tree, not for kernel tree
checkpatch.pl looks for linux kernel specific paths and files
to check source tree. As openocd misses kernel files it ends
with this error message:

    Must be run from the top-level dir. of a kernel tree

This patch also renames 'kernel' -> 'openocd'
in source tree-related messages.

Due to checkpatch checking modifications on itself, lift the
restriction on having no spaces at the start of a line for Perl
scripts. This can be readded back later.

Change-Id: I89b7ca976bef5e13785bd3a43e597c9feb4c2df4
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Reviewed-on: http://openocd.zylin.com/2339
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-11-24 22:23:14 +00:00
Paul Fertser 75b4cbe356 checkpatch: correct false positives reporting instructions
Change-Id: Ib45d3db4436a5df5215f2c2d8b8f9a6d48d5f348
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/1786
Tested-by: jenkins
Reviewed-by: Mathias Küster <kesmtp@freenet.de>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-10-29 22:56:05 +00:00
Paul Fertser cadd519715 checkpatch: treat jenkins as valid email
This is needed to avoid checkpatch barking on already committed patches.

Change-Id: Ic2b4cfa04c8230d45c68bbf6b370841f682b32d6
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/1785
Tested-by: jenkins
Reviewed-by: Jens Bauer <jens@gpio.dk>
Reviewed-by: Mathias Küster <kesmtp@freenet.de>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-10-29 22:55:55 +00:00
Paul Fertser bb3cd6ec43 checkpatch: add logging functions
It's commonly considered that user-visible strings should not be split
to different lines in the sources to ease grepping for them. Hence,
checkpatch traditionally makes an exception for logging functions,
lines having them can be of arbitrary length.

OpenOCD uses different (from Linux, the kernel) names, so they need to
be added to avoid false positives.

Change-Id: I1198c1ffc62b5403d97efa41e665c81a5b6bb3a3
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/1696
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-10-15 20:40:23 +00:00
Spencer Oliver 2af5b97ba3 checkpatch: remove __packed and __aligned checks
These checks are specific to linux kernel.

Change-Id: Ia9b837b5609922a897822f1d55f96f04c0f1f838
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/424
Tested-by: jenkins
2012-02-06 10:57:55 +00:00
Spencer Oliver 3da783f628 checkpatch: increase line length to 120
Change-Id: I963385d0a4880f2b1e55208c8dfe65c1870ac6e1
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/422
Tested-by: jenkins
2012-02-06 10:54:27 +00:00
Spencer Oliver 9ad57e96b3 checkpatch: remove volatile check
We may enable this again - but at the moment is causing extra issues
with reformatting the codebase.

Change-Id: I5a2aaaa32ad784e011dff3079ff45501452c1819
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/414
2012-02-06 10:48:42 +00:00
Spencer Oliver 2f6f7c442d checkpatch: remove typedef check
We may enable this again - but at the moment is causing extra issues
with reformatting the codebase.

Change-Id: Ic64310a20605a0ef3206caa15c8e6c8ee655bfda
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/413
Tested-by: jenkins
2012-02-06 10:47:44 +00:00
Spencer Oliver 667d510dab checkpatch: fix false indent trigger
we have changed the indent to 4 to match OpenOCD coding style.

Change-Id: I4870a3410eb20fc2f6df6a3e5891d4d4e598131a
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/285
Tested-by: jenkins
2011-12-16 11:10:47 +00:00
Spencer Oliver 09571d62bc checkpatch: disable extern and switch indent checks
We allow extern's in c files so disable checkpatch checks.

Change-Id: Ia649585cd70ec45289c4edaf26c1fd773a140db4
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/284
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
2011-12-16 10:39:43 +00:00
Erik Ahlén 164450a015 Change checkpatch.pl tab expanding to 4 characters.
The C coding style guide says that tab width is 4 characters but checkpatch.pl expands tabs to 8 characters which produces false negatives.

Change-Id: Ibdabbb55269b7cf6bcd38042cccb8bd235e42ce2
Signed-off-by: Erik Ahlén <erik.ahlen@avalonenterprise.com>
Reviewed-on: http://openocd.zylin.com/275
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2011-12-16 09:39:23 +00:00
Spencer Oliver e875e321f1 tools: fix permissions
Change-Id: I9419138dd2972304daf215594ca917ac8eb7fcda
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
2011-11-04 10:00:30 +00:00
Spencer Oliver ce3905a29f checkpatch: increase line length warning to 100
Change-Id: Ief0445ea6581929b3ffdcf8bc644ce5f27b392c4
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
2011-11-03 23:09:05 +00:00
Spencer Oliver efbafd9dc8 tools: add checkpatch script
Change-Id: I3579028fc1c6ee8bea58c82e5f0eecba7794d7cb
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
2011-11-03 19:22:19 +00:00