Whamcloud - gitweb
LU-6142 build: ignore deleted lines for comment context 43/53543/3
authorAndreas Dilger <adilger@whamcloud.com>
Sat, 23 Dec 2023 01:24:18 +0000 (18:24 -0700)
committerOleg Drokin <green@whamcloud.com>
Wed, 10 Jan 2024 07:28:05 +0000 (07:28 +0000)
commitfdb7dbadd869f5b6ec46d868e78c12e321a01fb5
treed683cb0e453dfb7a937e4c85426c93cf28943329
parente81805244476f1d3ffb5a2ecb0a85f54b936ce51
LU-6142 build: ignore deleted lines for comment context

checkpatch should skip removed lines when checking comments context.
Otherwise, false "WARNING: memory barrier without comment" and other
messages can be reported when a comment exists on the previous line
but is hidden by the removed line.

For example, a change like below was previously incorrectly flagged:

        /* matched by smp_store_release() in some_function() */
 -      if (smp_load_acquire(&list->tail) == head))
 +      if (smp_load_acquire(&list->tail) == head) && flags == 0)

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Ib0cd11e66a5b6a3c4505222eb89ff6479246023a
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/53543
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
contrib/scripts/checkpatch.pl