Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-11614

Modify checkpatch.pl to ignore 80 Character warning for CERROR, CWARN and CDEBUG

Details

    • Improvement
    • Resolution: Fixed
    • Minor
    • None
    • None
    • None
    • 9223372036854775807

    Description

      Modify checkpatch.pl to ignore 80 Character warning for CERROR, CWARN and CDEBUG.

       

       

      Attachments

        Issue Links

          Activity

            [LU-11614] Modify checkpatch.pl to ignore 80 Character warning for CERROR, CWARN and CDEBUG

            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>
             
            arshad512 Arshad Hussain added a comment - 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>

            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
            
            adilger Andreas Dilger added a comment - 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

            People

              arshad512 Arshad Hussain
              arshad512 Arshad Hussain
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: