diff options
author | Julia Lawall <julia@diku.dk> | 2009-08-01 21:50:31 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-08-04 22:44:23 +0200 |
commit | 87cdb9894b9367237f25e5a4c381eb8e594e782b (patch) | |
tree | 541b943159a487dc3120f9158b81a25335a522a9 /net/rfkill | |
parent | libertas: Fix WEP association failure with open source wpa_supplicant 0.5.10 (diff) | |
download | linux-87cdb9894b9367237f25e5a4c381eb8e594e782b.tar.xz linux-87cdb9894b9367237f25e5a4c381eb8e594e782b.zip |
drivers/net/wireless: Use DIV_ROUND_CLOSEST
The kernel.h macro DIV_ROUND_CLOSEST performs the computation (x + d/2)/d
but is perhaps more readable.
The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// <smpl>
@haskernel@
@@
#include <linux/kernel.h>
@depends on haskernel@
expression x,__divisor;
@@
- (((x) + ((__divisor) / 2)) / (__divisor))
+ DIV_ROUND_CLOSEST(x,__divisor)
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/rfkill')
0 files changed, 0 insertions, 0 deletions