summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorJames Lee <james@codeconstruct.com.au>2026-10-26 11:32:32 +0800
committerJakub Kicinski <kuba@kernel.org>2026-10-28 17:25:25 -0700
commit8146be04908d3efbe3c6e130f551edbfd7a9dab8 (patch)
tree0ffbdf504347db61b362905738055a0c7d03d6c2 /drivers
parent4c6fbb1fbafa85029fa789b5b01f39ebcb459d1a (diff)
net: mctp: usblib: Fix broken assertion
The expression in a static assertion in the kunit tests was not considered constant by gcc, causing an error. Replace the static assert with a runtime kunit equivalent. Fixes: 1e12f734afc1 ("net: mctp: usblib: Add initial kunit tx tests") Reported-by: Geert Uytterhoeven <geert@linux-m68k.org> Closes: https://lore.kernel.org/netdev/CAMuHMdXTGGdGWZ9sKz5_sQF1237gV844cEhkXr6v_TUHPOb78Q@mail.gmail.com/ Signed-off-by: James Lee <james@codeconstruct.com.au> Link: https://patch.msgid.link/20261026-dev-mctp-static-assert-fix-v1-1-ceef9913e891@codeconstruct.com.au Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/mctp/mctp-usblib-test.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/mctp/mctp-usblib-test.c b/drivers/net/mctp/mctp-usblib-test.c
index b7e8743c561f..3a48b10164b0 100644
--- a/drivers/net/mctp/mctp-usblib-test.c
+++ b/drivers/net/mctp/mctp-usblib-test.c
@@ -816,8 +816,8 @@ static void mctp_usblib_test_tx_multi_push(struct kunit *test)
};
int rc;
- static_assert(!sends[ARRAY_SIZE(sends) - 1].more,
- "The last push must claim there will be no more");
+ KUNIT_ASSERT_TRUE_MSG(test, !sends[ARRAY_SIZE(sends) - 1].more,
+ "The last push must claim there will be no more");
max_length = 0;
for (i = 0; i < ARRAY_SIZE(sends); i++) {