From: Saeed Mahameed <saeed@kernel.org>
To: "David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>
Cc: netdev@vger.kernel.org,
Jiapeng Chong <jiapeng.chong@linux.alibaba.com>,
Abaci Robot <abaci@linux.alibaba.com>,
Leon Romanovsky <leonro@nvidia.com>,
Saeed Mahameed <saeedm@nvidia.com>
Subject: [net-next 16/16] net/mlx5: Fix missing return value in mlx5_devlink_eswitch_inline_mode_set()
Date: Mon, 2 Aug 2021 19:28:53 -0700 [thread overview]
Message-ID: <20210803022853.106973-17-saeed@kernel.org> (raw)
In-Reply-To: <20210803022853.106973-1-saeed@kernel.org>
From: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
The return value is missing in this code scenario, add the return value
'0' to the return value 'err'.
Eliminate the follow smatch warning:
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c:3083
mlx5_devlink_eswitch_inline_mode_set() warn: missing error code 'err'.
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Fixes: 8e0aa4bc959c ("net/mlx5: E-switch, Protect eswitch mode changes")
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
---
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
index 011e766e4f67..feecf44994a9 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
@@ -3083,8 +3083,11 @@ int mlx5_devlink_eswitch_inline_mode_set(struct devlink *devlink, u8 mode,
switch (MLX5_CAP_ETH(dev, wqe_inline_mode)) {
case MLX5_CAP_INLINE_MODE_NOT_REQUIRED:
- if (mode == DEVLINK_ESWITCH_INLINE_MODE_NONE)
+ if (mode == DEVLINK_ESWITCH_INLINE_MODE_NONE) {
+ err = 0;
goto out;
+ }
+
fallthrough;
case MLX5_CAP_INLINE_MODE_L2:
NL_SET_ERR_MSG_MOD(extack, "Inline mode can't be set");
--
2.31.1
prev parent reply other threads:[~2021-08-03 2:29 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-03 2:28 [pull request][net-next 00/16] mlx5 updates 2021-08-02 Saeed Mahameed
2021-08-03 2:28 ` [net-next 01/16] net/mlx5e: Use a new initializer to build uniform indir table Saeed Mahameed
2021-08-03 10:30 ` patchwork-bot+netdevbpf
2021-08-03 2:28 ` [net-next 02/16] net/mlx5e: Introduce mlx5e_channels API to get RQNs Saeed Mahameed
2021-08-03 2:28 ` [net-next 03/16] net/mlx5e: Hide all implementation details of mlx5e_rx_res Saeed Mahameed
2021-08-03 2:28 ` [net-next 04/16] net/mlx5e: Allocate the array of channels according to the real max_nch Saeed Mahameed
2021-08-03 2:28 ` [net-next 05/16] net/mlx5e: Rename traffic type enums Saeed Mahameed
2021-08-03 2:28 ` [net-next 06/16] net/mlx5e: Rename some related TTC args and functions Saeed Mahameed
2021-08-03 2:28 ` [net-next 07/16] net/mlx5e: Decouple TTC logic from mlx5e Saeed Mahameed
2021-08-03 2:28 ` [net-next 08/16] net/mlx5: Move TTC logic to fs_ttc Saeed Mahameed
2021-08-03 2:28 ` [net-next 09/16] net/mlx5: Embed mlx5_ttc_table Saeed Mahameed
2021-08-03 2:28 ` [net-next 10/16] net/mlx5e: Remove redundant tc act includes Saeed Mahameed
2021-08-03 2:28 ` [net-next 11/16] net/mlx5e: Remove redundant filter_dev arg from parse_tc_fdb_actions() Saeed Mahameed
2021-08-03 2:28 ` [net-next 12/16] net/mlx5e: Remove redundant cap check for flow counter Saeed Mahameed
2021-08-03 2:28 ` [net-next 13/16] net/mlx5e: Remove redundant parse_attr arg Saeed Mahameed
2021-08-03 2:28 ` [net-next 14/16] net/mlx5e: Remove redundant assignment of counter to null Saeed Mahameed
2021-08-03 2:28 ` [net-next 15/16] net/mlx5e: Return -EOPNOTSUPP if more relevant when parsing tc actions Saeed Mahameed
2021-08-03 2:28 ` Saeed Mahameed [this message]
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=20210803022853.106973-17-saeed@kernel.org \
--to=saeed@kernel.org \
--cc=abaci@linux.alibaba.com \
--cc=davem@davemloft.net \
--cc=jiapeng.chong@linux.alibaba.com \
--cc=kuba@kernel.org \
--cc=leonro@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=saeedm@nvidia.com \
/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.