Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 62718b32 authored by Roland Dreier's avatar Roland Dreier Committed by David S. Miller
Browse files

cxgb4: Use ntohs() on __be16 value instead of htons()



Use the correct direction of byte-swapping function to fix a mistake
shown by sparse endianness checking -- c.fl0id is __be16.

Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
Acked-by: default avatarDimitris Michailidis <dm@chelsio.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b002a861
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2047,7 +2047,7 @@ int t4_sge_alloc_rxq(struct adapter *adap, struct sge_rspq *iq, bool fwevtq,
	adap->sge.ingr_map[iq->cntxt_id] = iq;

	if (fl) {
		fl->cntxt_id = htons(c.fl0id);
		fl->cntxt_id = ntohs(c.fl0id);
		fl->avail = fl->pend_cred = 0;
		fl->pidx = fl->cidx = 0;
		fl->alloc_failed = fl->large_alloc_failed = fl->starving = 0;