[LU-11614] Modify checkpatch.pl to ignore 80 Character warning for CERROR, CWARN and CDEBUG Created: 04/Nov/18 Updated: 09/Mar/22 |
|
| Status: | Open |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Minor |
| Reporter: | Arshad Hussain | Assignee: | Arshad Hussain |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Rank (Obsolete): | 9223372036854775807 | ||||||||
| Description |
|
Modify checkpatch.pl to ignore 80 Character warning for CERROR, CWARN and CDEBUG.
|
| Comments |
| Comment by Andreas Dilger [ 07/Nov/18 ] |
|
It would appear that the following patch is supposed to fix this, but it doesn't seem to be effective? Is it possible that the checkpatch.pl script being run against patches in Gerrit is not actually the contrib/scripts/checkpatch.pl, but another copy that is not being updated? At least some quick testing shows that CDEBUG does not generate an error locally. Author: Andreas Dilger <andreas.dilger@intel.com>
AuthorDate: Fri Jul 14 23:57:23 2017 -0600
LU-7589 build: update checkpatch to ~4.13-rc1 kernel
Update checkpatch.pl to v4.12-11743-g96d0d83 kernel version.
This version includes new functionality that allows us to
replace the Lustre specific dep_functions and dep_includes
checks added in our local version with the "spelling.txt"
file.
Allow CDEBUG/CERROR/LCONSOLE/DEBUG_REQ text strings to exceed
80 columns, as with upstream printk messages.
Test-Parameters: trivial
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I2a16bbd85722b15eb9188eb504bac3a2f63ebbe5
Reviewed-on: https://review.whamcloud.com/28055
|
| Comment by Arshad Hussain [ 07/Nov/18 ] |
|
Thanks Andreas. Ok, I see. And this is what I see on my dev environment. There is definitely some difference in what checkpatch.pl reports on my local and on gerrit. Thanks On latest master.
[lustre-release]# git log --format=oneline -2
715b3dac37748daeeecb44b8e7f4da96f6e7cc6f LU-6142 lod: Fix style issues for
lod_dev.c
ccf3674c9ca3ed8918c49163007708d1ae5db6f5 LU-10472 osd-ldiskfs: T10PI between
RPC and BIO
[lustre-release]#
The checksum of checkpatch.pl is [lustre-release]# md5sum ./contrib/scripts/checkpatch.pl 4db6466fb2029443b024740597bbce87 ./contrib/scripts/checkpatch.pl [lustre-release]# On local dev environment it throws single 80 char warning git show | ./contrib/scripts/checkpatch.pl <SNIP> WARNING: line over 80 characters #78: FILE: lustre/lod/lod_dev.c:323: + CERROR("%s broken update record! index %u "DFID".%u : rc = %d\n", <SNIP> However on the gerrit it throws 3 80 char warnings. Here is the gerrit review link : https://review.whamcloud.com/#/c/33594/
<snip>
3 style warning(s).
For more details please see
[https://wiki.hpdd.intel.com/display/PUB/Coding+Guidelines]
lustre/lod/lod_dev.c
Line 265:
(style) line over 80 characters
Line 323:
(style) line over 80 characters
Line 1148:
(style) line over 80 characters
<snip>
|