repo.or.cz
/
linux-2.6.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
ixgbe: do not compile ixgbe_sysfs.c when CONFIG_IXGBE_HWMON is not set
[linux-2.6.git]
/
lib
/
reciprocal_div.c
blob
75510e94f7d0b2fcd5736a4e0aeb9ff282da11d1
1
#include <asm/div64.h>
2
#include <linux/reciprocal_div.h>
3
#include <linux/export.h>
4
5
u32
reciprocal_value
(
u32 k
)
6
{
7
u64 val
= (
1LL
<<
32
) + (
k
-
1
);
8
do_div
(
val
,
k
);
9
return
(
u32
)
val
;
10
}
11
EXPORT_SYMBOL
(
reciprocal_value
);