.github/SPDX-README.md: clarify .c/.h difference and applicability

Explain when this file applies and why there is a .c/.h difference.

I still don't understand why .c file don't use /* SPDX */ but I think
it's still worth quoting a tiny bit from the official documentation
anyway.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This commit is contained in:
Marc Herbert 2023-01-19 11:25:42 -08:00 committed by Liam Girdwood
parent a5dfa5669e
commit 1db950e078
1 changed files with 6 additions and 3 deletions

View File

@ -1,9 +1,12 @@
Read this section if there are some SPDX warnings above.
Pleasing checkpatch is hard when adding new files because:
- checkpatch wants a different SPDX style for .c versus .h files!
- SOF rejects C99 comments starting with //
- checkpatch requests a different SPDX style for .c versus .h files.
This is because some .h files are included in linker scripts or
assembly code.
- Some SOF reviewers reject C99 comments starting with //
The trick is to keep the SPDX separate. See solution below.
A trick is to keep the SPDX separate, see solution below.
References:
- https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/license-rules.rst#n71