Add lint_diff.sh, which runs checkpatch on git diff to either HEAD~1 (if
the tree is clean) or HEAD. This can be used as pre-commit hook, and
it's what jenkins will run.
Add lint_all.sh, which runs checkpatch on a whole repository to test if
the rules we are checking for make sense in Osmocom context.
Related: OS#5087
Change-Id: I1d02c169b05fb05b87209a444a5ddb86efc99d04
Prepare to run checkpatch on patches submitted to gerrit to point out
various linting errors automatically, such as { after functions not
placed on a new line, or common spelling errors.
Import version from 7e6cdd7f ("checkpatch: improve ALLOC_ARRAY_ARGS test")
of linux.git.
Related: OS#5087
Related: https://osmocom.org/projects/cellular-infrastructure/wiki/Linting
Change-Id: I58571a0409e79d88d37e8328f41a540a58cfb198