cxgb4: Use ntohs() on __be16 value instead of htons()
authorRoland Dreier <rdreier@cisco.com>
Wed, 21 Apr 2010 08:09:21 +0000 (08:09 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 22 Apr 2010 06:00:43 +0000 (23:00 -0700)
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>
drivers/net/cxgb4/sge.c

index 14adc58e71c3be122679e078cca325a0cbed4431..70bf2b2e600112d40d6726e81386b38a956cd0db 100644 (file)
@@ -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;