mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-06 22:42:10 +00:00
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>
This commit is contained in:
parent
11ab35ed04
commit
f4e774f55f
3 changed files with 0 additions and 98 deletions
|
@ -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; \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue