1. 27 4月, 2016 4 次提交
  2. 23 4月, 2016 1 次提交
  3. 06 4月, 2016 2 次提交
    • A
      i40iw: avoid potential uninitialized variable use · 2fe78571
      Arnd Bergmann 提交于
      gcc finds that the i40iw_make_cm_node() function in the recently added
      i40iw driver uses an uninitilized variable as an index into an array
      if CONFIG_IPV6 is disabled and the driver uses IPv6 mode:
      
      drivers/infiniband/hw/i40iw/i40iw_cm.c: In function 'i40iw_make_cm_node':
      drivers/infiniband/hw/i40iw/i40iw_cm.c:2206:52: error: 'arpindex' may be used uninitialized in this function [-Werror=maybe-uninitialized]
        ether_addr_copy(cm_node->rem_mac, iwdev->arp_table[arpindex].mac_addr);
      
      As far as I can tell, this code path can not be used because the ipv4
      variable is always set with CONFIG_IPV6 is disabled, but it's better
      to be sure and prevent the undefined behavior, as well as shut up
      that warning in a proper way.
      
      This adds an 'else' clause for the case we get the warning about,
      causing the function to return an error in a controlled way.
      To avoid adding extra mess with combined io()/#ifdef clauses,
      I'm also converting the existing #ifdef into a more readable
      if(IS_ENABLED()) check.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Fixes: f27b4746 ("i40iw: add connection management code")
      Acked-by: NMustafa Ismail <Mustafa.ismail@intel.com>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      2fe78571
    • A
      IB/mlx5: fix VFs callback function prototypes · 9967c70a
      Arnd Bergmann 提交于
      The previous patch that added a couple of callback functions put
      the declarations inside of an #ifdef CONFIG_INFINIBAND_ON_DEMAND_PAGING,
      which causes the build to fail if that option is disabled:
      
      drivers/infiniband/hw/mlx5/main.c: In function 'mlx5_ib_add':
      drivers/infiniband/hw/mlx5/main.c:2358:31: error: 'mlx5_ib_get_vf_config' undeclared (first use in this function)
      
      This moves the four declarations below the #ifdef section so they
      are always available.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Fixes: eff901d3 ("IB/mlx5: Implement callbacks for manipulating VFs")
      Reviewed-by: NLeon Romanovsky <leonro@mellanox.com>
      Reviewed-by: NEli Cohen <eli@mellanox.com>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      9967c70a
  4. 03 4月, 2016 9 次提交
  5. 02 4月, 2016 24 次提交