From: Tariq Toukan <ttoukan.linux@gmail.com>
To: Zeng Chi <zeng_chi911@163.com>,
saeedm@nvidia.com, leon@kernel.org, tariqt@nvidia.com,
mbloch@nvidia.com, andrew+netdev@lunn.ch, davem@davemloft.net,
edumazet@google.com, kuba@kernel.org, pabeni@redhat.com
Cc: netdev@vger.kernel.org, linux-rdma@vger.kernel.org,
linux-kernel@vger.kernel.org, zengchi@kylinos.cn
Subject: Re: [PATCH] net/mlx5: Fix return type mismatch in mlx5_esw_vport_vhca_id()
Date: Tue, 13 Jan 2026 07:53:19 +0200 [thread overview]
Message-ID: <9c8a5d43-2c1e-4a3b-8708-c92a11ad56ff@gmail.com> (raw)
In-Reply-To: <20260109090650.1734268-1-zeng_chi911@163.com>
On 09/01/2026 11:06, Zeng Chi wrote:
> From: Zeng Chi <zengchi@kylinos.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@kylinos.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
next prev parent reply other threads:[~2026-01-13 5:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-09 9:06 [PATCH] net/mlx5: Fix return type mismatch in mlx5_esw_vport_vhca_id() Zeng Chi
2026-01-13 5:53 ` Tariq Toukan [this message]
2026-01-13 13:21 ` Markus Elfring
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=9c8a5d43-2c1e-4a3b-8708-c92a11ad56ff@gmail.com \
--to=ttoukan.linux@gmail.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=mbloch@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=saeedm@nvidia.com \
--cc=tariqt@nvidia.com \
--cc=zeng_chi911@163.com \
--cc=zengchi@kylinos.cn \
/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