aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorGal Pressman <gal@nvidia.com>2025-11-30 12:25:33 +0200
committerJakub Kicinski <kuba@kernel.org>2025-12-01 14:56:27 -0800
commit53f7a771285182be7bfba6d59ccdd0d47fc1a097 (patch)
tree88cb49d81d002615cf953f71400dc333c4200268 /drivers
parente1098bb02f2d9a85a127aecad6378e4f159acce5 (diff)
downloadlinux-53f7a771285182be7bfba6d59ccdd0d47fc1a097.tar.gz
net/mlx5e: Use U8_MAX instead of hard coded magic number
Replace hard coded 255 magic number with U8_MAX (the register field is 8 bits). Signed-off-by: Gal Pressman <gal@nvidia.com> Reviewed-by: Nimrod Oren <noren@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Link: https://patch.msgid.link/1764498334-1327918-4-git-send-email-tariqt@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c b/drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c
index 7127442f800315..79f9d43b09b3cc 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c
@@ -614,8 +614,8 @@ static int mlx5e_dcbnl_ieee_setmaxrate(struct net_device *netdev,
memset(max_bw_value, 0, sizeof(max_bw_value));
memset(max_bw_unit, 0, sizeof(max_bw_unit));
- upper_limit_100mbps = 255 * MLX5E_100MB;
- upper_limit_gbps = 255 * MLX5E_1GB;
+ upper_limit_100mbps = U8_MAX * MLX5E_100MB;
+ upper_limit_gbps = U8_MAX * MLX5E_1GB;
for (i = 0; i <= mlx5_max_tc(mdev); i++) {
if (!maxrate->tc_maxrate[i]) {