mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] firmware: cs_dsp: Simplify suppressing log messages during KUnit testing
@ 2026-03-10 13:03 Richard Fitzgerald
  2026-03-10 18:16 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Richard Fitzgerald @ 2026-03-10 13:03 UTC (permalink / raw)
  To: broonie; +Cc: linux-sound, linux-kernel, patches

Rework the way that kernel log messages are rate-limited or suppressed
while running the cs_dsp KUnit tests.

Under normal conditions cs_dsp doesn't produce an unreasonable number of
log messages, and state changes are relatively infrequent. But the KUnit
tests run through a very large number of test cases, especially error
cases, and this produces an unusually large amount of log output from
cs_dsp.

The original fix for this in commit 10db9f6899dd ("firmware: cs_dsp:
rate-limit log messages in KUnit builds") was effective but not pretty.
It involved different definitions of the log macros for KUnit and
not-KUnit builds, and exported variables for the KUnit tests to disable
log messages. I would have preferred to turn the log macros into real
functions that can contain a KUNIT_STATIC_STUB_REDIRECT(), but the
dev_xxx() macros don't have a version that take va_args, so they can't
be wrapped by a function.

This patch enables the use of a KUNIT_STATIC_STUB_REDIRECT() instead
of exported variables, and avoids the need for different definitions of
the debug macros in KUnit and not-KUnit builds.

- A new function cs_dsp_can_emit_message() returns true if the
  messages can be emitted to the kernel log. In a normal not-KUnit build
  this function collapses to simply returning true. In KUnit builds it
  will rate-limit output, and this uses a single static rate limiter so
  it limits the overall rate across all cs_dsp log messages. The KUnit
  test can redirect it to change the suppression behavior.

- The cs_dsp debug message macros are changed to only call the dev_xxx()
  if cs_dsp_can_emit_message() returns true. These are still macros so
  there is no problem wrapping the dev_xxx(). For a normal not-KUnit
  build cs_dsp_can_emit_message() always returns true so these macros
  simplify down to being identical to calling dev_xxx() directly.

- The KUnit tests that cause a lot of cs_dsp messages now redirect
  cs_dsp_can_emit_message() to a local function. This returns false
  to suppress cs_dsp messages, unless DEBUG is defined for that test.

I have checked that for a x86_64 production (non-KUnit) build the
disassembled cs_dsp.o is identical to what was generated from the
original code. So the complier is correctly simplifying the
cs_dsp_can_emit_message() and macros down to only the call to dev_xxx().

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
---
 drivers/firmware/cirrus/cs_dsp.c              | 68 ++++++++++---------
 drivers/firmware/cirrus/cs_dsp.h              |  4 +-
 .../firmware/cirrus/test/cs_dsp_test_bin.c    | 21 +++---
 .../cirrus/test/cs_dsp_test_bin_error.c       | 19 +++---
 .../firmware/cirrus/test/cs_dsp_test_wmfw.c   | 25 ++++---
 .../cirrus/test/cs_dsp_test_wmfw_error.c      | 23 +++----
 6 files changed, 79 insertions(+), 81 deletions(-)

diff --git a/drivers/firmware/cirrus/cs_dsp.c b/drivers/firmware/cirrus/cs_dsp.c
index 42a50a4f8f58..bb93b24c659d 100644
--- a/drivers/firmware/cirrus/cs_dsp.c
+++ b/drivers/firmware/cirrus/cs_dsp.c
@@ -9,6 +9,7 @@
  *                         Cirrus Logic International Semiconductor Ltd.
  */
 
+#include <kunit/static_stub.h>
 #include <kunit/visibility.h>
 #include <linux/cleanup.h>
 #include <linux/ctype.h>
@@ -18,6 +19,7 @@
 #include <linux/minmax.h>
 #include <linux/module.h>
 #include <linux/moduleparam.h>
+#include <linux/ratelimit.h>
 #include <linux/seq_file.h>
 #include <linux/slab.h>
 #include <linux/vmalloc.h>
@@ -30,45 +32,47 @@
 /*
  * When the KUnit test is running the error-case tests will cause a lot
  * of messages. Rate-limit to prevent overflowing the kernel log buffer
- * during KUnit test runs.
+ * during KUnit test runs and allow the test to redirect this function.
+ * In normal (not KUnit) builds this collapses to only return true.
  */
-#if IS_ENABLED(CONFIG_FW_CS_DSP_KUNIT_TEST)
-bool cs_dsp_suppress_err_messages;
-EXPORT_SYMBOL_IF_KUNIT(cs_dsp_suppress_err_messages);
+VISIBLE_IF_KUNIT bool cs_dsp_can_emit_message(void)
+{
+	KUNIT_STATIC_STUB_REDIRECT(cs_dsp_can_emit_message);
 
-bool cs_dsp_suppress_warn_messages;
-EXPORT_SYMBOL_IF_KUNIT(cs_dsp_suppress_warn_messages);
+	if (IS_ENABLED(CONFIG_FW_CS_DSP_KUNIT_TEST)) {
+		static DEFINE_RATELIMIT_STATE(_rs,
+					      DEFAULT_RATELIMIT_INTERVAL,
+					      DEFAULT_RATELIMIT_BURST);
+		return __ratelimit(&_rs);
+	}
 
-bool cs_dsp_suppress_info_messages;
-EXPORT_SYMBOL_IF_KUNIT(cs_dsp_suppress_info_messages);
+	return true;
+}
+EXPORT_SYMBOL_IF_KUNIT(cs_dsp_can_emit_message);
 
-#define cs_dsp_err(_dsp, fmt, ...) \
-	do { \
-		if (!cs_dsp_suppress_err_messages) \
-			dev_err_ratelimited(_dsp->dev, "%s: " fmt, _dsp->name, ##__VA_ARGS__); \
+#define cs_dsp_err(_dsp, fmt, ...)						   \
+	do {									   \
+		if (cs_dsp_can_emit_message())					   \
+			dev_err(_dsp->dev, "%s: " fmt, _dsp->name, ##__VA_ARGS__); \
 	} while (false)
-#define cs_dsp_warn(_dsp, fmt, ...) \
-	do { \
-		if (!cs_dsp_suppress_warn_messages) \
-			dev_warn_ratelimited(_dsp->dev, "%s: " fmt, _dsp->name, ##__VA_ARGS__); \
+
+#define cs_dsp_warn(_dsp, fmt, ...)						    \
+	do {									    \
+		if (cs_dsp_can_emit_message())					    \
+			dev_warn(_dsp->dev, "%s: " fmt, _dsp->name, ##__VA_ARGS__); \
+	} while (false)
+
+#define cs_dsp_info(_dsp, fmt, ...)						    \
+	do {									    \
+		if (cs_dsp_can_emit_message())					    \
+			dev_info(_dsp->dev, "%s: " fmt, _dsp->name, ##__VA_ARGS__); \
 	} while (false)
-#define cs_dsp_info(_dsp, fmt, ...) \
-	do { \
-		if (!cs_dsp_suppress_info_messages) \
-			dev_info_ratelimited(_dsp->dev, "%s: " fmt, _dsp->name, ##__VA_ARGS__); \
+
+#define cs_dsp_dbg(_dsp, fmt, ...)						   \
+	do {									   \
+		if (cs_dsp_can_emit_message())					   \
+			dev_dbg(_dsp->dev, "%s: " fmt, _dsp->name, ##__VA_ARGS__); \
 	} while (false)
-#define cs_dsp_dbg(_dsp, fmt, ...) \
-	dev_dbg_ratelimited(_dsp->dev, "%s: " fmt, _dsp->name, ##__VA_ARGS__)
-#else
-#define cs_dsp_err(_dsp, fmt, ...) \
-	dev_err(_dsp->dev, "%s: " fmt, _dsp->name, ##__VA_ARGS__)
-#define cs_dsp_warn(_dsp, fmt, ...) \
-	dev_warn(_dsp->dev, "%s: " fmt, _dsp->name, ##__VA_ARGS__)
-#define cs_dsp_info(_dsp, fmt, ...) \
-	dev_info(_dsp->dev, "%s: " fmt, _dsp->name, ##__VA_ARGS__)
-#define cs_dsp_dbg(_dsp, fmt, ...) \
-	dev_dbg(_dsp->dev, "%s: " fmt, _dsp->name, ##__VA_ARGS__)
-#endif
 
 #define ADSP1_CONTROL_1                   0x00
 #define ADSP1_CONTROL_2                   0x02
diff --git a/drivers/firmware/cirrus/cs_dsp.h b/drivers/firmware/cirrus/cs_dsp.h
index adf543004aea..04d768d08d03 100644
--- a/drivers/firmware/cirrus/cs_dsp.h
+++ b/drivers/firmware/cirrus/cs_dsp.h
@@ -10,9 +10,7 @@
 #define FW_CS_DSP_H
 
 #if IS_ENABLED(CONFIG_KUNIT)
-extern bool cs_dsp_suppress_err_messages;
-extern bool cs_dsp_suppress_warn_messages;
-extern bool cs_dsp_suppress_info_messages;
+bool cs_dsp_can_emit_message(void);
 #endif
 
 #endif /* ifndef FW_CS_DSP_H */
diff --git a/drivers/firmware/cirrus/test/cs_dsp_test_bin.c b/drivers/firmware/cirrus/test/cs_dsp_test_bin.c
index 61078da57462..63416838f865 100644
--- a/drivers/firmware/cirrus/test/cs_dsp_test_bin.c
+++ b/drivers/firmware/cirrus/test/cs_dsp_test_bin.c
@@ -7,6 +7,7 @@
 
 #include <kunit/device.h>
 #include <kunit/resource.h>
+#include <kunit/static_stub.h>
 #include <kunit/test.h>
 #include <linux/build_bug.h>
 #include <linux/firmware/cirrus/cs_dsp.h>
@@ -2155,6 +2156,15 @@ static void bin_patch_name_and_info(struct kunit *test)
 	KUNIT_EXPECT_EQ(test, reg_val, payload_data);
 }
 
+static bool cs_dsp_bin_test_can_emit_message_hook(void)
+{
+#if defined(DEBUG)
+	return true;
+#else
+	return false;
+#endif
+}
+
 static int cs_dsp_bin_test_common_init(struct kunit *test, struct cs_dsp *dsp,
 					int wmdr_ver)
 {
@@ -2239,16 +2249,12 @@ static int cs_dsp_bin_test_common_init(struct kunit *test, struct cs_dsp *dsp,
 	 * The large number of test cases will cause an unusually large amount
 	 * of dev_info() messages from cs_dsp, so suppress these.
 	 */
-	cs_dsp_suppress_info_messages = true;
+	kunit_activate_static_stub(test, cs_dsp_can_emit_message,
+				   cs_dsp_bin_test_can_emit_message_hook);
 
 	return 0;
 }
 
-static void cs_dsp_bin_test_exit(struct kunit *test)
-{
-	cs_dsp_suppress_info_messages = false;
-}
-
 static int cs_dsp_bin_test_halo_init_common(struct kunit *test, int wmdr_ver)
 {
 	struct cs_dsp *dsp;
@@ -2833,7 +2839,6 @@ static struct kunit_case cs_dsp_bin_test_cases_adsp2[] = {
 static struct kunit_suite cs_dsp_bin_test_halo = {
 	.name = "cs_dsp_bin_halo",
 	.init = cs_dsp_bin_test_halo_init,
-	.exit = cs_dsp_bin_test_exit,
 	.test_cases = cs_dsp_bin_test_cases_halo,
 	.attr.speed = KUNIT_SPEED_SLOW,
 };
@@ -2848,7 +2853,6 @@ static struct kunit_suite cs_dsp_bin_test_halo_wmdr3 = {
 static struct kunit_suite cs_dsp_bin_test_adsp2_32bit = {
 	.name = "cs_dsp_bin_adsp2_32bit",
 	.init = cs_dsp_bin_test_adsp2_32bit_init,
-	.exit = cs_dsp_bin_test_exit,
 	.test_cases = cs_dsp_bin_test_cases_adsp2,
 	.attr.speed = KUNIT_SPEED_SLOW,
 };
@@ -2856,7 +2860,6 @@ static struct kunit_suite cs_dsp_bin_test_adsp2_32bit = {
 static struct kunit_suite cs_dsp_bin_test_adsp2_16bit = {
 	.name = "cs_dsp_bin_adsp2_16bit",
 	.init = cs_dsp_bin_test_adsp2_16bit_init,
-	.exit = cs_dsp_bin_test_exit,
 	.test_cases = cs_dsp_bin_test_cases_adsp2,
 	.attr.speed = KUNIT_SPEED_SLOW,
 };
diff --git a/drivers/firmware/cirrus/test/cs_dsp_test_bin_error.c b/drivers/firmware/cirrus/test/cs_dsp_test_bin_error.c
index 888e277a265c..f879c5467c98 100644
--- a/drivers/firmware/cirrus/test/cs_dsp_test_bin_error.c
+++ b/drivers/firmware/cirrus/test/cs_dsp_test_bin_error.c
@@ -8,6 +8,7 @@
 
 #include <kunit/device.h>
 #include <kunit/resource.h>
+#include <kunit/static_stub.h>
 #include <kunit/test.h>
 #include <linux/build_bug.h>
 #include <linux/firmware/cirrus/cs_dsp.h>
@@ -380,11 +381,13 @@ static void bin_block_payload_len_garbage(struct kunit *test)
 			0);
 }
 
-static void cs_dsp_bin_err_test_exit(struct kunit *test)
+static bool cs_dsp_bin_err_test_can_emit_message_hook(void)
 {
-	cs_dsp_suppress_err_messages = false;
-	cs_dsp_suppress_warn_messages = false;
-	cs_dsp_suppress_info_messages = false;
+#if defined(DEBUG)
+	return true;
+#else
+	return false;
+#endif
 }
 
 static int cs_dsp_bin_err_test_common_init(struct kunit *test, struct cs_dsp *dsp,
@@ -482,9 +485,8 @@ static int cs_dsp_bin_err_test_common_init(struct kunit *test, struct cs_dsp *ds
 	 * Testing error conditions can produce a lot of log output
 	 * from cs_dsp error messages, so suppress messages.
 	 */
-	cs_dsp_suppress_err_messages = true;
-	cs_dsp_suppress_warn_messages = true;
-	cs_dsp_suppress_info_messages = true;
+	kunit_activate_static_stub(test, cs_dsp_can_emit_message,
+				   cs_dsp_bin_err_test_can_emit_message_hook);
 
 	return 0;
 }
@@ -584,7 +586,6 @@ static struct kunit_case cs_dsp_bin_err_test_cases[] = {
 static struct kunit_suite cs_dsp_bin_err_test_halo = {
 	.name = "cs_dsp_bin_err_halo",
 	.init = cs_dsp_bin_err_test_halo_init,
-	.exit = cs_dsp_bin_err_test_exit,
 	.test_cases = cs_dsp_bin_err_test_cases,
 	.attr.speed = KUNIT_SPEED_SLOW,
 };
@@ -592,7 +593,6 @@ static struct kunit_suite cs_dsp_bin_err_test_halo = {
 static struct kunit_suite cs_dsp_bin_err_test_adsp2_32bit = {
 	.name = "cs_dsp_bin_err_adsp2_32bit",
 	.init = cs_dsp_bin_err_test_adsp2_32bit_init,
-	.exit = cs_dsp_bin_err_test_exit,
 	.test_cases = cs_dsp_bin_err_test_cases,
 	.attr.speed = KUNIT_SPEED_SLOW,
 };
@@ -600,7 +600,6 @@ static struct kunit_suite cs_dsp_bin_err_test_adsp2_32bit = {
 static struct kunit_suite cs_dsp_bin_err_test_adsp2_16bit = {
 	.name = "cs_dsp_bin_err_adsp2_16bit",
 	.init = cs_dsp_bin_err_test_adsp2_16bit_init,
-	.exit = cs_dsp_bin_err_test_exit,
 	.test_cases = cs_dsp_bin_err_test_cases,
 	.attr.speed = KUNIT_SPEED_SLOW,
 };
diff --git a/drivers/firmware/cirrus/test/cs_dsp_test_wmfw.c b/drivers/firmware/cirrus/test/cs_dsp_test_wmfw.c
index 788458d5a287..1de70e81a868 100644
--- a/drivers/firmware/cirrus/test/cs_dsp_test_wmfw.c
+++ b/drivers/firmware/cirrus/test/cs_dsp_test_wmfw.c
@@ -8,6 +8,7 @@
 
 #include <kunit/device.h>
 #include <kunit/resource.h>
+#include <kunit/static_stub.h>
 #include <kunit/test.h>
 #include <linux/build_bug.h>
 #include <linux/firmware/cirrus/cs_dsp.h>
@@ -1775,6 +1776,15 @@ static void wmfw_load_with_info(struct kunit *test)
 	KUNIT_EXPECT_MEMEQ(test, readback, payload_data, payload_size_bytes);
 }
 
+static bool cs_dsp_wmfw_test_can_emit_message_hook(void)
+{
+#if defined(DEBUG)
+	return true;
+#else
+	return false;
+#endif
+}
+
 static int cs_dsp_wmfw_test_common_init(struct kunit *test, struct cs_dsp *dsp,
 					int wmfw_version)
 {
@@ -1863,16 +1873,12 @@ static int cs_dsp_wmfw_test_common_init(struct kunit *test, struct cs_dsp *dsp,
 	 * The large number of test cases will cause an unusually large amount
 	 * of dev_info() messages from cs_dsp, so suppress these.
 	 */
-	cs_dsp_suppress_info_messages = true;
+	kunit_activate_static_stub(test, cs_dsp_can_emit_message,
+				   cs_dsp_wmfw_test_can_emit_message_hook);
 
 	return 0;
 }
 
-static void cs_dsp_wmfw_test_exit(struct kunit *test)
-{
-	cs_dsp_suppress_info_messages = false;
-}
-
 static int cs_dsp_wmfw_test_halo_init(struct kunit *test)
 {
 	struct cs_dsp *dsp;
@@ -2180,7 +2186,6 @@ static struct kunit_case cs_dsp_wmfw_test_cases_adsp2[] = {
 static struct kunit_suite cs_dsp_wmfw_test_halo = {
 	.name = "cs_dsp_wmfwV3_halo",
 	.init = cs_dsp_wmfw_test_halo_init,
-	.exit = cs_dsp_wmfw_test_exit,
 	.test_cases = cs_dsp_wmfw_test_cases_halo,
 	.attr.speed = KUNIT_SPEED_SLOW,
 };
@@ -2188,7 +2193,6 @@ static struct kunit_suite cs_dsp_wmfw_test_halo = {
 static struct kunit_suite cs_dsp_wmfw_test_adsp2_32bit_wmfw0 = {
 	.name = "cs_dsp_wmfwV0_adsp2_32bit",
 	.init = cs_dsp_wmfw_test_adsp2_32bit_wmfw0_init,
-	.exit = cs_dsp_wmfw_test_exit,
 	.test_cases = cs_dsp_wmfw_test_cases_adsp2,
 	.attr.speed = KUNIT_SPEED_SLOW,
 };
@@ -2196,7 +2200,6 @@ static struct kunit_suite cs_dsp_wmfw_test_adsp2_32bit_wmfw0 = {
 static struct kunit_suite cs_dsp_wmfw_test_adsp2_32bit_wmfw1 = {
 	.name = "cs_dsp_wmfwV1_adsp2_32bit",
 	.init = cs_dsp_wmfw_test_adsp2_32bit_wmfw1_init,
-	.exit = cs_dsp_wmfw_test_exit,
 	.test_cases = cs_dsp_wmfw_test_cases_adsp2,
 	.attr.speed = KUNIT_SPEED_SLOW,
 };
@@ -2204,7 +2207,6 @@ static struct kunit_suite cs_dsp_wmfw_test_adsp2_32bit_wmfw1 = {
 static struct kunit_suite cs_dsp_wmfw_test_adsp2_32bit_wmfw2 = {
 	.name = "cs_dsp_wmfwV2_adsp2_32bit",
 	.init = cs_dsp_wmfw_test_adsp2_32bit_wmfw2_init,
-	.exit = cs_dsp_wmfw_test_exit,
 	.test_cases = cs_dsp_wmfw_test_cases_adsp2,
 	.attr.speed = KUNIT_SPEED_SLOW,
 };
@@ -2212,7 +2214,6 @@ static struct kunit_suite cs_dsp_wmfw_test_adsp2_32bit_wmfw2 = {
 static struct kunit_suite cs_dsp_wmfw_test_adsp2_16bit_wmfw0 = {
 	.name = "cs_dsp_wmfwV0_adsp2_16bit",
 	.init = cs_dsp_wmfw_test_adsp2_16bit_wmfw0_init,
-	.exit = cs_dsp_wmfw_test_exit,
 	.test_cases = cs_dsp_wmfw_test_cases_adsp2,
 	.attr.speed = KUNIT_SPEED_SLOW,
 };
@@ -2220,7 +2221,6 @@ static struct kunit_suite cs_dsp_wmfw_test_adsp2_16bit_wmfw0 = {
 static struct kunit_suite cs_dsp_wmfw_test_adsp2_16bit_wmfw1 = {
 	.name = "cs_dsp_wmfwV1_adsp2_16bit",
 	.init = cs_dsp_wmfw_test_adsp2_16bit_wmfw1_init,
-	.exit = cs_dsp_wmfw_test_exit,
 	.test_cases = cs_dsp_wmfw_test_cases_adsp2,
 	.attr.speed = KUNIT_SPEED_SLOW,
 };
@@ -2228,7 +2228,6 @@ static struct kunit_suite cs_dsp_wmfw_test_adsp2_16bit_wmfw1 = {
 static struct kunit_suite cs_dsp_wmfw_test_adsp2_16bit_wmfw2 = {
 	.name = "cs_dsp_wmfwV2_adsp2_16bit",
 	.init = cs_dsp_wmfw_test_adsp2_16bit_wmfw2_init,
-	.exit = cs_dsp_wmfw_test_exit,
 	.test_cases = cs_dsp_wmfw_test_cases_adsp2,
 	.attr.speed = KUNIT_SPEED_SLOW,
 };
diff --git a/drivers/firmware/cirrus/test/cs_dsp_test_wmfw_error.c b/drivers/firmware/cirrus/test/cs_dsp_test_wmfw_error.c
index 79eee89a7fd5..e7bf5dc474f5 100644
--- a/drivers/firmware/cirrus/test/cs_dsp_test_wmfw_error.c
+++ b/drivers/firmware/cirrus/test/cs_dsp_test_wmfw_error.c
@@ -8,6 +8,7 @@
 
 #include <kunit/device.h>
 #include <kunit/resource.h>
+#include <kunit/static_stub.h>
 #include <kunit/test.h>
 #include <linux/build_bug.h>
 #include <linux/firmware/cirrus/cs_dsp.h>
@@ -989,11 +990,13 @@ static void wmfw_v2_coeff_description_exceeds_block(struct kunit *test)
 			-EOVERFLOW);
 }
 
-static void cs_dsp_wmfw_err_test_exit(struct kunit *test)
+static bool cs_dsp_wmfw_err_test_can_emit_message_hook(void)
 {
-	cs_dsp_suppress_err_messages = false;
-	cs_dsp_suppress_warn_messages = false;
-	cs_dsp_suppress_info_messages = false;
+#if defined(DEBUG)
+	return true;
+#else
+	return false;
+#endif
 }
 
 static int cs_dsp_wmfw_err_test_common_init(struct kunit *test, struct cs_dsp *dsp,
@@ -1080,9 +1083,8 @@ static int cs_dsp_wmfw_err_test_common_init(struct kunit *test, struct cs_dsp *d
 	 * Testing error conditions can produce a lot of log output
 	 * from cs_dsp error messages, so suppress messages.
 	 */
-	cs_dsp_suppress_err_messages = true;
-	cs_dsp_suppress_warn_messages = true;
-	cs_dsp_suppress_info_messages = true;
+	kunit_activate_static_stub(test, cs_dsp_can_emit_message,
+				   cs_dsp_wmfw_err_test_can_emit_message_hook);
 
 	return 0;
 }
@@ -1304,7 +1306,6 @@ static struct kunit_case cs_dsp_wmfw_err_test_cases_v3[] = {
 static struct kunit_suite cs_dsp_wmfw_err_test_halo = {
 	.name = "cs_dsp_wmfwV3_err_halo",
 	.init = cs_dsp_wmfw_err_test_halo_init,
-	.exit = cs_dsp_wmfw_err_test_exit,
 	.test_cases = cs_dsp_wmfw_err_test_cases_v3,
 	.attr.speed = KUNIT_SPEED_SLOW,
 };
@@ -1312,7 +1313,6 @@ static struct kunit_suite cs_dsp_wmfw_err_test_halo = {
 static struct kunit_suite cs_dsp_wmfw_err_test_adsp2_32bit_wmfw0 = {
 	.name = "cs_dsp_wmfwV0_err_adsp2_32bit",
 	.init = cs_dsp_wmfw_err_test_adsp2_32bit_wmfw0_init,
-	.exit = cs_dsp_wmfw_err_test_exit,
 	.test_cases = cs_dsp_wmfw_err_test_cases_v0,
 	.attr.speed = KUNIT_SPEED_SLOW,
 };
@@ -1320,7 +1320,6 @@ static struct kunit_suite cs_dsp_wmfw_err_test_adsp2_32bit_wmfw0 = {
 static struct kunit_suite cs_dsp_wmfw_err_test_adsp2_32bit_wmfw1 = {
 	.name = "cs_dsp_wmfwV1_err_adsp2_32bit",
 	.init = cs_dsp_wmfw_err_test_adsp2_32bit_wmfw1_init,
-	.exit = cs_dsp_wmfw_err_test_exit,
 	.test_cases = cs_dsp_wmfw_err_test_cases_v1,
 	.attr.speed = KUNIT_SPEED_SLOW,
 };
@@ -1328,7 +1327,6 @@ static struct kunit_suite cs_dsp_wmfw_err_test_adsp2_32bit_wmfw1 = {
 static struct kunit_suite cs_dsp_wmfw_err_test_adsp2_32bit_wmfw2 = {
 	.name = "cs_dsp_wmfwV2_err_adsp2_32bit",
 	.init = cs_dsp_wmfw_err_test_adsp2_32bit_wmfw2_init,
-	.exit = cs_dsp_wmfw_err_test_exit,
 	.test_cases = cs_dsp_wmfw_err_test_cases_v2,
 	.attr.speed = KUNIT_SPEED_SLOW,
 };
@@ -1336,7 +1334,6 @@ static struct kunit_suite cs_dsp_wmfw_err_test_adsp2_32bit_wmfw2 = {
 static struct kunit_suite cs_dsp_wmfw_err_test_adsp2_16bit_wmfw0 = {
 	.name = "cs_dsp_wmfwV0_err_adsp2_16bit",
 	.init = cs_dsp_wmfw_err_test_adsp2_16bit_wmfw0_init,
-	.exit = cs_dsp_wmfw_err_test_exit,
 	.test_cases = cs_dsp_wmfw_err_test_cases_v0,
 	.attr.speed = KUNIT_SPEED_SLOW,
 };
@@ -1344,7 +1341,6 @@ static struct kunit_suite cs_dsp_wmfw_err_test_adsp2_16bit_wmfw0 = {
 static struct kunit_suite cs_dsp_wmfw_err_test_adsp2_16bit_wmfw1 = {
 	.name = "cs_dsp_wmfwV1_err_adsp2_16bit",
 	.init = cs_dsp_wmfw_err_test_adsp2_16bit_wmfw1_init,
-	.exit = cs_dsp_wmfw_err_test_exit,
 	.test_cases = cs_dsp_wmfw_err_test_cases_v1,
 	.attr.speed = KUNIT_SPEED_SLOW,
 };
@@ -1352,7 +1348,6 @@ static struct kunit_suite cs_dsp_wmfw_err_test_adsp2_16bit_wmfw1 = {
 static struct kunit_suite cs_dsp_wmfw_err_test_adsp2_16bit_wmfw2 = {
 	.name = "cs_dsp_wmfwV2_err_adsp2_16bit",
 	.init = cs_dsp_wmfw_err_test_adsp2_16bit_wmfw2_init,
-	.exit = cs_dsp_wmfw_err_test_exit,
 	.test_cases = cs_dsp_wmfw_err_test_cases_v2,
 	.attr.speed = KUNIT_SPEED_SLOW,
 };
-- 
2.47.3


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-03-10 18:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-03-10 13:03 [PATCH] firmware: cs_dsp: Simplify suppressing log messages during KUnit testing Richard Fitzgerald
2026-03-10 18:16 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®