]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mlx4: add missing braces in verify_qp_parameters
authorArnd Bergmann <arnd@arndb.de>
Mon, 14 Mar 2016 14:18:34 +0000 (15:18 +0100)
committerDhaval Giani <dhaval.giani@oracle.com>
Fri, 20 Jan 2017 22:22:01 +0000 (17:22 -0500)
commit5bdedcbac585ac084271b78ce1cf234bf7912745
tree6a4a56e2621064cc9ffbf905fdad1e5ad6c92efc
parenta230313b7645aea92d50d787262436f4eb30eacb
mlx4: add missing braces in verify_qp_parameters

Orabug: 25308057

[ Upstream commit baefd7015cdb304ce6c94f9679d0486c71954766 ]

The implementation of QP paravirtualization back in linux-3.7 included
some code that looks very dubious, and gcc-6 has grown smart enough
to warn about it:

drivers/net/ethernet/mellanox/mlx4/resource_tracker.c: In function 'verify_qp_parameters':
drivers/net/ethernet/mellanox/mlx4/resource_tracker.c:3154:5: error: statement is indented as if it were guarded by... [-Werror=misleading-indentation]
     if (optpar & MLX4_QP_OPTPAR_ALT_ADDR_PATH) {
     ^~
drivers/net/ethernet/mellanox/mlx4/resource_tracker.c:3144:4: note: ...this 'if' clause, but it is not
    if (slave != mlx4_master_func_num(dev))

>From looking at the context, I'm reasonably sure that the indentation
is correct but that it should have contained curly braces from the
start, as the update_gid() function in the same patch correctly does.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 54679e148287 ("mlx4: Implement QP paravirtualization and maintain phys_pkey_cache for smp_snoop")
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
(cherry picked from commit c7c3a3219def53ece4b535f220deefa021ee09f7)
Signed-off-by: Dhaval Giani <dhaval.giani@oracle.com>
drivers/net/ethernet/mellanox/mlx4/resource_tracker.c