net/mlx5e: CT: Fix ct debugfs folder name
authorChris Mi <cmi@nvidia.com>
Mon, 28 Nov 2022 05:54:29 +0000 (13:54 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Jan 2023 11:02:12 +0000 (12:02 +0100)
commit7d88b67d6bec4ea4f79de4f4e8928eea7c52bfe9
treed819d1af01042864506fb893b5aa531ed2fa1fc3
parent38e1a340f741720c3c23d2d47553f601ae5b0d89
net/mlx5e: CT: Fix ct debugfs folder name

[ Upstream commit 849190e3e4ccf452fbe2240eace30a9ca83fb8d2 ]

Need to use sprintf to build a string instead of sscanf. Otherwise
dirname is null and both "ct_nic" and "ct_fdb" won't be created.
But its redundant anyway as driver could be in switchdev mode but
still add nic rules. So use "ct" as folder name.

Fixes: 77422a8f6f61 ("net/mlx5e: CT: Add ct driver counters")
Signed-off-by: Chris Mi <cmi@nvidia.com>
Reviewed-by: Roi Dayan <roid@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c