net/mlx5: DR, Use swap() instead of open coding it
authorJiapeng Chong <jiapeng.chong@linux.alibaba.com>
Fri, 17 Nov 2023 07:19:47 +0000 (15:19 +0800)
committerSaeed Mahameed <saeedm@nvidia.com>
Thu, 14 Dec 2023 02:03:32 +0000 (18:03 -0800)
commit952f9a5f4b0904255ef3dfa58f325fa3e5f045fb
tree63662696ebe065f68adc83bc95d59fe867f56544
parent9bb1ac80738a699d911684a67333d9cc8a95739a
net/mlx5: DR, Use swap() instead of open coding it

Swap is a function interface that provides exchange function. To avoid
code duplication, we can use swap function.

./drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c:1254:50-51: WARNING opportunity for swap().

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=7580
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c