Whamcloud - gitweb
LU-5160 build: warn on deprecated CFS_LIST_HEAD uses 49/10649/2
authorEmoly Liu <emoly.liu@intel.com>
Thu, 5 Jun 2014 22:35:54 +0000 (06:35 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 16 Jun 2014 03:48:56 +0000 (03:48 +0000)
Change checkpatch.pl script to report:
CFS_LIST_HEAD() is deprecated, use "struct list_head foo =
LIST_HEAD_INIT(foo);" instead.

Signed-off-by: Emoly Liu <emoly.liu@intel.com>
Change-Id: Ic667d4598c0740e2802416dd3800dacdaf378e73
Reviewed-on: http://review.whamcloud.com/10649
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
contrib/scripts/checkpatch.pl

index 893619f..b91310a 100755 (executable)
@@ -404,7 +404,7 @@ my %dep_functions = (
        'cfs_inode_t',                  'struct inode',
 
        'CFS_INIT_LIST_HEAD',           'INIT_LIST_HEAD',
-       'CFS_LIST_HEAD',                'LIST_HEAD',
+       'CFS_LIST_HEAD',                'struct list_head foo = LIST_HEAD_INIT(foo);',
        'CFS_LIST_HEAD_INIT',           'LIST_HEAD_INIT',
        'cfs_list_add',                 'list_add',
        'cfs_list_add_tail',            'list_add_tail',