[ovs-dev] [PATCH] Openvswitch: datapath.c: Fixed coding style warnings.

kbuild test robot lkp at intel.com
Tue Jan 12 22:31:05 UTC 2016


Hi Janusz,

[auto build test ERROR on net-next/master]
[also build test ERROR on v4.4 next-20160112]
[if your patch is applied to the wrong git tree, please drop us a note to help improving the system]

url:    https://github.com/0day-ci/linux/commits/Janusz-Wolak/Openvswitch-datapath-c-Fixed-coding-style-warnings/20160113-060033
config: i386-randconfig-x006-201602 (attached as .config)
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All error/warnings (new ones prefixed by >>):

   net/openvswitch/datapath.c:1545:11: warning: unused variable 'i' [-Wunused-variable]
     int err, i;
              ^
   net/openvswitch/datapath.c: In function 'lookup_vport':
   net/openvswitch/datapath.c:1929:12: error: invalid storage class for function 'ovs_vport_cmd_new'
    static int ovs_vport_cmd_new(struct sk_buff *skb, struct genl_info *info)
               ^
   net/openvswitch/datapath.c:1929:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
    static int ovs_vport_cmd_new(struct sk_buff *skb, struct genl_info *info)
    ^
   net/openvswitch/datapath.c:2006:12: error: invalid storage class for function 'ovs_vport_cmd_set'
    static int ovs_vport_cmd_set(struct sk_buff *skb, struct genl_info *info)
               ^
   net/openvswitch/datapath.c:2057:12: error: invalid storage class for function 'ovs_vport_cmd_del'
    static int ovs_vport_cmd_del(struct sk_buff *skb, struct genl_info *info)
               ^
   net/openvswitch/datapath.c:2094:12: error: invalid storage class for function 'ovs_vport_cmd_get'
    static int ovs_vport_cmd_get(struct sk_buff *skb, struct genl_info *info)
               ^
   net/openvswitch/datapath.c:2124:12: error: invalid storage class for function 'ovs_vport_cmd_dump'
    static int ovs_vport_cmd_dump(struct sk_buff *skb, struct netlink_callback *cb)
               ^
   net/openvswitch/datapath.c:2176:12: error: initializer element is not constant
       .doit = ovs_vport_cmd_new
               ^
   net/openvswitch/datapath.c:2176:12: note: (near initialization for 'dp_vport_genl_ops[0].doit')
   net/openvswitch/datapath.c:2181:12: error: initializer element is not constant
       .doit = ovs_vport_cmd_del
               ^
   net/openvswitch/datapath.c:2181:12: note: (near initialization for 'dp_vport_genl_ops[1].doit')
   net/openvswitch/datapath.c:2186:12: error: initializer element is not constant
       .doit = ovs_vport_cmd_get,
               ^
   net/openvswitch/datapath.c:2186:12: note: (near initialization for 'dp_vport_genl_ops[2].doit')
   net/openvswitch/datapath.c:2187:14: error: initializer element is not constant
       .dumpit = ovs_vport_cmd_dump
                 ^
   net/openvswitch/datapath.c:2187:14: note: (near initialization for 'dp_vport_genl_ops[2].dumpit')
   net/openvswitch/datapath.c:2192:12: error: initializer element is not constant
       .doit = ovs_vport_cmd_set,
               ^
   net/openvswitch/datapath.c:2192:12: note: (near initialization for 'dp_vport_genl_ops[3].doit')
   net/openvswitch/datapath.c:2212:2: error: initializer element is not constant
     &dp_vport_genl_family,
     ^
   net/openvswitch/datapath.c:2212:2: note: (near initialization for 'dp_genl_families[1]')
   net/openvswitch/datapath.c:2217:13: error: invalid storage class for function 'dp_unregister_genl'
    static void dp_unregister_genl(int n_families)
                ^
   net/openvswitch/datapath.c:2225:12: error: invalid storage class for function 'dp_register_genl'
    static int dp_register_genl(void)
               ^
   net/openvswitch/datapath.c:2243:23: error: invalid storage class for function 'ovs_init_net'
    static int __net_init ovs_init_net(struct net *net)
                          ^
   net/openvswitch/datapath.c:2253:24: error: invalid storage class for function 'list_vports_from_net'
    static void __net_exit list_vports_from_net(struct net *net, struct net *dnet,
                           ^
   net/openvswitch/datapath.c:2276:24: error: invalid storage class for function 'ovs_exit_net'
    static void __net_exit ovs_exit_net(struct net *dnet)
                           ^
   net/openvswitch/datapath.c:2306:10: error: initializer element is not constant
     .init = ovs_init_net,
             ^
   net/openvswitch/datapath.c:2306:10: note: (near initialization for 'ovs_net_ops.init')
   net/openvswitch/datapath.c:2307:10: error: initializer element is not constant
     .exit = ovs_exit_net,
             ^
   net/openvswitch/datapath.c:2307:10: note: (near initialization for 'ovs_net_ops.exit')
   net/openvswitch/datapath.c:2312:19: error: invalid storage class for function 'dp_init'
    static int __init dp_init(void)
                      ^
   net/openvswitch/datapath.c:2372:13: error: invalid storage class for function 'dp_cleanup'
    static void dp_cleanup(void)
                ^
   In file included from net/openvswitch/datapath.c:21:0:
   net/openvswitch/datapath.c:2385:13: error: initializer element is not constant
    module_init(dp_init);
                ^
   include/linux/init.h:184:58: note: in definition of macro '__define_initcall'
     __attribute__((__section__(".initcall" #id ".init"))) = fn; \
                                                             ^
   include/linux/init.h:219:24: note: in expansion of macro 'device_initcall'
    #define __initcall(fn) device_initcall(fn)
                           ^
   include/linux/module.h:84:24: note: in expansion of macro '__initcall'
    #define module_init(x) __initcall(x);
                           ^
   net/openvswitch/datapath.c:2385:1: note: in expansion of macro 'module_init'
    module_init(dp_init);
    ^
   net/openvswitch/datapath.c:2386:13: error: initializer element is not constant
    module_exit(dp_cleanup);
                ^
   include/linux/init.h:222:50: note: in definition of macro '__exitcall'
     static exitcall_t __exitcall_##fn __exit_call = fn
                                                     ^
   net/openvswitch/datapath.c:2386:1: note: in expansion of macro 'module_exit'
    module_exit(dp_cleanup);
    ^
>> include/linux/init.h:222:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
     static exitcall_t __exitcall_##fn __exit_call = fn
     ^
   include/linux/module.h:96:24: note: in expansion of macro '__exitcall'
    #define module_exit(x) __exitcall(x);
                           ^
   net/openvswitch/datapath.c:2386:1: note: in expansion of macro 'module_exit'
    module_exit(dp_cleanup);
    ^
   In file included from include/linux/module.h:18:0,
                    from net/openvswitch/datapath.c:22:
   include/linux/moduleparam.h:27:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
      struct __UNIQUE_ID(name) {}
      ^
   include/linux/module.h:171:32: note: in expansion of macro '__MODULE_INFO'
    #define MODULE_INFO(tag, info) __MODULE_INFO(tag, tag, info)
                                   ^
   include/linux/module.h:218:42: note: in expansion of macro 'MODULE_INFO'
    #define MODULE_DESCRIPTION(_description) MODULE_INFO(description, _description)
                                             ^
   net/openvswitch/datapath.c:2388:1: note: in expansion of macro 'MODULE_DESCRIPTION'
    MODULE_DESCRIPTION("Open vSwitch switching datapath");
    ^
   In file included from include/linux/init.h:4:0,
                    from net/openvswitch/datapath.c:21:
>> include/linux/compiler-gcc.h:181:45: error: expected declaration or statement at end of input
    #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
                                                ^
   include/linux/compiler.h:50:23: note: in definition of macro '___PASTE'
    #define ___PASTE(a,b) a##b
                          ^
>> include/linux/compiler-gcc.h:181:29: note: in expansion of macro '__PASTE'
    #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
                                ^
>> include/linux/compiler.h:51:22: note: in expansion of macro '___PASTE'
    #define __PASTE(a,b) ___PASTE(a,b)
                         ^
   include/linux/compiler-gcc.h:181:37: note: in expansion of macro '__PASTE'
    #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
                                        ^
>> include/linux/moduleparam.h:27:10: note: in expansion of macro '__UNIQUE_ID'
      struct __UNIQUE_ID(name) {}
             ^
   include/linux/module.h:171:32: note: in expansion of macro '__MODULE_INFO'
    #define MODULE_INFO(tag, info) __MODULE_INFO(tag, tag, info)
                                   ^
   include/linux/module.h:209:34: note: in expansion of macro 'MODULE_INFO'
    #define MODULE_LICENSE(_license) MODULE_INFO(license, _license)
                                     ^
>> net/openvswitch/datapath.c:2389:1: note: in expansion of macro 'MODULE_LICENSE'
    MODULE_LICENSE("GPL");
    ^

vim +/MODULE_LICENSE +2389 net/openvswitch/datapath.c

ccb1352e76 Jesse Gross     2011-10-25  2373  {
ccb1352e76 Jesse Gross     2011-10-25  2374  	dp_unregister_genl(ARRAY_SIZE(dp_genl_families));
62b9c8d037 Thomas Graf     2014-10-22  2375  	ovs_netdev_exit();
ccb1352e76 Jesse Gross     2011-10-25  2376  	unregister_netdevice_notifier(&ovs_dp_device_notifier);
46df7b8145 Pravin B Shelar 2012-02-22  2377  	unregister_pernet_device(&ovs_net_ops);
46df7b8145 Pravin B Shelar 2012-02-22  2378  	rcu_barrier();
ccb1352e76 Jesse Gross     2011-10-25  2379  	ovs_vport_exit();
ccb1352e76 Jesse Gross     2011-10-25  2380  	ovs_flow_exit();
5b9e7e1607 Jiri Pirko      2014-06-26  2381  	ovs_internal_dev_rtnl_link_unregister();
971427f353 Andy Zhou       2014-09-15  2382  	action_fifos_exit();
ccb1352e76 Jesse Gross     2011-10-25  2383  }
ccb1352e76 Jesse Gross     2011-10-25  2384  
ccb1352e76 Jesse Gross     2011-10-25  2385  module_init(dp_init);
ccb1352e76 Jesse Gross     2011-10-25  2386  module_exit(dp_cleanup);
ccb1352e76 Jesse Gross     2011-10-25  2387  
ccb1352e76 Jesse Gross     2011-10-25  2388  MODULE_DESCRIPTION("Open vSwitch switching datapath");
ccb1352e76 Jesse Gross     2011-10-25 @2389  MODULE_LICENSE("GPL");

:::::: The code at line 2389 was first introduced by commit
:::::: ccb1352e76cff0524e7ccb2074826a092dd13016 net: Add Open vSwitch kernel components.

:::::: TO: Jesse Gross <jesse at nicira.com>
:::::: CC: Jesse Gross <jesse at nicira.com>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation



More information about the dev mailing list