check patch: allow C99 comments#5046
Conversation
This is a logical revert of eb45907 Based on recently merged thesofproject#4941, C99 comments are now OK. I never found any rationale or even written down coding style for excluding them in the first place. Signed-off-by: Marc Herbert <marc.herbert@intel.com>
|
I don't see how that PR hints at C99 comments being OK. They're only used for SPDX. I do agree that avoiding C99 comments isn't exactly the best thing, especially given that we don't have compilers that can't handle them I think. Holding off on reviewing for now (no reason to reject, just not sure if this is fully to be accepted) |
https://github.com/thesofproject/sof/pull/4941/files uses In other files, C99 comments are not used at all, not even for SPDX. Anyway, 4941 is not that important. The question this PR is asking is: does everyone agree to allow C99 comments? I suspect they've already been used for ages. |
I think I got it: some people seem to assume SPDX magically includes and interprets the free form copyright notice following the SPDX-License-Identifier line. It does not, it's not magical. It takes a bit more effort to make copyright information known to SPDX, example from the https://spdx.github.io/spdx-spec/file-tags/ Annex (Informative) Off-topic sorry. |
|
@marc-hb have you told this to skip CI ? cant see any skip request in the PR, but the CI has stalled ? |
|
I didn't ask to SKIP CI and I don't know why it stalled this time. It stalled after running checkpatch and this is a pure checkpatch configuration change which... does not even apply to sof-ci/jenkins as it always accepted C99 comments, see example in #4941. sof-ci/jenkins has been running fine in other PRs so I didn't care. |
|
SOFCI TEST EDIT: many unavailable devices in https://sof-ci.01.org/sofpr/PR5046/build11320/devicetest/ but everything else is green. |
|
Can one of the admins verify this patch? |
|
So no objection from anyone about C99 // comments in any SOF code review anymore? Speak now or forever hold your peace... PS: while very similar, the Linux kernel has its own codestyle and policies not defined by SOF. |
I thought it was, but apparently it's still not: #5110 (comment) Need to practice my tea leaves reading? |
|
For even more fun: SPDX requires different comment style for .h files versus .c files, see 82220c8 |
|
@marc-hb everyone knows that, the real question here is why 😨 |
|
Apparently because .h files are often enough included in linnker scripts or assembly. Please help review this minor SPDX-README.md clarification: |
This is a logical revert of eb45907
Based on recently merged #4941, C99 comments are now OK. I never found
any rationale or even written down coding style for excluding them in
the first place.
Signed-off-by: Marc Herbert marc.herbert@intel.com