Hello Greg Rose,
The patch 5eae00c57f5e: "i40evf: main driver core" from Dec 21, 2013,
leads to the following static checker warning:
"drivers/net/ethernet/intel/i40evf/i40evf_main.c:587 i40evf_configure_rx()
warn: was expecting a 64 bit value instead of '(1 << 2)'"
drivers/net/ethernet/intel/i40evf/i40evf_main.c
586
587 adapter->flags &= ~I40EVF_FLAG_RX_PS_CAPABLE;
^^^^^^^^^^^^^^^^^^^^^^^^^^^
flags is unsigned long but the bitwise negate is on 32 bit so it clears
the upper 32 bits in a potentially uninintended way.
588 adapter->flags |= I40EVF_FLAG_RX_1BUF_CAPABLE;
589
drivers/net/ethernet/intel/i40evf/i40evf.h
228 volatile unsigned long flags;
229 #define I40EVF_FLAG_RX_CSUM_ENABLED (u32)(1)
230 #define I40EVF_FLAG_RX_1BUF_CAPABLE (u32)(1 << 1)
231 #define I40EVF_FLAG_RX_PS_CAPABLE (u32)(1 << 2)
232 #define I40EVF_FLAG_RX_PS_ENABLED (u32)(1 << 3)
233 #define I40EVF_FLAG_IN_NETPOLL (u32)(1 << 4)
234 #define I40EVF_FLAG_IMIR_ENABLED (u32)(1 << 5)
235 #define I40EVF_FLAG_MQ_CAPABLE (u32)(1 << 6)
236 #define I40EVF_FLAG_NEED_LINK_UPDATE (u32)(1 << 7)
The flags are explicitly u32 and the ->flags member is unsigned long.
And, of course, checkpatch should complain that the "volatile" is a sign
of confusion.
regards,
dan carpenter
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
E1000-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel® Ethernet, visit
http://communities.intel.com/community/wired