From: Simon Glass <simon.glass@canonical.com> Move the WARN_RATELIMIT macro to include/linux/ratelimit.h where it belongs with other rate-limiting definitions. Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: Simon Glass <simon.glass@canonical.com> --- fs/ext4l/ext4_uboot.h | 3 +-- include/linux/ratelimit.h | 9 +++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/fs/ext4l/ext4_uboot.h b/fs/ext4l/ext4_uboot.h index e617fc41e30..49405877133 100644 --- a/fs/ext4l/ext4_uboot.h +++ b/fs/ext4l/ext4_uboot.h @@ -1329,8 +1329,7 @@ static inline unsigned long ext4_find_next_bit_le(const void *addr, /* sb_end_intwrite defined earlier */ -/* WARN_RATELIMIT - just evaluate condition, no warning in U-Boot */ -#define WARN_RATELIMIT(condition, ...) (condition) +/* WARN_RATELIMIT is in linux/ratelimit.h */ /* folio_get - now implemented in support.c */ diff --git a/include/linux/ratelimit.h b/include/linux/ratelimit.h index 319f794f059..ca42c21406a 100644 --- a/include/linux/ratelimit.h +++ b/include/linux/ratelimit.h @@ -32,4 +32,13 @@ struct ratelimit_state { int ___ratelimit(struct ratelimit_state *rs, const char *func); void ratelimit_state_init(void *rs, int interval, int burst); +/** + * WARN_RATELIMIT - conditionally emit warning with rate limiting + * @condition: condition to check + * @...: printf-style format and arguments + * + * In U-Boot (no rate limiting), just evaluates the condition. + */ +#define WARN_RATELIMIT(condition, ...) (condition) + #endif /* _LINUX_RATELIMIT_H */ -- 2.43.0