diff options
| author | Johannes Berg <johannes.berg@intel.com> | 2015-08-19 03:46:22 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2015-08-20 17:10:23 -0400 |
| commit | f4e774f55fe0bb568a0877b2eb9e1b4b5a6f5cbc (patch) | |
| tree | 60195c628836ff931a160cb90ca779e4832119ba /include/linux | |
| parent | 11ab35ed0457a4b7914358986a67064ecb467e7d (diff) | |
average: remove out-of-line implementation
Since all users are now converted to the inline implementation,
remove the out-of-line implementation entirely.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/average.h | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/include/linux/average.h b/include/linux/average.h index 60f8226c5652..d04aa58280de 100644 --- a/include/linux/average.h +++ b/include/linux/average.h | |||
| @@ -3,30 +3,6 @@ | |||
| 3 | 3 | ||
| 4 | /* Exponentially weighted moving average (EWMA) */ | 4 | /* Exponentially weighted moving average (EWMA) */ |
| 5 | 5 | ||
| 6 | /* For more documentation see lib/average.c */ | ||
| 7 | |||
| 8 | struct ewma { | ||
| 9 | unsigned long internal; | ||
| 10 | unsigned long factor; | ||
| 11 | unsigned long weight; | ||
| 12 | }; | ||
| 13 | |||
| 14 | extern void ewma_init(struct ewma *avg, unsigned long factor, | ||
| 15 | unsigned long weight); | ||
| 16 | |||
| 17 | extern struct ewma *ewma_add(struct ewma *avg, unsigned long val); | ||
| 18 | |||
| 19 | /** | ||
| 20 | * ewma_read() - Get average value | ||
| 21 | * @avg: Average structure | ||
| 22 | * | ||
| 23 | * Returns the average value held in @avg. | ||
| 24 | */ | ||
| 25 | static inline unsigned long ewma_read(const struct ewma *avg) | ||
| 26 | { | ||
| 27 | return avg->internal >> avg->factor; | ||
| 28 | } | ||
| 29 | |||
| 30 | #define DECLARE_EWMA(name, _factor, _weight) \ | 6 | #define DECLARE_EWMA(name, _factor, _weight) \ |
| 31 | struct ewma_##name { \ | 7 | struct ewma_##name { \ |
| 32 | unsigned long internal; \ | 8 | unsigned long internal; \ |
