From: Andrew Bresticker Date: Tue, 22 Jul 2014 21:43:51 +0000 (-0700) Subject: mac80211_hwsim: fix compiler warning on MIPS X-Git-Tag: omap-for-v3.17/fixes-against-rc2~149^2~73^2~5 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5d26b50813ea6206a7bbab2e645e68044f101ac5;p=pandora-kernel.git mac80211_hwsim: fix compiler warning on MIPS The dividend in do_div() is expected to be an unsigned 64-bit integer, which leads to the following warning when building for 32-bit MIPS: drivers/net/wireless/mac80211_hwsim.c: In function 'mac80211_hwsim_set_tsf': drivers/net/wireless/mac80211_hwsim.c:664:98: warning: comparison of distinct pointer types lacks a cast [enabled by default] data->bcn_delta = do_div(delta, bcn_int); Since we care about the signedness of delta when adjusting tsf_offset and bcm_delta, use the absolute value for the division and compare the two timestamps to determine the sign. Signed-off-by: Andrew Bresticker Signed-off-by: John W. Linville --- Reading git-diff-tree failed