From: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
To: roid-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: [bug report] net/mlx5: E-Switch, Add control for inline mode
Date: Tue, 29 Nov 2016 13:52:58 +0300 [thread overview]
Message-ID: <20161129105258.GA31063@mwanda> (raw)
Hello Roi Dayan,
The patch bffaa916588e: "net/mlx5: E-Switch, Add control for inline
mode" from Nov 22, 2016, leads to the following static checker
warning:
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c:950 mlx5_eswitch_inline_mode_get()
error: uninitialized symbol 'prev_mlx5_mode'.
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
932 int mlx5_eswitch_inline_mode_get(struct mlx5_eswitch *esw, int nvfs, u8 *mode)
933 {
934 struct mlx5_core_dev *dev = esw->dev;
935 int vport;
936 u8 prev_mlx5_mode, mlx5_mode = MLX5_INLINE_MODE_L2;
^^^^^^^^^^^^^^
937
938 if (!MLX5_CAP_GEN(dev, vport_group_manager))
939 return -EOPNOTSUPP;
940
941 if (esw->mode == SRIOV_NONE)
942 return -EOPNOTSUPP;
943
944 if (MLX5_CAP_ETH(dev, wqe_inline_mode) !=
945 MLX5_CAP_INLINE_MODE_VPORT_CONTEXT)
946 return -EOPNOTSUPP;
947
948 for (vport = 1; vport <= nvfs; vport++) {
949 mlx5_query_nic_vport_min_inline(dev, vport, &mlx5_mode);
950 if (vport > 1 && prev_mlx5_mode != mlx5_mode)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
No idea what prev_mlx5_mode is supposed to be for.
951 return -EINVAL;
952 prev_mlx5_mode = mlx5_mode;
953 }
954
955 *mode = mlx5_mode;
956 return 0;
957 }
regards,
dan carpenter
--
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
next reply other threads:[~2016-11-29 10:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-29 10:52 Dan Carpenter [this message]
2016-11-29 15:06 ` [bug report] net/mlx5: E-Switch, Add control for inline mode Roi Dayan
[not found] ` <fa981369-2032-eb9e-6307-f3055297e7e6-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2016-11-29 21:25 ` Dan Carpenter
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=20161129105258.GA31063@mwanda \
--to=dan.carpenter-qhclzuegtsvqt0dzr+alfa@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=roid-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox