*
* Using the same limiting factors as printk_ratelimit()
*/
-#ifdef notyet
ratelimit_state_init(&perf->spurious_report_rs, 5 * HZ, 10);
/* Since we use a DRM_NOTE for spurious reports it would be
* inconsistent to let __ratelimit() automatically print a
*/
ratelimit_set_flags(&perf->spurious_report_rs,
RATELIMIT_MSG_ON_RELEASE);
-#endif
ratelimit_state_init(&perf->tail_pointer_race,
5 * HZ, 10);
};
#define DEFINE_RATELIMIT_STATE(name, interval, burst) \
- int name __used = 1;
+ struct ratelimit_state name
-#define __ratelimit(x) (1)
+#define RATELIMIT_MSG_ON_RELEASE (1 << 0)
-#define ratelimit_state_init(x, y, z)
-#define ratelimit_set_flags(x, y)
+static inline int
+__ratelimit(struct ratelimit_state *rs)
+{
+ return 1;
+}
+
+static inline void
+ratelimit_state_init(struct ratelimit_state *rs, int interval, int burst)
+{
+}
+
+static inline void
+ratelimit_set_flags(struct ratelimit_state *rs, unsigned long flags)
+{
+}
#endif