lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Thu, 24 Jul 2014 12:54:31 +0200
From:	Johannes Berg <johannes@...solutions.net>
To:	Andrew Bresticker <abrestic@...omium.org>
Cc:	"John W. Linville" <linville@...driver.com>,
	linux-wireless@...r.kernel.org, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mac80211_hwsim: fix compiler warning on MIPS

On Tue, 2014-07-22 at 14:43 -0700, Andrew Bresticker wrote:
> 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.

Applied, thanks.

johannes

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ