[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID:
<PH8PR12MB67943547985BE91058175ACDDC94A@PH8PR12MB6794.namprd12.prod.outlook.com>
Date: Fri, 23 Jan 2026 07:59:30 +0000
From: Parav Pandit <parav@...dia.com>
To: Zeng Chi <zeng_chi911@....com>, Saeed Mahameed <saeedm@...dia.com>,
"leon@...nel.org" <leon@...nel.org>, Tariq Toukan <tariqt@...dia.com>, Mark
Bloch <mbloch@...dia.com>, "andrew+netdev@...n.ch" <andrew+netdev@...n.ch>,
"davem@...emloft.net" <davem@...emloft.net>, "edumazet@...gle.com"
<edumazet@...gle.com>, "kuba@...nel.org" <kuba@...nel.org>,
"pabeni@...hat.com" <pabeni@...hat.com>, Adithya Jayachandran
<ajayachandra@...dia.com>, Feng Liu <feliu@...dia.com>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, Zeng Chi
<zengchi@...inos.cn>
Subject: RE: [PATCH v2 net] net/mlx5: Fix return type mismatch in
mlx5_esw_vport_vhca_id()
> From: Zeng Chi <zeng_chi911@....com>
> Sent: 23 January 2026 01:03 PM
>
> From: Zeng Chi <zengchi@...inos.cn>
>
> 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)'
>
> Fixes: 1baf30426553e ("net/mlx5: E-Switch, Set/Query hca cap via vhca id")
Even though kernel documentation [1] allows more than 12 letters in the tag, the common practice is to have 12 letters of the commit id.
Better to have 12 letters.
[1] https://docs.kernel.org/process/submitting-patches.html#describe-your-changes
> Signed-off-by: Zeng Chi <zengchi@...inos.cn>
> ---
> v2:Added the required Fixes tag and specified target branch net in subject prefix
> ---
> 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 */
> --
> 2.25.1
Reviewed-by: Parav Pandit <parav@...dia.com>
Powered by blists - more mailing lists