[Linux-kernel-mentees] git_commit_id false positives

Dwaipayan Ray dwaipayanray1 at gmail.com
Tue Nov 10 18:41:05 UTC 2020


Hi,
I was looking into GIT_COMMIT_ID warnings for checkpatch
and certainly there are false positives which needs to be fixed
as also said by a previous discussion.

But before fixing it, I would like your comments on what should
be fixed and what shouldn't considering the added code can
be complex.

The data below is an evaluation of about 50k commits from v5.4.

$ cat checkpatch_out_50k.txt | grep -A3 "GIT_COMMIT_ID" \
   | grep "References" | wc -l
45

First of all there are 45 warnings of type:
References: 2248a28384fe ("drm/i915/gen8+: Add RC6 CTX corruption WA")
References: 860afa086841 ("drm/i915/gt: Flush gen7 even harder"), etc.

Should references be simply exempt from this check? I don't
know much about it. But seems checkpatch is incorrect here.

For other messages,
$ cat checkpatch_out_50k.txt | grep -A3 "GIT_COMMIT_ID"  | \
  grep -v "GIT_COMMIT_ID" |     grep -P "^\s*[a-z0-9]{12,}" | wc -l
468

There were 468 missing "commit" word before the GIT SHA. Some
of these were due to split lines. I think that could be fixed with some
effort.

And finally the other fixable warning is for those with split commit
titles itself.

Other than that, there was also this particular case with non escaped
quotes within the commit title.
Like:
commit 97a32539b956 ("proc: convert everything to "struct proc_ops"")
Should this be handled as well. Or is this a human error? I am not quite
sure.

Thanks,
Dwaipayan.


More information about the Linux-kernel-mentees mailing list