Whamcloud - gitweb
LU-16123 checkpatch: Suppress false warning 75/48375/2
authorArshad Hussain <arshad.hussain@aeoncomputing.com>
Mon, 29 Aug 2022 10:51:45 +0000 (16:21 +0530)
committerOleg Drokin <green@whamcloud.com>
Sat, 24 Sep 2022 20:29:01 +0000 (20:29 +0000)
commit3201740760d241dee935e4a66935b1bc81ac6380
tree7e0ad3e6b217ec2b35302a66135c3b5a36dc73e3
parente7f17c5e0c95dba3b80e192e4ca3628cc42e64b9
LU-16123 checkpatch: Suppress false warning

checkpatch throws a warning if it finds an "UPPERCASE"
on the left and side. According to the script/code it
is to avoid cases like "foo + BAR < baz".

Warnings example:
(style)  Comparisons should place the constant on \
the right side of the test

However for our case which throws a warning as false
positive.

"#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(3, 0, 53, 0)
...
"#endif

This patch suppresses the warning thrown by above
code only. This is not a generic "left hand" upper-case
warning suppressor which can be a genuine error. This
only handles the case where the left side is
LUSTRE_VERSION_CODE upper-case macro.

Test-Parameters: trivial
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: Ic8d8fccae035ba6e2ea28099bea6f163ceb0da0a
Reviewed-on: https://review.whamcloud.com/48375
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
contrib/scripts/checkpatch.pl