Commit d7be1d1c authored by Yang Guang's avatar Yang Guang Committed by David S. Miller
Browse files

octeontx2-af: use swap() to make code cleaner



Use the macro 'swap()' defined in 'include/linux/minmax.h' to avoid
opencoding it.

Reported-by: default avatarZeal Robot <zealci@zte.com.cn>
Signed-off-by: default avatarYang Guang <yang.guang5@zte.com.cn>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0c500ef5
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -2450,9 +2450,7 @@ static int npc_mcam_alloc_entries(struct npc_mcam *mcam, u16 pcifunc,
		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;
	}