From patchwork Mon Mar 14 14:18:34 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102597 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp63873lbc; Mon, 14 Mar 2016 07:19:23 -0700 (PDT) X-Received: by 10.66.191.225 with SMTP id hb1mr38160646pac.78.1457965163246; Mon, 14 Mar 2016 07:19:23 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 19si15207162pfh.69.2016.03.14.07.19.22; Mon, 14 Mar 2016 07:19:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934293AbcCNOTE (ORCPT + 31 others); Mon, 14 Mar 2016 10:19:04 -0400 Received: from mout.kundenserver.de ([217.72.192.75]:61499 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755721AbcCNOS6 (ORCPT ); Mon, 14 Mar 2016 10:18:58 -0400 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue102) with ESMTPA (Nemesis) id 0M8zUb-1aY4wv2cyT-00CRQZ; Mon, 14 Mar 2016 15:18:48 +0100 From: Arnd Bergmann To: "David S. Miller" Cc: netdev@vger.kernel.org, Arnd Bergmann , Yishai Hadas , linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/5] mlx4: add missing braces in verify_qp_parameters Date: Mon, 14 Mar 2016 15:18:34 +0100 Message-Id: <1457965120-3155420-2-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1457965120-3155420-1-git-send-email-arnd@arndb.de> References: <1457965120-3155420-1-git-send-email-arnd@arndb.de> X-Provags-ID: V03:K0:kaW19/SmBjZ31c7L/MzVS7CB6zSE20Kb+noYXLmhKkP9vgK2Fmu OqIC/6YwAbGYIl0CiqXHJZq3OXnqjCnclpIZMbRTVR2jvard0ggWoQ3GqUXZ8wyLgJjJPmS G9fGa1GRPDuGXuYDFd+xhw3BMsMHsor8x9TPYd1eyLeQEG6Joh8TRNWUPBmstzcdu8XN91M 1E8REInZSVk4zzWye8ZEg== X-UI-Out-Filterresults: notjunk:1; V01:K0:YF1uiORSP4U=:CCianx1fGhCHqr/dk5/lbt c/AvuoAenBk3/mSubwYXg3EMYOJP1bt1iVXaMet/Dpt582d4vpS7cqCkR01iKhGLZ9r5t/D/V Wle9nGLKU2AvU0Pb540lTSEg8OqNSL5Qtr9ed5pyofHAMRrpl5I4wQaSZ98pwqMMgcImL1tv/ gKg9wmHqlFgQWOJOT9w+yKDGtEAWEpMsPKu0zVyY0H36ih68/HRn8ZTqQQMk52/9/rTi8wvnc BxMtJ8P6TZCJnazNHJ9bomhLexWVl+mspIqaGjKyo8AmqSeSLs2loMtjayGUy5QsOh0L9I1F/ 5FmQpa5ZvZS/RAjNMNiy1OU3JHH9LLvq+eumc4dgOEH4FjzUOQJS42NzPjYPlGC0Jy9njBguK dQ3jU0yqp1rVUQyVGl36JJzxJ+h4H4h4xHOe9eB1/8duvVLtZtOcFzUmTlFq934vDnH72t58M f5wAqmqRfzVX1+DlpBn6PLJDIA5V4vkdpRWcbPiX5Q5Idu2EalpjXIBE5O5MpdgQDUADB4hhQ 9BlYsD/fjE/iKeuY8tPIWnzM2fbqXARgGnEhg+Hk+ywZcvcGXsRCA+QizBiXvEMs+OnFederJ LwZN80iGPxuRrG6QkDioePDfg03basQpFBQz+o7YE96IGNJHHepqw6UcxUKPEXlTLcu65q3CZ 0c53UzUFdaqIjT7SQsCW8omvCArlJqD3k9ZFhDHP/9f+FZM5sU6MnLLG6Gc9lbT1fTT4= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Fixes: 54679e148287 ("mlx4: Implement QP paravirtualization and maintain phys_pkey_cache for smp_snoop") --- drivers/net/ethernet/mellanox/mlx4/resource_tracker.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.7.0 diff --git a/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c b/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c index 25ce1b030a00..cd9b2b28df88 100644 --- a/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c +++ b/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c @@ -3141,7 +3141,7 @@ static int verify_qp_parameters(struct mlx4_dev *dev, case QP_TRANS_RTS2RTS: case QP_TRANS_SQD2SQD: case QP_TRANS_SQD2RTS: - if (slave != mlx4_master_func_num(dev)) + if (slave != mlx4_master_func_num(dev)) { if (optpar & MLX4_QP_OPTPAR_PRIMARY_ADDR_PATH) { port = (qp_ctx->pri_path.sched_queue >> 6 & 1) + 1; if (dev->caps.port_mask[port] != MLX4_PORT_TYPE_IB) @@ -3160,6 +3160,7 @@ static int verify_qp_parameters(struct mlx4_dev *dev, if (qp_ctx->alt_path.mgid_index >= num_gids) return -EINVAL; } + } break; default: break;