[Linux-kernel-mentees] [PATCH v2] checkpatch: handle line break between commit and hash value

Lukas Bulwahn lukas.bulwahn at gmail.com
Sat Sep 12 11:17:33 UTC 2020

On Sat, 12 Sep 2020, Ayush wrote:

> checkpatch.pl checks for proper references to other commits with
> the intended format, commit <12+ characters of SHA-1 ID> ("<commit
> message") and warns about typical mistakes. Currently, it does
> not handle the case where there is a line break between commit and the
> hash value.
> It falsely warns that the hash is not prefixed by the word commit.
> This adds new conditions to parse and identify such commits and

s/commit/commit references/

> to not report an error in such cases.

> following type of commit reference is handled:
> - commit
> f4d51dffc6c01 ("Linux 5.9-rc4")
This part above is superfluous; I do not see the added value here.
> This issue was discovered through a thorough analysis of checkpatch.pl
> errors and warnings of type GIT_COMMIT_ID on commits between v5.7 and v5.8.
> Before applying this patch, checkpatch.pl reported 342 errors of type
> GIT_COMMIT_ID. After applying patch, errors reduced to 284.

Impressive numbers of improvement if that is true and not a bug.

I am currently running my evaluation to see if I see the same numbers; I 
will get back to you.


More information about the Linux-kernel-mentees mailing list