In linux-4.0.3/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c function "verify_qp_parameters": 2957 switch (transition) { 2958 case QP_TRANS_INIT2RTR: 2959 case QP_TRANS_RTR2RTS: 2960 case QP_TRANS_RTS2RTS: 2961 case QP_TRANS_SQD2SQD: 2962 case QP_TRANS_SQD2RTS: 2963 if (slave != mlx4_master_func_num(dev)) 2964 if (optpar & MLX4_QP_OPTPAR_PRIMARY_ADDR_PATH) { 2965 port = (qp_ctx->pri_path.sched_queue >> 6 & 1) + 1; 2966 if (dev->caps.port_mask[port] != MLX4_PORT_TYPE_IB) 2967 num_gids = mlx4_get_slave_num_gids(dev, slave, port); 2968 else 2969 num_gids = 1; 2970 if (qp_ctx->pri_path.mgid_index >= num_gids) 2971 return -EINVAL; 2972 } 2973 if (optpar & MLX4_QP_OPTPAR_ALT_ADDR_PATH) { 2974 port = (qp_ctx->alt_path.sched_queue >> 6 & 1) + 1; 2975 if (dev->caps.port_mask[port] != MLX4_PORT_TYPE_IB) 2976 num_gids = mlx4_get_slave_num_gids(dev, slave, port); 2977 else 2978 num_gids = 1; 2979 if (qp_ctx->alt_path.mgid_index >= num_gids) 2980 return -EINVAL; 2981 } 2982 break; 2983 default: 2984 break; 2985 } Note how the "if" clause at line 2963 doesn't have braces, and hence only guards the "if" at line 2964, *not* the "if" at line 2973. Should it? Seen via an experimental new gcc warning I'm working on for gcc 6, -Wmisleading-indentation, using gcc r223098 adding -Werror=misleading-indentation" to KBUILD_CFLAGS in Makefile, where the experimental gcc emits this error: drivers/net/ethernet/mellanox/mlx4/resource_tracker.c: In function ‘verify_qp_parameters’: drivers/net/ethernet/mellanox/mlx4/resource_tracker.c:2973: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:2963:4: note: ...this ‘if’ clause, but it is not if (slave != mlx4_master_func_num(dev)) ^
Retested with -rc git; still present as of 1113cdfe7d2c1fe08b64caa3affe19260e66dd95.