[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9c8a5d43-2c1e-4a3b-8708-c92a11ad56ff@gmail.com>
Date: Tue, 13 Jan 2026 07:53:19 +0200
From: Tariq Toukan <ttoukan.linux@...il.com>
To: Zeng Chi <zeng_chi911@....com>, saeedm@...dia.com, leon@...nel.org,
tariqt@...dia.com, mbloch@...dia.com, andrew+netdev@...n.ch,
davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com
Cc: netdev@...r.kernel.org, linux-rdma@...r.kernel.org,
linux-kernel@...r.kernel.org, zengchi@...inos.cn
Subject: Re: [PATCH] net/mlx5: Fix return type mismatch in
mlx5_esw_vport_vhca_id()
On 09/01/2026 11:06, Zeng Chi wrote:
> From: Zeng Chi <zengchi@...inos.cn>
>
Thanks for your patch.
Please specify target branch.
> The function mlx5_esw_vport_vhca_id() is declared to return bool,
> but returns -EOPNOTSUPP (-45), which is an int error code. This
> causes a signedness bug as reported by smatch.
>
> This patch fixes this smatch report:
> drivers/net/ethernet/mellanox/mlx5/core/eswitch.h:981 mlx5_esw_vport_vhca_id()
> warn: signedness bug returning '(-45)'
>
Missing Fixes tag.
> Signed-off-by: Zeng Chi <zengchi@...inos.cn>
> ---
> drivers/net/ethernet/mellanox/mlx5/core/eswitch.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.h b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.h
> index ad1073f7b79f..e7fe43799b23 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.h
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.h
> @@ -1009,7 +1009,7 @@ mlx5_esw_host_functions_enabled(const struct mlx5_core_dev *dev)
> static inline bool
> mlx5_esw_vport_vhca_id(struct mlx5_eswitch *esw, u16 vportn, u16 *vhca_id)
> {
> - return -EOPNOTSUPP;
> + return false;
> }
>
> #endif /* CONFIG_MLX5_ESWITCH */
Regards,
Tariq
Powered by blists - more mailing lists