checkpatch: allow reporting C99 style comments

Presently C99 style comments are removed unconditionally before actual
patch validity check happens. This is a problem for some third party
projects which use but do not allow C99 style comments.

This patch adds yet another variable, named C99_COMMENT_TOLERANCE. If
it is included in the --ignore command line or config file options
list, C99 comments in the patch are reported as errors. Acked by
upstream maintainer (see

TEST=tried processing a patch with a C99 style comment, it passes the
     check just fine unless '--ignore C99_COMMENT_TOLERANCE' is
     present in .checkpatch.conf.

Change-Id: I5534b8e10be0aeec1e68dcb47ec80ec3f2b3fbdb
Signed-off-by: Vadim Bendebury <>
Reviewed-by: Douglas Anderson <>
Reviewed-by: Brian Norris <>
1 file changed