Johannes Berg wrote: > CC [M] drivers/net/wireless/iwl-base-3945.o > drivers/net/wireless/iwl-base.c: In function ‘iwl_handle_data_packet_monitor’: > drivers/net/wireless/iwl-base.c:3318: warning: integer overflow in expression > drivers/net/wireless/iwl-base.c:3318: warning: integer overflow in expression > CC [M] drivers/net/wireless/iwl-3945.o > CC [M] drivers/net/wireless/iwl-3945-rs.o > CC [M] drivers/net/wireless/iwl-base-4965.o > drivers/net/wireless/iwl-base.c:2169: warning: large integer implicitly truncated to unsigned type > drivers/net/wireless/iwl-base.c:2170: warning: large integer implicitly truncated to unsigned type > drivers/net/wireless/iwl-base.c:2171: warning: large integer implicitly truncated to unsigned type > drivers/net/wireless/iwl-base.c:2172: warning: large integer implicitly truncated to unsigned type > drivers/net/wireless/iwl-base.c:2173: warning: large integer implicitly truncated to unsigned type > drivers/net/wireless/iwl-base.c:2179: warning: large integer implicitly truncated to unsigned type > drivers/net/wireless/iwl-base.c:2181: warning: large integer implicitly truncated to unsigned type > drivers/net/wireless/iwl-base.c:2183: warning: large integer implicitly truncated to unsigned type > drivers/net/wireless/iwl-base.c:2185: warning: large integer implicitly truncated to unsigned type > drivers/net/wireless/iwl-base.c:2186: warning: large integer implicitly truncated to unsigned type > drivers/net/wireless/iwl-base.c: In function ‘iwl_handle_data_packet_monitor’: > drivers/net/wireless/iwl-base.c:3318: warning: integer overflow in expression > drivers/net/wireless/iwl-base.c:3318: warning: integer overflow in expression > > > I suspect most of them are caused by endianness bugs. > This for example: > > le16_to_cpu(phy_flags_hw & RX_RES_PHY_FLAGS_ANTENNA_MSK) >> 4; > > looks totally bogus unless you somehow do macro magic to define the > RX_RES_PHY...MASK in little endian... iwl-hw.h:#define RX_RES_PHY_FLAGS_ANTENNA_MSK __constant_cpu_to_le16(0xf0) I don't understand how this would generate the warning though > > Maybe it's time for you to get a cross compiler or better yet buy a > big-endian machine and actually test things on that? :) > No need for these drastic comments, for two warnings imho ;-) We all know that one typo can make gcc very upset. And actually i believe somebody has a big endian anyways. Zhu Yi anounced that once and judging from the git commits i'm guessing it's Tomas Winkler. one of the warnings was already fixed in iwlwifi git yesterday http://intellinuxwireless.org/repos/?p=iwlwifi.git;a=commit;h=b7ce8c9f73b44a2f91424ce522844bb29e23a739 which will take care of the 2xxx warnings. I'm predicting that patch will arrive on linux-wireless soon too. (took me quite some time to figure this out, because I was looking at the iwlwifi git) Ian - To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html