Skip to content

Commit

Permalink
cxgb4: Use ntohs() on __be16 value instead of htons()
Browse files Browse the repository at this point in the history
Use the correct direction of byte-swapping function to fix a mistake
shown by sparse endianness checking -- c.fl0id is __be16.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
Acked-by: Dimitris Michailidis <dm@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Roland Dreier authored and David S. Miller committed Apr 22, 2010
1 parent b002a86 commit 62718b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/cxgb4/sge.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 62718b3

Please sign in to comment.