From: Leon Romanovsky <leon-2ukJVAZIZ/Y@public.gmane.org>
To: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
Cc: "David S. Miller" <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>,
netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Yishai Hadas <yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 1/5] mlx4: add missing braces in verify_qp_parameters
Date: Mon, 14 Mar 2016 19:57:14 +0200 [thread overview]
Message-ID: <20160314175714.GA13848@leon.nu> (raw)
In-Reply-To: <1457965120-3155420-2-git-send-email-arnd-r2nGTMty4D4@public.gmane.org>
On Mon, Mar 14, 2016 at 03:18:34PM +0100, Arnd Bergmann wrote:
> 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-r2nGTMty4D4@public.gmane.org>
> Fixes: 54679e148287 ("mlx4: Implement QP paravirtualization and maintain phys_pkey_cache for smp_snoop")
Thanks, looks good.
Reviewed-by: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> ---
> drivers/net/ethernet/mellanox/mlx4/resource_tracker.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> 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;
> --
> 2.7.0
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: Leon Romanovsky <leon@leon.nu>
To: Arnd Bergmann <arnd@arndb.de>
Cc: "David S. Miller" <davem@davemloft.net>,
netdev@vger.kernel.org, Yishai Hadas <yishaih@mellanox.com>,
linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/5] mlx4: add missing braces in verify_qp_parameters
Date: Mon, 14 Mar 2016 19:57:14 +0200 [thread overview]
Message-ID: <20160314175714.GA13848@leon.nu> (raw)
In-Reply-To: <1457965120-3155420-2-git-send-email-arnd@arndb.de>
On Mon, Mar 14, 2016 at 03:18:34PM +0100, Arnd Bergmann wrote:
> 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")
Thanks, looks good.
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
> ---
> drivers/net/ethernet/mellanox/mlx4/resource_tracker.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> 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;
> --
> 2.7.0
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2016-03-14 17:57 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-14 14:18 net: gcc-6.0 warning fixes Arnd Bergmann
[not found] ` <1457965120-3155420-1-git-send-email-arnd-r2nGTMty4D4@public.gmane.org>
2016-03-14 14:18 ` [PATCH 1/5] mlx4: add missing braces in verify_qp_parameters Arnd Bergmann
2016-03-14 14:18 ` Arnd Bergmann
[not found] ` <1457965120-3155420-2-git-send-email-arnd-r2nGTMty4D4@public.gmane.org>
2016-03-14 17:57 ` Leon Romanovsky [this message]
2016-03-14 17:57 ` Leon Romanovsky
2016-03-14 14:18 ` [PATCH 2/5] farsync: fix off-by-one bug in fst_add_one Arnd Bergmann
2016-03-14 14:18 ` [ath9k-devel] [PATCH 3/5] ath9k: fix buffer overrun for ar9287 Arnd Bergmann
2016-03-14 14:18 ` Arnd Bergmann
2016-03-14 14:18 ` Arnd Bergmann
2016-03-14 14:18 ` Arnd Bergmann
2016-03-21 14:23 ` [ath9k-devel] " Kalle Valo
2016-03-21 14:23 ` Kalle Valo
2016-03-21 14:23 ` Kalle Valo
2016-03-21 14:23 ` Kalle Valo
2016-03-14 14:18 ` [ath9k-devel] [PATCH 4/5] ath9k: fix misleading indentation Arnd Bergmann
2016-03-14 14:18 ` Arnd Bergmann
2016-03-14 14:18 ` Arnd Bergmann
2016-03-21 14:24 ` [ath9k-devel] " Kalle Valo
2016-03-21 14:24 ` Kalle Valo
2016-03-21 14:24 ` Kalle Valo
2016-03-14 14:18 ` [PATCH 5/5] net: caif: " Arnd Bergmann
2016-03-14 17:10 ` net: gcc-6.0 warning fixes David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160314175714.GA13848@leon.nu \
--to=leon-2ukjvaziz/y@public.gmane.org \
--cc=arnd-r2nGTMty4D4@public.gmane.org \
--cc=davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.