net/mlx4: Fix some indent inconsistancy
authorChristophe Jaillet <christophe.jaillet@wanadoo.fr>
Sat, 2 Jul 2016 12:31:05 +0000 (14:31 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 4 Jul 2016 22:22:33 +0000 (15:22 -0700)
Silent a few smatch warnings about indentation.
This include the removal of a 'return' statement in 'resource_tracker.c'.
This 'return' will still be performed when breaking out of the
corresponding 'switch' block.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx4/intf.c
drivers/net/ethernet/mellanox/mlx4/main.c
drivers/net/ethernet/mellanox/mlx4/mcg.c
drivers/net/ethernet/mellanox/mlx4/mr.c
drivers/net/ethernet/mellanox/mlx4/resource_tracker.c

index dec77d6f0ac998be9ef4a44281e18872efbbdc20..7ae1cdad9bf03ec07c0bc055819b515ac9c6f365 100644 (file)
@@ -147,7 +147,7 @@ int mlx4_do_bond(struct mlx4_dev *dev, bool enable)
        if (enable) {
                dev->flags |= MLX4_FLAG_BONDED;
        } else {
-                ret = mlx4_virt2phy_port_map(dev, 1, 2);
+               ret = mlx4_virt2phy_port_map(dev, 1, 2);
                if (ret) {
                        mlx4_err(dev, "Fail to reset port map\n");
                        return ret;
index b673a5fc6b6c45ef61168485a3ab30e4d29f862e..75dd2e3d3059577b496df75659da509724867f1f 100644 (file)
@@ -2600,7 +2600,7 @@ static int mlx4_setup_hca(struct mlx4_dev *dev)
        err = mlx4_init_uar_table(dev);
        if (err) {
                mlx4_err(dev, "Failed to initialize user access region table, aborting\n");
-                return err;
+               return err;
        }
 
        err = mlx4_uar_alloc(dev, &priv->driver_uar);
index f2d0920018a5883ce9cd65a249e78fad76870376..94b891c118c135d3597d90ba3ec9a34d049458ee 100644 (file)
@@ -618,8 +618,8 @@ static int remove_promisc_qp(struct mlx4_dev *dev, u8 port,
                                err = mlx4_READ_ENTRY(dev,
                                                      entry->index,
                                                      mailbox);
-                                       if (err)
-                                               goto out_mailbox;
+                               if (err)
+                                       goto out_mailbox;
                                members_count =
                                        be32_to_cpu(mgm->members_count) &
                                        0xffffff;
@@ -657,8 +657,8 @@ static int remove_promisc_qp(struct mlx4_dev *dev, u8 port,
                                err = mlx4_WRITE_ENTRY(dev,
                                                       entry->index,
                                                       mailbox);
-                                       if (err)
-                                               goto out_mailbox;
+                               if (err)
+                                       goto out_mailbox;
                        }
                }
        }
index 93195191f45bf00b09ff34a9db04ec9e0797f586..395b5463cfd953e9c947bb47b6382f580f7dad3d 100644 (file)
@@ -248,7 +248,7 @@ static void mlx4_free_mtt_range(struct mlx4_dev *dev, u32 offset, int order)
                                  offset, order);
                return;
        }
-        __mlx4_free_mtt_range(dev, offset, order);
+       __mlx4_free_mtt_range(dev, offset, order);
 }
 
 void mlx4_mtt_cleanup(struct mlx4_dev *dev, struct mlx4_mtt *mtt)
index cd9b2b28df885b36d30334bc560dffcca9d9b87e..8b81114bdc72aa5d750ebb547eb65c0fbe18c5da 100644 (file)
@@ -2372,16 +2372,15 @@ static int mpt_free_res(struct mlx4_dev *dev, int slave, int op, int cmd,
                __mlx4_mpt_release(dev, index);
                break;
        case RES_OP_MAP_ICM:
-                       index = get_param_l(&in_param);
-                       id = index & mpt_mask(dev);
-                       err = mr_res_start_move_to(dev, slave, id,
-                                                  RES_MPT_RESERVED, &mpt);
-                       if (err)
-                               return err;
-
-                       __mlx4_mpt_free_icm(dev, mpt->key);
-                       res_end_move(dev, slave, RES_MPT, id);
+               index = get_param_l(&in_param);
+               id = index & mpt_mask(dev);
+               err = mr_res_start_move_to(dev, slave, id,
+                                          RES_MPT_RESERVED, &mpt);
+               if (err)
                        return err;
+
+               __mlx4_mpt_free_icm(dev, mpt->key);
+               res_end_move(dev, slave, RES_MPT, id);
                break;
        default:
                err = -EINVAL;
@@ -4253,9 +4252,8 @@ int mlx4_UPDATE_QP_wrapper(struct mlx4_dev *dev, int slave,
             (1ULL << MLX4_UPD_QP_PATH_MASK_ETH_SRC_CHECK_MC_LB)) &&
                !(dev->caps.flags2 &
                  MLX4_DEV_CAP_FLAG2_UPDATE_QP_SRC_CHECK_LB)) {
-                       mlx4_warn(dev,
-                                 "Src check LB for slave %d isn't supported\n",
-                                  slave);
+               mlx4_warn(dev, "Src check LB for slave %d isn't supported\n",
+                         slave);
                return -ENOTSUPP;
        }