infra: use static inline for cpu_clock() (kernel 4.7)

Avoid compiler warnings caused by minor upstream changes
(2c923e94cd9c6acff3b22f0ae29cfe65e2658b40)
This commit is contained in:
Thomas Schoebel-Theuer 2016-08-23 15:04:26 +02:00
parent 0972d2b20d
commit a92077dd5a
1 changed files with 3 additions and 3 deletions

View File

@ -120,7 +120,7 @@ struct banning {
int ban_count;
};
extern inline
static inline
bool banning_hit(struct banning *ban, long long duration)
{
long long now = cpu_clock(raw_smp_processor_id());
@ -134,7 +134,7 @@ bool banning_hit(struct banning *ban, long long duration)
return hit;
}
extern inline
static inline
bool banning_is_hit(struct banning *ban)
{
long long now = cpu_clock(raw_smp_processor_id());
@ -163,7 +163,7 @@ struct threshold {
int thr_true_hit;
};
extern inline
static inline
void threshold_check(struct threshold *thr, long long latency)
{
int ms = latency >> 6; // ignore small rounding error