1. 18 Dec, 2017 29 commits
  2. 13 Dec, 2017 8 commits
  3. 11 Dec, 2017 3 commits
    • Andy Shevchenko's avatar
      IB/srp: replace custom implementation of hex2bin() · e711f968
      Andy Shevchenko authored
      There is no need to have a duplication of the generic library, i.e.
      hex2bin().
      
      Replace the open coded variant.
      Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Acked-by: default avatarBart Van Assche <bart.vanassche@wdc.com>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      e711f968
    • Arnd Bergmann's avatar
      IB/mlx5: revisit -Wmaybe-uninitialized warning · 1b19b951
      Arnd Bergmann authored
      A warning that I thought I had fixed before occasionally comes
      back in rare randconfig builds (I found 7 instances in the last
      100000 builds, originally it was much more frequent):
      
      drivers/infiniband/hw/mlx5/mr.c: In function 'mlx5_ib_reg_user_mr':
      drivers/infiniband/hw/mlx5/mr.c:1229:5: error: 'order' may be used uninitialized in this function [-Werror=maybe-uninitialized]
        if (order <= mr_cache_max_order(dev)) {
           ^
      drivers/infiniband/hw/mlx5/mr.c:1247:8: error: 'ncont' may be used uninitialized in this function [-Werror=maybe-uninitialized]
      drivers/infiniband/hw/mlx5/mr.c:1247:8: error: 'page_shift' may be used uninitialized in this function [-Werror=maybe-uninitialized]
      drivers/infiniband/hw/mlx5/mr.c:1260:2: error: 'npages' may be used uninitialized in this function [-Werror=maybe-uninitialized]
      
      I've looked at all those findings again and noticed that they are all
      with CONFIG_INFINIBAND_USER_MEM=n, which means ib_umem_get() returns
      an error unconditionally and we never initialize or use those variables.
      This triggers a condition in gcc iff mr_umem_get() is partially but not
      entirely inlined, which in turn depends on the exact combination of
      optimization settings. This is a known problem with gcc, with no
      easy solution in the compiler, so this adds another workaround that
      should be more reliable than my previous attempt.
      
      Returning an error from mlx5_ib_reg_user_mr() earlier means that we
      can completely bypass the logic that caused the warning, the compiler
      can now see that the variable is never accessed.
      
      Fixes: 14ab8896 ("IB/mlx5: avoid bogus -Wmaybe-uninitialized warning")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      1b19b951
    • Mustafa Ismail's avatar
      i40iw: Reinitialize add_sd_cnt · 24b9abab
      Mustafa Ismail authored
      add_sd_cnt in info structure passed to i40iw_create_hmc_obj_type
      must be 0 and since it is modified during the call, it must be
      reset in the loop. This avoids unnecessarily reprogramming the
      SDs multiple times with the same values.
      Signed-off-by: default avatarMustafa Ismail <mustafa.ismail@intel.com>
      Signed-off-by: default avatarShiraz Saleem <shiraz.saleem@intel.com>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      24b9abab