Skip to content
Commit 56294112 authored by Joe Perches's avatar Joe Perches Committed by Linus Torvalds
Browse files

checkpatch: fix SPDX license check with --root=<path>

checkpatch uses the in-kernel script spdxcheck.py to validate the specific
license in a file or script.

This check can currently fail for a couple reasons:

o spdxcheck.py assumes the existence of git tree that may not
  exist for a bare source tree from something like a tarball
o the spdxcheck.py must be run from the top level root directory

So add a git existence test and set the subprocess subdirectory.

Link: http://lkml.kernel.org/r/2b32864324ae9c92948b002ec4c0c22409ed98f1.camel@perches.com


Signed-off-by: default avatarJoe Perches <joe@perches.com>
Reported-by: default avatarCharlemagne Lasse <charlemagnelasse@gmail.com>
Tested-by: default avatarCharlemagne Lasse <charlemagnelasse@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 490b292c
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment