From patchwork Mon Jan 19 21:48:40 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1672 Return-Path: X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768859410; bh=RDa27nAta5yXy3sxbG6+NVnMRhiQrzsuXXCWzjdHHso=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=lpuoKjrk7EutAk5L3lH87jL9ilm1ey6rmL4wHDtYn6MdhPZSpNVGXVsQRQ/GvaZHH AiS1zG75q9K3/iSfWbqmIhIzDiwMbisEEagN2bvMmP9MNCvEIE9+MnMJNbBFoMeSgn Gp7c1Me9nW/g7CrBjUNEgSlxBNlbiQEOkWs2fpKrGmOYBx66Ciplgfc1wYH+0pCxDe T6xZY71siX2NsBTKiksUxQE75ij0jHQ9gq8JPCHy8mzHL5z3kiT3lGqcafBYy/3lOU w4oifZfeyO4pzHJh+tW5XB6iNd4cfsMqdKC/hdRjcuI//+pDf6gKEnn5+EN8r4ujd1 IH1rSSC6OJlpA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 50AFD69533 for ; Mon, 19 Jan 2026 14:50:10 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id bIe5CRfXBvxt for ; Mon, 19 Jan 2026 14:50:10 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768859410; bh=RDa27nAta5yXy3sxbG6+NVnMRhiQrzsuXXCWzjdHHso=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=lpuoKjrk7EutAk5L3lH87jL9ilm1ey6rmL4wHDtYn6MdhPZSpNVGXVsQRQ/GvaZHH AiS1zG75q9K3/iSfWbqmIhIzDiwMbisEEagN2bvMmP9MNCvEIE9+MnMJNbBFoMeSgn Gp7c1Me9nW/g7CrBjUNEgSlxBNlbiQEOkWs2fpKrGmOYBx66Ciplgfc1wYH+0pCxDe T6xZY71siX2NsBTKiksUxQE75ij0jHQ9gq8JPCHy8mzHL5z3kiT3lGqcafBYy/3lOU w4oifZfeyO4pzHJh+tW5XB6iNd4cfsMqdKC/hdRjcuI//+pDf6gKEnn5+EN8r4ujd1 IH1rSSC6OJlpA== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 3E83569535 for ; Mon, 19 Jan 2026 14:50:10 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768859408; bh=kJfiABufFX41enStcnu80toTEmf3H8qlX5ULMG81jY0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fuXYvNalIF069nOlhZbyc9qDbk1mbDUfmWPCiDLyC/uvixaXl+C+mC+GO6CuNUUSb UhPNlvYYmPKU6LAtVqGxmnORDh0A9aV+WEcuzS/MF34Ikbox4zEfMzHGsjjIi0myse zIAkC6v7rxZLJEjtR1PC6EM7jJhb5/picUB94ZN4NClsahqgWWzqauMLfuXjoR0p7N kwURP38eouku76yeIQVBcC7jYR+ae9WuHoDnPl7/yGT0SQ/6azG+NauIJvqLuc01uV Vc38CFn3Pcf7i71O5yal2Zylp3+nxxj8bg2bsBiG4aOpzMGJbuljcidw6DxXKhLo3p 7YzQ29liNUvtg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id B9AD669539; Mon, 19 Jan 2026 14:50:08 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id 4lpJBO2_x7Bs; Mon, 19 Jan 2026 14:50:08 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768859404; bh=VVvtzFbsxJ0euUjYf87eQv+isadu0pa+oCQ9Ut3ka9I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZzYchWiBbNySsMvKYE/8hCLF2DqabvbseJYINRUv2BiP3mxGabNABrT/Wyhxt0xzv n19WUMkAV9etHJ+eOepI/u8tUgMs/NVCoqMJsskq0OdI4yPY51HqWcPurxuWORjQ/n EYNAPI2EUvnJD/VuBNNVSHy7LbvRIgWLaL6v+YfkS5KKqQKj7/HyjZzR1bOJdth0PE nhsbRpzNeTjS2klyUrgII4jowCW/LP5hYTZ3tc0FCx6omYgcNASG0zzMfierZ9kVMt ytg/H+IngaCltk62UkRzRfYgNmf8mkWEKudKMA8vDtTU5ZhbC0z2/4jJXwxQY2Z0QC 0j+fwZoauDK8g== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 6023D6951A; Mon, 19 Jan 2026 14:50:04 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Mon, 19 Jan 2026 14:48:40 -0700 Message-ID: <20260119214846.3087611-16-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260119214846.3087611-1-sjg@u-boot.org> References: <20260119214846.3087611-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: TN23ACONRU2MKONADK7HLBJKACFCULYP X-Message-ID-Hash: TN23ACONRU2MKONADK7HLBJKACFCULYP X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Simon Glass , "Claude Opus 4 . 5" X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 15/16] ext4l: Move WARN_RATELIMIT to linux/ratelimit.h List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Glass 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 Signed-off-by: Simon Glass --- 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 */