OpenCloudOS-Kernel/drivers/net/cxgb3
Roland Dreier c5419e6f05 cxgb3: Fix sparse warning and micro-optimize is_pure_response()
The function is_pure_response() does "ntohl(var) & const" and then
essentially just tests whether the result is 0 or not; this can be done
more efficiently by computing "var & htonl(const)" instead and doing the
byte swap at compile time instead of run time.

This change slightly shrinks the compiled code; eg on x86-64 we save a
couple of bswapl instructions:

add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-8 (-8)
function                                     old     new   delta
t3_sge_intr_msix_napi                        544     536      -8

and this also has the pleasant side effect of fixing a sparse warning:

    drivers/net/cxgb3/sge.c:2313:15: warning: restricted degrades to integer

Signed-off-by: Roland Dreier <rolandd@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-28 21:55:42 -08:00
..
Makefile Add support for the latest 1G/10G Chelsio adapter, T3. 2007-02-05 16:58:46 -05:00
adapter.h cxgb3: extend copyrights to 2008 2008-10-13 18:47:30 -07:00
ael1002.c cxgb3: extend copyrights to 2008 2008-10-13 18:47:30 -07:00
common.h cxgb3: extend copyrights to 2008 2008-10-13 18:47:30 -07:00
cxgb3_ctl_defs.h cxgb3: extend copyrights to 2008 2008-10-13 18:47:30 -07:00
cxgb3_defs.h cxgb3: extend copyrights to 2008 2008-10-13 18:47:30 -07:00
cxgb3_ioctl.h cxgb3: extend copyrights to 2008 2008-10-13 18:47:30 -07:00
cxgb3_main.c cxgb3: Update FW loading path. 2008-11-26 15:38:36 -08:00
cxgb3_offload.c cxgb3: extend copyrights to 2008 2008-10-13 18:47:30 -07:00
cxgb3_offload.h cxgb3: extend copyrights to 2008 2008-10-13 18:47:30 -07:00
firmware_exports.h cxgb3: extend copyrights to 2008 2008-10-13 18:47:30 -07:00
l2t.c cxgb3: Fix kernel crash caused by uninitialized l2t_entry.arpq 2008-10-22 06:22:14 -04:00
l2t.h cxgb3: extend copyrights to 2008 2008-10-13 18:47:30 -07:00
mc5.c cxgb3: extend copyrights to 2008 2008-10-13 18:47:30 -07:00
regs.h cxgb3: More flexible support for PHY interrupts. 2008-10-08 17:39:00 -07:00
sge.c cxgb3: Fix sparse warning and micro-optimize is_pure_response() 2008-11-28 21:55:42 -08:00
sge_defs.h cxgb3 - Set the CQ_ERR bit in CQ contexts. 2007-10-10 16:51:05 -07:00
t3_cpl.h cxgb3: extend copyrights to 2008 2008-10-13 18:47:30 -07:00
t3_hw.c cxgb3 - eeprom read fixes 2008-11-11 03:50:36 -05:00
t3cdev.h cxgb3: extend copyrights to 2008 2008-10-13 18:47:30 -07:00
version.h cxgb3: extend copyrights to 2008 2008-10-13 18:47:30 -07:00
vsc8211.c cxgb3: extend copyrights to 2008 2008-10-13 18:47:30 -07:00
xgmac.c cxgb3: extend copyrights to 2008 2008-10-13 18:47:30 -07:00