Re: [PATCH 01/22] mpool: add utility routines and ioctl definitions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 28 Sep 2020 11:45:13 -0500 Nabeel M Mohamed wrote:
> 
> +/* Rate limited version of mp_pr_err(). */
> +#define mp_pr_rl(_fmt, _err, ...)				\
> +do {								\
> +	static unsigned long mp_pr_rl_state;			\

We do not need to declare a mp_pr_rl_state per use case of mp_pr_rl.

> +	uint dly = msecs_to_jiffies(333);			\

printk_timed_ratelimit() needs msec as input instead of tick.

> +								\
> +	if (printk_timed_ratelimit(&mp_pr_rl_state, dly)) {	\
> +		pr_err("%s: " _fmt ": errno %d",		\
> +		       __func__, ## __VA_ARGS__, (_err));	\
> +	}							\
> +} while (0)





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux