diff options
| author | David S. Miller <davem@davemloft.net> | 2015-08-20 14:10:23 -0700 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2015-08-20 14:10:23 -0700 |
| commit | 84b6714e54e5199e76f845be70295ccaab924872 (patch) | |
| tree | 60195c628836ff931a160cb90ca779e4832119ba /include/linux/average.h | |
| parent | 0f8f27de19667075591eaffbf435dd78c73a2df4 (diff) | |
| parent | f4e774f55fe0bb568a0877b2eb9e1b4b5a6f5cbc (diff) | |
Merge branch 'ewma'
Johannes Berg says:
====================
average: convert users to inline implementation
Since there's very little benefit of the out-of-line implementation
(a single byte of .text in one driver as far as I've seen), convert
all drivers to the inline implementation, saving memory, and remove
the out-of-line implementation.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/average.h')
| -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 @@ /* Exponentially weighted moving average (EWMA) */ -/* For more documentation see lib/average.c */ - -struct ewma { - unsigned long internal; - unsigned long factor; - unsigned long weight; -}; - -extern void ewma_init(struct ewma *avg, unsigned long factor, - unsigned long weight); - -extern struct ewma *ewma_add(struct ewma *avg, unsigned long val); - -/** - * ewma_read() - Get average value - * @avg: Average structure - * - * Returns the average value held in @avg. - */ -static inline unsigned long ewma_read(const struct ewma *avg) -{ - return avg->internal >> avg->factor; -} - #define DECLARE_EWMA(name, _factor, _weight) \ struct ewma_##name { \ unsigned long internal; \ |
