diff options
author | Roland Dreier <rdreier@cisco.com> | 2010-04-21 04:09:21 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-04-22 02:00:43 -0400 |
commit | 62718b328f972f1559feb96dfccc15fc9f4c9a2c (patch) | |
tree | ff023fa05fdf3b03c0c46d9bc97632a7e341e451 /drivers/net/cxgb4 | |
parent | b002a861092b0db128800794a116cc3acc5ec239 (diff) |
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: Roland Dreier <rolandd@cisco.com>
Acked-by: Dimitris Michailidis <dm@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/cxgb4')
-rw-r--r-- | drivers/net/cxgb4/sge.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/cxgb4/sge.c b/drivers/net/cxgb4/sge.c index 14adc58e71c3..70bf2b2e6001 100644 --- a/drivers/net/cxgb4/sge.c +++ b/drivers/net/cxgb4/sge.c | |||
@@ -2047,7 +2047,7 @@ int t4_sge_alloc_rxq(struct adapter *adap, struct sge_rspq *iq, bool fwevtq, | |||
2047 | adap->sge.ingr_map[iq->cntxt_id] = iq; | 2047 | adap->sge.ingr_map[iq->cntxt_id] = iq; |
2048 | 2048 | ||
2049 | if (fl) { | 2049 | if (fl) { |
2050 | fl->cntxt_id = htons(c.fl0id); | 2050 | fl->cntxt_id = ntohs(c.fl0id); |
2051 | fl->avail = fl->pend_cred = 0; | 2051 | fl->avail = fl->pend_cred = 0; |
2052 | fl->pidx = fl->cidx = 0; | 2052 | fl->pidx = fl->cidx = 0; |
2053 | fl->alloc_failed = fl->large_alloc_failed = fl->starving = 0; | 2053 | fl->alloc_failed = fl->large_alloc_failed = fl->starving = 0; |