Skip to content

Commit

Permalink
average: remove out-of-line implementation
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Johannes Berg authored and David S. Miller committed Aug 20, 2015
1 parent 11ab35e commit f4e774f
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 98 deletions.
24 changes: 0 additions & 24 deletions include/linux/average.h
Original file line number Diff line number Diff line change
Expand Up @@ -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; \
Expand Down
10 changes: 0 additions & 10 deletions lib/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -460,16 +460,6 @@ config ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
config LRU_CACHE
tristate

config AVERAGE
bool "Averaging functions"
help
This option is provided for the case where no in-kernel-tree
modules require averaging functions, but a module built outside
the kernel tree does. Such modules that use library averaging
functions require Y here.

If unsure, say N.

config CLZ_TAB
bool

Expand Down
64 changes: 0 additions & 64 deletions lib/average.c

This file was deleted.

0 comments on commit f4e774f

Please sign in to comment.