* [PATCH] net/mlx5e: Fix error code in mlx5e_fec_in_caps()
@ 2020-02-24 6:55 Dan Carpenter
2020-02-24 10:52 ` Leon Romanovsky
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2020-02-24 6:55 UTC (permalink / raw)
To: Saeed Mahameed, Aya Levin
Cc: Leon Romanovsky, Eran Ben Elisha, linux-rdma, kernel-janitors
The mlx5e_fec_in_caps() function is type bool so these negative returns
become "return true;" when they should be "return false;"
Fixes: 2132b71f78d2 ("net/mlx5e: Advertise globaly supported FEC modes")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
drivers/net/ethernet/mellanox/mlx5/core/en/port.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/port.c b/drivers/net/ethernet/mellanox/mlx5/core/en/port.c
index 2c4a670c8ffd..b5ddf9bf2681 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en/port.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en/port.c
@@ -471,10 +471,10 @@ bool mlx5e_fec_in_caps(struct mlx5_core_dev *dev, int fec_policy)
int i;
if (!MLX5_CAP_GEN(dev, pcam_reg))
- return -EOPNOTSUPP;
+ return false;
if (!MLX5_CAP_PCAM_REG(dev, pplm))
- return -EOPNOTSUPP;
+ return false;
MLX5_SET(pplm_reg, in, local_port, 1);
err = mlx5_core_access_reg(dev, in, sz, out, sz, MLX5_REG_PPLM, 0, 0);
--
2.11.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] net/mlx5e: Fix error code in mlx5e_fec_in_caps()
2020-02-24 6:55 [PATCH] net/mlx5e: Fix error code in mlx5e_fec_in_caps() Dan Carpenter
@ 2020-02-24 10:52 ` Leon Romanovsky
0 siblings, 0 replies; 2+ messages in thread
From: Leon Romanovsky @ 2020-02-24 10:52 UTC (permalink / raw)
To: Dan Carpenter
Cc: Saeed Mahameed, Aya Levin, Eran Ben Elisha, linux-rdma,
kernel-janitors
On Mon, Feb 24, 2020 at 09:55:57AM +0300, Dan Carpenter wrote:
> The mlx5e_fec_in_caps() function is type bool so these negative returns
> become "return true;" when they should be "return false;"
>
> Fixes: 2132b71f78d2 ("net/mlx5e: Advertise globaly supported FEC modes")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
> drivers/net/ethernet/mellanox/mlx5/core/en/port.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
Thanks,
Acked-by: Leon Romanovsky <leonro@mellanox.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-02-24 10:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-24 6:55 [PATCH] net/mlx5e: Fix error code in mlx5e_fec_in_caps() Dan Carpenter
2020-02-24 10:52 ` Leon Romanovsky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).