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-allmodconfig (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: In function 'ovs_dp_cmd_new':
>> net/openvswitch/datapath.c:1575:2: error: expected ';' before 'if'
     if (!dp->ports) {
     ^
>> net/openvswitch/datapath.c:1629:1: warning: label 'err_destroy_percpu' 
>> defined but not used [-Wunused-label]
    err_destroy_percpu:
    ^
>> 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:22:0:
>> include/linux/module.h:128:27: error: invalid storage class for function 
>> '__inittest'
     static inline initcall_t __inittest(void)  \
                              ^
>> net/openvswitch/datapath.c:2385:1: note: in expansion of macro 'module_init'
    module_init(dp_init);
    ^
>> net/openvswitch/datapath.c:2385:1: warning: 'alias' attribute ignored 
>> [-Wattributes]
   In file included from net/openvswitch/datapath.c:22:0:

vim +1575 net/openvswitch/datapath.c

ccb1352e76 Jesse Gross       2011-10-25  1539   struct nlattr **a = info->attrs;
ccb1352e76 Jesse Gross       2011-10-25  1540   struct vport_parms parms;
ccb1352e76 Jesse Gross       2011-10-25  1541   struct sk_buff *reply;
ccb1352e76 Jesse Gross       2011-10-25  1542   struct datapath *dp;
ccb1352e76 Jesse Gross       2011-10-25  1543   struct vport *vport;
46df7b8145 Pravin B Shelar   2012-02-22  1544   struct ovs_net *ovs_net;
15eac2a742 Pravin B Shelar   2012-08-23 @1545   int err, i;
ccb1352e76 Jesse Gross       2011-10-25  1546  
ccb1352e76 Jesse Gross       2011-10-25  1547   err = -EINVAL;
ccb1352e76 Jesse Gross       2011-10-25  1548   if (!a[OVS_DP_ATTR_NAME] || 
!a[OVS_DP_ATTR_UPCALL_PID])
ccb1352e76 Jesse Gross       2011-10-25  1549           goto err;
ccb1352e76 Jesse Gross       2011-10-25  1550  
6093ae9aba Jarno Rajahalme   2014-05-05  1551   reply = 
ovs_dp_cmd_alloc_info(info);
6093ae9aba Jarno Rajahalme   2014-05-05  1552   if (!reply)
6093ae9aba Jarno Rajahalme   2014-05-05  1553           return -ENOMEM;
ccb1352e76 Jesse Gross       2011-10-25  1554  
ccb1352e76 Jesse Gross       2011-10-25  1555   err = -ENOMEM;
ccb1352e76 Jesse Gross       2011-10-25  1556   dp = kzalloc(sizeof(*dp), 
GFP_KERNEL);
a8ec87f63f Janusz Wolak      2016-01-12  1557   if (!dp)
6093ae9aba Jarno Rajahalme   2014-05-05  1558           goto err_free_reply;
46df7b8145 Pravin B Shelar   2012-02-22  1559  
efd7ef1c19 Eric W. Biederman 2015-03-11  1560   ovs_dp_set_net(dp, 
sock_net(skb->sk));
ccb1352e76 Jesse Gross       2011-10-25  1561  
ccb1352e76 Jesse Gross       2011-10-25  1562   /* Allocate table. */
b637e4988c Pravin B Shelar   2013-10-04  1563   err = 
ovs_flow_tbl_init(&dp->table);
b637e4988c Pravin B Shelar   2013-10-04  1564   if (err)
ccb1352e76 Jesse Gross       2011-10-25  1565           goto err_free_dp;
ccb1352e76 Jesse Gross       2011-10-25  1566  
1c213bd24a WANG Cong         2014-02-13  1567   dp->stats_percpu = 
netdev_alloc_pcpu_stats(struct dp_stats_percpu);
ccb1352e76 Jesse Gross       2011-10-25  1568   if (!dp->stats_percpu) {
ccb1352e76 Jesse Gross       2011-10-25  1569           err = -ENOMEM;
ccb1352e76 Jesse Gross       2011-10-25  1570           goto err_destroy_table;
ccb1352e76 Jesse Gross       2011-10-25  1571   }
ccb1352e76 Jesse Gross       2011-10-25  1572  
a8ec87f63f Janusz Wolak      2016-01-12  1573   dp->ports = 
kmalloc_array(DP_VPORT_HASH_BUCKETS,
a8ec87f63f Janusz Wolak      2016-01-12  1574                            
sizeof(struct hlist_head), GFP_KERNEL)
15eac2a742 Pravin B Shelar   2012-08-23 @1575   if (!dp->ports) {
15eac2a742 Pravin B Shelar   2012-08-23  1576           err = -ENOMEM;
15eac2a742 Pravin B Shelar   2012-08-23  1577           goto err_destroy_percpu;
15eac2a742 Pravin B Shelar   2012-08-23  1578   }
15eac2a742 Pravin B Shelar   2012-08-23  1579  
15eac2a742 Pravin B Shelar   2012-08-23  1580   for (i = 0; i < 
DP_VPORT_HASH_BUCKETS; i++)
15eac2a742 Pravin B Shelar   2012-08-23  1581           
INIT_HLIST_HEAD(&dp->ports[i]);
15eac2a742 Pravin B Shelar   2012-08-23  1582  
ccb1352e76 Jesse Gross       2011-10-25  1583   /* Set up our datapath device. 
*/
ccb1352e76 Jesse Gross       2011-10-25  1584   parms.name = 
nla_data(a[OVS_DP_ATTR_NAME]);
ccb1352e76 Jesse Gross       2011-10-25  1585   parms.type = 
OVS_VPORT_TYPE_INTERNAL;
ccb1352e76 Jesse Gross       2011-10-25  1586   parms.options = NULL;
ccb1352e76 Jesse Gross       2011-10-25  1587   parms.dp = dp;
ccb1352e76 Jesse Gross       2011-10-25  1588   parms.port_no = OVSP_LOCAL;
5cd667b0a4 Alex Wang         2014-07-17  1589   parms.upcall_portids = 
a[OVS_DP_ATTR_UPCALL_PID];
ccb1352e76 Jesse Gross       2011-10-25  1590  
43d4be9cb5 Thomas Graf       2013-12-13  1591   ovs_dp_change(dp, a);
43d4be9cb5 Thomas Graf       2013-12-13  1592  
6093ae9aba Jarno Rajahalme   2014-05-05  1593   /* So far only local changes 
have been made, now need the lock. */
6093ae9aba Jarno Rajahalme   2014-05-05  1594   ovs_lock();
6093ae9aba Jarno Rajahalme   2014-05-05  1595  
ccb1352e76 Jesse Gross       2011-10-25  1596   vport = new_vport(&parms);
ccb1352e76 Jesse Gross       2011-10-25  1597   if (IS_ERR(vport)) {
ccb1352e76 Jesse Gross       2011-10-25  1598           err = PTR_ERR(vport);
ccb1352e76 Jesse Gross       2011-10-25  1599           if (err == -EBUSY)
ccb1352e76 Jesse Gross       2011-10-25  1600                   err = -EEXIST;
ccb1352e76 Jesse Gross       2011-10-25  1601  
44da5ae5fb Thomas Graf       2013-12-13  1602           if (err == -EEXIST) {
44da5ae5fb Thomas Graf       2013-12-13  1603                   /* An outdated 
user space instance that does not understand
44da5ae5fb Thomas Graf       2013-12-13  1604                    * the concept 
of user_features has attempted to create a new
44da5ae5fb Thomas Graf       2013-12-13  1605                    * datapath and 
is likely to reuse it. Drop all user features.
44da5ae5fb Thomas Graf       2013-12-13  1606                    */
44da5ae5fb Thomas Graf       2013-12-13  1607                   if 
(info->genlhdr->version < OVS_DP_VER_FEATURES)
44da5ae5fb Thomas Graf       2013-12-13  1608                           
ovs_dp_reset_user_features(skb, info);
44da5ae5fb Thomas Graf       2013-12-13  1609           }
44da5ae5fb Thomas Graf       2013-12-13  1610  
15eac2a742 Pravin B Shelar   2012-08-23  1611           goto 
err_destroy_ports_array;
ccb1352e76 Jesse Gross       2011-10-25  1612   }
ccb1352e76 Jesse Gross       2011-10-25  1613  
6093ae9aba Jarno Rajahalme   2014-05-05  1614   err = ovs_dp_cmd_fill_info(dp, 
reply, info->snd_portid,
6093ae9aba Jarno Rajahalme   2014-05-05  1615                              
info->snd_seq, 0, OVS_DP_CMD_NEW);
6093ae9aba Jarno Rajahalme   2014-05-05  1616   BUG_ON(err < 0);
ccb1352e76 Jesse Gross       2011-10-25  1617  
46df7b8145 Pravin B Shelar   2012-02-22  1618   ovs_net = 
net_generic(ovs_dp_get_net(dp), ovs_net_id);
59a35d60af Pravin B Shelar   2013-07-30  1619   
list_add_tail_rcu(&dp->list_node, &ovs_net->dps);
8e4e1713e4 Pravin B Shelar   2013-04-15  1620  
8e4e1713e4 Pravin B Shelar   2013-04-15  1621   ovs_unlock();
ccb1352e76 Jesse Gross       2011-10-25  1622  
2a94fe48f3 Johannes Berg     2013-11-19  1623   
ovs_notify(&dp_datapath_genl_family, reply, info);
ccb1352e76 Jesse Gross       2011-10-25  1624   return 0;
ccb1352e76 Jesse Gross       2011-10-25  1625  
15eac2a742 Pravin B Shelar   2012-08-23  1626  err_destroy_ports_array:
6093ae9aba Jarno Rajahalme   2014-05-05  1627   ovs_unlock();
15eac2a742 Pravin B Shelar   2012-08-23  1628   kfree(dp->ports);
ccb1352e76 Jesse Gross       2011-10-25 @1629  err_destroy_percpu:
ccb1352e76 Jesse Gross       2011-10-25  1630   free_percpu(dp->stats_percpu);
ccb1352e76 Jesse Gross       2011-10-25  1631  err_destroy_table:
9b996e544a Pravin B Shelar   2014-05-06  1632   
ovs_flow_tbl_destroy(&dp->table);

:::::: The code at line 1575 was first introduced by commit
:::::: 15eac2a74277bc7de68a7c2a64a7c91b4b6f5961 openvswitch: Increase maximum 
number of datapath ports.

:::::: TO: Pravin B Shelar <pshe...@nicira.com>
:::::: CC: Jesse Gross <je...@nicira.com>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to