Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

remove ratelimt()

It mistakenly assumes that a static local in an inlined function is a
kernel-wide singleton. It also has no callers, so let's remove it.

Cc: Dave Young <hidave.darkstar@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Andrew Morton and committed by
Linus Torvalds
b76f90b5 afef80b3

-7
-7
include/linux/ratelimit.h
··· 17 17 struct ratelimit_state name = {interval, burst,} 18 18 19 19 extern int __ratelimit(struct ratelimit_state *rs); 20 - 21 - static inline int ratelimit(void) 22 - { 23 - static DEFINE_RATELIMIT_STATE(rs, DEFAULT_RATELIMIT_INTERVAL, 24 - DEFAULT_RATELIMIT_BURST); 25 - return __ratelimit(&rs); 26 - } 27 20 #endif