mirror of
https://github.com/schoebel/mars
synced 2025-01-12 01:29:50 +00:00
infra: use static inline for cpu_clock() (kernel 4.7)
Avoid compiler warnings caused by minor upstream changes (2c923e94cd9c6acff3b22f0ae29cfe65e2658b40)
This commit is contained in:
parent
0972d2b20d
commit
a92077dd5a
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user