diff options
author | Yang Guang <yang.guang5@zte.com.cn> | 2021-11-04 09:21:58 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-11-05 13:14:38 +0300 |
commit | d7be1d1cfb4d3215c06e98ac6f6c4e99293d8e3c (patch) | |
tree | 19612671c1bd5e303d94276c01bbaad8676b9634 /drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c | |
parent | 0c500ef5d3395b68f615486c90aaf28868e0032c (diff) | |
download | linux-d7be1d1cfb4d3215c06e98ac6f6c4e99293d8e3c.tar.xz |
octeontx2-af: use swap() to make code cleaner
Use the macro 'swap()' defined in 'include/linux/minmax.h' to avoid
opencoding it.
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Yang Guang <yang.guang5@zte.com.cn>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c')
-rw-r--r-- | drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c index bb6b42bbefa4..c0005a1feee6 100644 --- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c +++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c @@ -2450,9 +2450,7 @@ alloc: bmap = mcam->bmap_reverse; start = mcam->bmap_entries - start; end = mcam->bmap_entries - end; - index = start; - start = end; - end = index; + swap(start, end); } else { bmap = mcam->bmap; } |